]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ifacecheck/src/xmlparser.h
No changes, just change data structures used by mouse capture code.
[wxWidgets.git] / utils / ifacecheck / src / xmlparser.h
index fc7a3a6f6a5f3daceb625dd69d2479aa455150ed..a92ddc6767873713e7a527d1aad931e69e7e25cd 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     Parser of the API/interface XML files
 // Author:      Francesco Montorsi
 // Created:     2008/03/17
-// RCS-ID:      $Id$
 // Copyright:   (c) 2008 Francesco Montorsi
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,6 +15,7 @@
 #include <wx/dynarray.h>
 #include <wx/xml/xml.h>
 #include <wx/platinfo.h>
+#include <wx/log.h>
 
 
 /*
     // ...fix description...
 */
 
-
-
-// helper macros
-#define LogMessage(fmt, ...)   { if (g_bLogEnabled) { wxPrintf(fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define LogWarning(fmt, ...)   { if (g_bLogEnabled) { wxPrintf(fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define LogError(fmt, ...)     { if (g_bLogEnabled) { wxPrintf("ERROR: " fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define wxPrint(str)           { wxPrintf(str); fflush(stdout); }
-
-// enable/disable logging
-extern bool g_bLogEnabled;
-
-class LogNull
-{
-public:
-    LogNull() { g_bLogEnabled = false; }
-    ~LogNull() { g_bLogEnabled = true; }
-};
-
+// NOTE: all messages in this way are printed on the stderr
+//#define wxLogWarning   wxLogMessage
 
 
 // ----------------------------------------------------------------------------
@@ -188,7 +172,9 @@ public:     // getters
         { return m_retType; }
     wxString GetName() const
         { return m_strName; }
-    wxArgumentTypeArray GetArgumentTypes() const
+    const wxArgumentTypeArray& GetArgumentTypes() const
+        { return m_args; }
+    wxArgumentTypeArray& GetArgumentTypes()
         { return m_args; }
     int GetLocation() const
         { return m_nLine; }
@@ -211,11 +197,14 @@ public:     // getters
         { return m_retType==wxEmptyType && !m_strName.StartsWith("~"); }
     bool IsDtor() const
         { return m_retType==wxEmptyType && m_strName.StartsWith("~"); }
+    bool IsOperator() const
+        { return m_strName.StartsWith("operator"); }
 
     bool IsDeprecated() const
         { return m_bDeprecated; }
 
 
+
 public:     // setters
 
     void SetReturnType(const wxType& t)
@@ -257,6 +246,11 @@ public:     // misc
     // except for the method attributes (const,static,virtual,pureVirtual,deprecated)
     bool MatchesExceptForAttributes(const wxMethod& m) const;
 
+    // returns true if this is a ctor which has default values for all its
+    // argument, thus is able to act also as default ctor
+    bool ActsAsDefaultCtor() const;
+
+    // dumps the contents of this class in the given stream
     void Dump(wxTextOutputStream& stream) const;
 
 protected:
@@ -435,9 +429,10 @@ public:
     wxClassPtrArray FindClassesDefinedIn(const wxString& headerfile) const;
 
     void ShowProgress()
-        { /*wxPrint(".");*/ }
+        { /*wxFprintf(stderr, ".");*/ }
 
-    bool CheckParseResults() const;
+    // is this interface coherent?
+    bool CheckConsistency() const;
 
 protected:
     wxClassArray m_classes;