X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af49c4b8a2d3553e733e71c7dd3911881f4c1a2a..3f0fac91ab5c66f831dabdfae674381b32eb1f3a:/include/wx/wxexpr.h diff --git a/include/wx/wxexpr.h b/include/wx/wxexpr.h index 8730ce773b..304aeb09c9 100644 --- a/include/wx/wxexpr.h +++ b/include/wx/wxexpr.h @@ -16,7 +16,7 @@ #pragma interface "wxexpr.h" #endif -#include +#if wxUSE_PROLOGIO #include "wx/defs.h" #include "wx/string.h" @@ -26,6 +26,8 @@ #include "wx/expr.h" +#include + // Compatibility #define PrologExpr wxExpr #define PrologDatabase wxExprDatabase @@ -80,7 +82,7 @@ class WXDLLEXPORT wxExpr wxExpr(wxExprType the_type, wxChar *word_or_string, bool allocate); 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 = wxT("")); wxExpr(long the_integer); wxExpr(double the_real); wxExpr(wxList *the_list); @@ -188,6 +190,8 @@ class WXDLLEXPORT wxExpr // so we can index into the wxExpr database and fish out the pointer. inline void SetClientData(wxObject *data) { client_data = data; } inline wxObject *GetClientData(void) const { return client_data; } + + DECLARE_NO_COPY_CLASS(wxExpr) }; class WXDLLEXPORT wxExprDatabase: public wxList @@ -242,11 +246,15 @@ public: // Compatibility 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, wxConvLibc)); + } inline void WriteProlog(FILE* stream) { Write(stream); } private: DECLARE_DYNAMIC_CLASS(wxExprDatabase) + DECLARE_NO_COPY_CLASS(wxExprDatabase) }; // Function call-style interface - some more convenience wrappers/unwrappers @@ -269,5 +277,7 @@ WXDLLEXPORT_DATA(extern wxExprDatabase*) thewxExprDatabase; // YACC/LEX can leave memory lying around... extern "C" WXDLLEXPORT int wxExprCleanUp(); -#endif +#endif // wxUSE_PROLOGIO + +#endif // _WX_WXEXPRH__