Unicode conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,8 +74,8 @@ class WXDLLEXPORT wxExpr
|
|||||||
wxExprType type;
|
wxExprType type;
|
||||||
union {
|
union {
|
||||||
long integer;
|
long integer;
|
||||||
char *word;
|
wxChar *word;
|
||||||
char *string;
|
wxChar *string;
|
||||||
double real;
|
double real;
|
||||||
wxExpr *first; // If is a list expr, points to the first node
|
wxExpr *first; // If is a list expr, points to the first node
|
||||||
} value;
|
} value;
|
||||||
@@ -83,7 +83,7 @@ class WXDLLEXPORT wxExpr
|
|||||||
wxExpr *next; // If this is a node in a list, points to the next node
|
wxExpr *next; // If this is a node in a list, points to the next node
|
||||||
wxExpr *last; // If is a list expr, points to the last node
|
wxExpr *last; // If is a list expr, points to the last node
|
||||||
|
|
||||||
wxExpr(wxExprType the_type, char *word_or_string, bool allocate);
|
wxExpr(wxExprType the_type, wxChar *word_or_string, bool allocate);
|
||||||
wxExpr(const wxString& functor); // Assume this is a new clause - pass functor
|
wxExpr(const wxString& functor); // Assume this is a new clause - pass functor
|
||||||
wxExpr(wxExprType the_type, const wxString& word_or_string = "");
|
wxExpr(wxExprType the_type, const wxString& word_or_string = "");
|
||||||
wxExpr(long the_integer);
|
wxExpr(long the_integer);
|
||||||
@@ -114,7 +114,7 @@ class WXDLLEXPORT wxExpr
|
|||||||
return value.word;
|
return value.word;
|
||||||
else if (type == wxExprString)
|
else if (type == wxExprString)
|
||||||
return wxString(value.string);
|
return wxString(value.string);
|
||||||
else return wxString("");
|
else return wxString(_T(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxString StringValue(void) const {
|
inline wxString StringValue(void) const {
|
||||||
@@ -122,7 +122,7 @@ class WXDLLEXPORT wxExpr
|
|||||||
return wxString(value.string);
|
return wxString(value.string);
|
||||||
else if (type == wxExprWord)
|
else if (type == wxExprWord)
|
||||||
return wxString(value.word);
|
return wxString(value.word);
|
||||||
else return wxString("");
|
else return wxString(_T(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get nth arg of clause (starting from 1)
|
// Get nth arg of clause (starting from 1)
|
||||||
@@ -179,12 +179,12 @@ class WXDLLEXPORT wxExpr
|
|||||||
bool GetAttributeValue(const wxString& att, wxExpr **var) const;
|
bool GetAttributeValue(const wxString& att, wxExpr **var) const;
|
||||||
|
|
||||||
// Compatibility with old PrologIO
|
// Compatibility with old PrologIO
|
||||||
inline void AssignAttributeValue(char *att, int *var) const { GetAttributeValue(att, *var); }
|
inline void AssignAttributeValue(wxChar *att, int *var) const { GetAttributeValue(att, *var); }
|
||||||
inline void AssignAttributeValue(char *att, long *var) const { GetAttributeValue(att, *var); }
|
inline void AssignAttributeValue(wxChar *att, long *var) const { GetAttributeValue(att, *var); }
|
||||||
inline void AssignAttributeValue(char *att, float *var) const { GetAttributeValue(att, *var); }
|
inline void AssignAttributeValue(wxChar *att, float *var) const { GetAttributeValue(att, *var); }
|
||||||
inline void AssignAttributeValue(char *att, double *var) const { GetAttributeValue(att, *var); }
|
inline void AssignAttributeValue(wxChar *att, double *var) const { GetAttributeValue(att, *var); }
|
||||||
inline void AssignAttributeValue(char *att, wxExpr **var) const { GetAttributeValue(att, var); }
|
inline void AssignAttributeValue(wxChar *att, wxExpr **var) const { GetAttributeValue(att, var); }
|
||||||
void AssignAttributeValue(char *att, char **var) const ; // Word OR string -> string
|
void AssignAttributeValue(wxChar *att, wxChar **var) const ; // Word OR string -> string
|
||||||
|
|
||||||
// Add string items to list if the list attribute exists
|
// Add string items to list if the list attribute exists
|
||||||
bool GetAttributeValueStringList(const wxString& att, wxList *var) const;
|
bool GetAttributeValueStringList(const wxString& att, wxList *var) const;
|
||||||
@@ -248,7 +248,7 @@ public:
|
|||||||
void WriteLisp(ostream& stream);
|
void WriteLisp(ostream& stream);
|
||||||
|
|
||||||
// Compatibility
|
// Compatibility
|
||||||
inline bool ReadProlog(char *filename) { return Read(wxString(filename)); }
|
inline bool ReadProlog(wxChar *filename) { return Read(wxString(filename)); }
|
||||||
inline bool ReadPrologFromString(char *buffer) { return ReadFromString(wxString(buffer)); }
|
inline bool ReadPrologFromString(char *buffer) { return ReadFromString(wxString(buffer)); }
|
||||||
inline void WriteProlog(ostream& stream) { Write(stream); }
|
inline void WriteProlog(ostream& stream) { Write(stream); }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user