X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb7b690a4f6268d569d6cd52c51e13982aca094e..ba3af1010d452862c384beba48b8dfb8de45c908:/utils/ifacecheck/src/xmlparser.cpp diff --git a/utils/ifacecheck/src/xmlparser.cpp b/utils/ifacecheck/src/xmlparser.cpp index b5c752d48f..1f0fce4847 100644 --- a/utils/ifacecheck/src/xmlparser.cpp +++ b/utils/ifacecheck/src/xmlparser.cpp @@ -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); @@ -163,13 +165,13 @@ void wxArgumentType::SetDefaultValue(const wxString& defval, const wxString& def // Note: we adjust the aesthetic form of the m_strDefaultValue string for the "modify mode" // of ifacecheck: we may need to write it out in an interface header - wxString *p; + wxString *p = NULL; for (int i=0; i<2; i++) // to avoid copying&pasting the code! { if (i == 0) p = &m_strDefaultValue; if (i == 1) p = &m_strDefaultValueForCmp; - if (*p == "0u") *p = "0"; + if (*p == "0u" || *p == "0l") *p = "0"; p->Replace("0x000000001", "1"); p->Replace("\\000\\000\\000", ""); // fix for unicode strings: @@ -1493,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 + 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; @@ -1514,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())