fix an important bug: ifacecheck was parsing only <sectiondef> with kind==public-func or kind==protected-func; it was ignoring kind==user-defined and in any case the access specifier must be taken from the 'prot' attribute of <memberdef> nodes instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
aaf37267a8
commit
5fa507c8ca
@ -156,16 +156,12 @@ int IfaceCheckApp::OnRun()
|
||||
// in any case set basic std preprocessor #defines:
|
||||
m_doxyInterface.AddPreprocessorValue("NULL", "0");
|
||||
|
||||
//g_bLogEnabled = false;
|
||||
|
||||
// parse the two XML files which contain the real and the doxygen interfaces
|
||||
// for wxWidgets API:
|
||||
if (!m_gccInterface.Parse(parser.GetParam(0)) ||
|
||||
!m_doxyInterface.Parse(parser.GetParam(1)))
|
||||
return 1;
|
||||
|
||||
// g_bLogEnabled = true;
|
||||
|
||||
if (parser.Found(DUMP_SWITCH))
|
||||
{
|
||||
wxLogMessage("Dumping real API to '%s'...", API_DUMP_FILE);
|
||||
|
@ -1495,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;
|
||||
@ -1516,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())
|
||||
|
Loading…
Reference in New Issue
Block a user