]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ifacecheck/src/xmlparser.cpp
adding missing header for non-precomp build
[wxWidgets.git] / utils / ifacecheck / src / xmlparser.cpp
index 04a583186bc2a6e86636dc2915de48def3f8af85..aed036afb3210e478c1141b9bbcacdf9b262d424 100644 (file)
@@ -68,6 +68,7 @@ void wxType::SetTypeFromString(const wxString& t)
     m_strType.Replace("[]", "*");
     m_strType.Replace("long int", "long");      // in wx typically we never write "long int", just "long"
     m_strType.Replace("long unsigned int", "unsigned long");
+    m_strType.Replace("short unsigned int", "unsigned short");
 
     // make sure the * and & operator always use the same spacing rules
     // (to make sure GetAsString() output is always consistent)
@@ -83,6 +84,7 @@ void wxType::SetTypeFromString(const wxString& t)
 
     // ADHOC-FIX
     m_strType.Replace("_wxArraywxArrayStringBase", "wxString");
+    m_strType.Replace("ExitCode", "void*");     // used in wxThread stuff
 
     m_strType = m_strType.Strip(wxString::both);
 
@@ -635,11 +637,13 @@ void wxXmlInterface::Dump(const wxString& filename)
     // dump the classes in alphabetical order
     wxSortedClassArray sorted(CompareWxClassObjects);
     sorted.Alloc(m_classes.GetCount());
-    for (unsigned int i=0; i<m_classes.GetCount(); i++)
+
+    unsigned i;
+    for (i=0; i<m_classes.GetCount(); i++)
         sorted.Add(&m_classes[i]);
 
     // now they have been sorted
-    for (unsigned int i=0; i<sorted.GetCount(); i++)
+    for (i=0; i<sorted.GetCount(); i++)
         sorted[i]->Dump(apiout);
 }
 
@@ -1086,7 +1090,8 @@ bool wxXmlGccInterface::Parse(const wxString& filename)
     }
 
     // resolve header names
-    for (unsigned int i=0; i<m_classes.GetCount(); i++)
+    unsigned i;
+    for (i=0; i<m_classes.GetCount(); i++)
     {
         unsigned long fileID = 0;
         if (!getID(&fileID, m_classes[i].GetHeader()) || fileID == 0) {
@@ -1106,7 +1111,7 @@ bool wxXmlGccInterface::Parse(const wxString& filename)
     }
 
     // resolve parent names
-    for (unsigned int i=0; i<m_classes.GetCount(); i++)
+    for (i=0; i<m_classes.GetCount(); i++)
     {
         for (unsigned int k=0; k<m_classes[i].GetParentCount(); k++)
         {
@@ -1490,18 +1495,23 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
             wxXmlNode *subchild = child->GetChildren();
             while (subchild)
             {
-                wxString kind = subchild->GetAttribute("kind");
-
-                // parse only public&protected functions:
-                if (subchild->GetName() == "sectiondef" &&
-                    (kind == "public-func" || kind == "protected-func"))
+                // NOTE: when documenting functions using the //@{ and //@}
+                //       tags to create function groups, doxygen puts the
+                //       contained methods into a "user-defined" section
+                //       so we _must_ use the "prot" attribute to distinguish
+                //       public/protected methods from private ones and cannot
+                //       rely on the kind="public" attribute of <sectiondef>
+                if (subchild->GetName() == "sectiondef")
                 {
-
                     wxXmlNode *membernode = subchild->GetChildren();
                     while (membernode)
                     {
+                        const wxString& accessSpec = membernode->GetAttribute("prot");
+
+                        // parse only public&protected functions:
                         if (membernode->GetName() == "memberdef" &&
-                            membernode->GetAttribute("kind") == "function")
+                            membernode->GetAttribute("kind") == "function" &&
+                            (accessSpec == "public" || accessSpec == "protected"))
                         {
 
                             wxMethod m;
@@ -1511,11 +1521,11 @@ bool wxXmlDoxygenInterface::ParseCompoundDefinition(const wxString& filename)
                                 return false;
                             }
 
-                            if (kind == "public-func")
+                            if (accessSpec == "public")
                                 m.SetAccessSpecifier(wxMAS_PUBLIC);
-                            else if (kind == "protected-func")
+                            else if (accessSpec == "protected")
                                 m.SetAccessSpecifier(wxMAS_PROTECTED);
-                            else if (kind == "private-func")
+                            else if (accessSpec == "private")
                                 m.SetAccessSpecifier(wxMAS_PRIVATE);
 
                             if (absoluteFile.IsEmpty())