summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config.xml4
-rw-r--r--src/xmlgen.cpp17
-rw-r--r--testing/077/077__no__xml__namespace__members__in__file__scope_8h.xml (renamed from testing/072/072__no__xml__namespace__members__in__file__scope_8h.xml)6
-rw-r--r--testing/077_no_xml_namespace_members_in_file_scope.h (renamed from testing/072_no_xml_namespace_members_in_file_scope.h)2
-rw-r--r--testing/078/078__xml__namespace__members__in__file__scope_8h.xml (renamed from testing/073/073__xml__namespace__members__in__file__scope_8h.xml)14
-rw-r--r--testing/078_xml_namespace_members_in_file_scope.h (renamed from testing/073_xml_namespace_members_in_file_scope.h)4
6 files changed, 26 insertions, 21 deletions
diff --git a/src/config.xml b/src/config.xml
index 13ae663..00a972d 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -2945,10 +2945,10 @@ or
]]>
</docs>
</option>
- <option type='bool' id='XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE' defval='0' depends='GENERATE_XML'>
+ <option type='bool' id='XML_NS_MEMB_FILE_SCOPE' defval='0' depends='GENERATE_XML'>
<docs>
<![CDATA[
- If the \c XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE tag is set to \c YES, doxygen
+ If the \c XML_NS_MEMB_FILE_SCOPE tag is set to \c YES, doxygen
will include namespace members in file scope as well, matching the HTML
output.
]]>
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 985a3e7..bacf4d4 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1015,6 +1015,15 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De
t << " </memberdef>" << endl;
}
+// namespace members are also inserted in the file scope, but
+// to prevent this duplication in the XML output, we optionally filter those here.
+static bool memberVisible(Definition *d,MemberDef *md)
+{
+ return Config_getBool(XML_NS_MEMB_FILE_SCOPE) ||
+ d->definitionType()!=Definition::TypeFile ||
+ md->getNamespaceDef()==0;
+}
+
static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
MemberList *ml,const char *kind,const char *header=0,
const char *documentation=0)
@@ -1025,9 +1034,7 @@ static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
int count=0;
for (mli.toFirst();(md=mli.current());++mli)
{
- // namespace members are also inserted in the file scope, but
- // to prevent this duplication in the XML output, we filter those here.
- if ((Config_getBool(XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE) || d->definitionType()!=Definition::TypeFile) || md->getNamespaceDef()==0)
+ if (memberVisible(d,md))
{
count++;
}
@@ -1047,9 +1054,7 @@ static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
}
for (mli.toFirst();(md=mli.current());++mli)
{
- // namespace members are also inserted in the file scope, but
- // to prevent this duplication in the XML output, we filter those here.
- if ((Config_getBool(XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE) || d->definitionType()!=Definition::TypeFile) || md->getNamespaceDef()==0)
+ if (memberVisible(d,md))
{
generateXMLForMember(md,ti,t,d);
}
diff --git a/testing/072/072__no__xml__namespace__members__in__file__scope_8h.xml b/testing/077/077__no__xml__namespace__members__in__file__scope_8h.xml
index 0245802..9825cc1 100644
--- a/testing/072/072__no__xml__namespace__members__in__file__scope_8h.xml
+++ b/testing/077/077__no__xml__namespace__members__in__file__scope_8h.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
- <compounddef id="072__no__xml__namespace__members__in__file__scope_8h" kind="file" language="C++">
- <compoundname>072_no_xml_namespace_members_in_file_scope.h</compoundname>
+ <compounddef id="077__no__xml__namespace__members__in__file__scope_8h" kind="file" language="C++">
+ <compoundname>077_no_xml_namespace_members_in_file_scope.h</compoundname>
<innernamespace refid="namespace_namespace">Namespace</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
- <location file="072_no_xml_namespace_members_in_file_scope.h"/>
+ <location file="077_no_xml_namespace_members_in_file_scope.h"/>
</compounddef>
</doxygen>
diff --git a/testing/072_no_xml_namespace_members_in_file_scope.h b/testing/077_no_xml_namespace_members_in_file_scope.h
index fb1afab..bf3dc64 100644
--- a/testing/072_no_xml_namespace_members_in_file_scope.h
+++ b/testing/077_no_xml_namespace_members_in_file_scope.h
@@ -1,5 +1,5 @@
// objective: test that namespace members are not put to file docs by default
-// check: 072__no__xml__namespace__members__in__file__scope_8h.xml
+// check: 077__no__xml__namespace__members__in__file__scope_8h.xml
namespace Namespace {
diff --git a/testing/073/073__xml__namespace__members__in__file__scope_8h.xml b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml
index e8637a2..e0a0343 100644
--- a/testing/073/073__xml__namespace__members__in__file__scope_8h.xml
+++ b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
- <compounddef id="073__xml__namespace__members__in__file__scope_8h" kind="file" language="C++">
- <compoundname>073_xml_namespace_members_in_file_scope.h</compoundname>
+ <compounddef id="078__xml__namespace__members__in__file__scope_8h" kind="file" language="C++">
+ <compoundname>078_xml_namespace_members_in_file_scope.h</compoundname>
<innernamespace refid="namespace_namespace">Namespace</innernamespace>
<sectiondef kind="enum">
- <memberdef kind="enum" id="073__xml__namespace__members__in__file__scope_8h_1add172b93283b1ab7612c3ca6cc5dcfea" prot="public" static="no" strong="yes">
+ <memberdef kind="enum" id="078__xml__namespace__members__in__file__scope_8h_1add172b93283b1ab7612c3ca6cc5dcfea" prot="public" static="no" strong="yes">
<type/>
<name>Enum</name>
<briefdescription>
@@ -14,11 +14,11 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
- <location file="073_xml_namespace_members_in_file_scope.h" line="15" column="1" bodyfile="073_xml_namespace_members_in_file_scope.h" bodystart="15" bodyend="15"/>
+ <location file="078_xml_namespace_members_in_file_scope.h" line="15" column="1" bodyfile="078_xml_namespace_members_in_file_scope.h" bodystart="15" bodyend="15"/>
</memberdef>
</sectiondef>
<sectiondef kind="func">
- <memberdef kind="function" id="073__xml__namespace__members__in__file__scope_8h_1a0f1fe1a972c7c4196988a1bdde63ec77" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <memberdef kind="function" id="078__xml__namespace__members__in__file__scope_8h_1a0f1fe1a972c7c4196988a1bdde63ec77" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>void Namespace::foo</definition>
<argsstring>()</argsstring>
@@ -31,13 +31,13 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
- <location file="073_xml_namespace_members_in_file_scope.h" line="12" column="1"/>
+ <location file="078_xml_namespace_members_in_file_scope.h" line="12" column="1"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
- <location file="073_xml_namespace_members_in_file_scope.h"/>
+ <location file="078_xml_namespace_members_in_file_scope.h"/>
</compounddef>
</doxygen>
diff --git a/testing/073_xml_namespace_members_in_file_scope.h b/testing/078_xml_namespace_members_in_file_scope.h
index 3f37025..f456464 100644
--- a/testing/073_xml_namespace_members_in_file_scope.h
+++ b/testing/078_xml_namespace_members_in_file_scope.h
@@ -1,6 +1,6 @@
// objective: test that namespace members are put to file docs when enabled
-// check: 073__xml__namespace__members__in__file__scope_8h.xml
-// config: XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE = YES
+// check: 078__xml__namespace__members__in__file__scope_8h.xml
+// config: XML_NS_MEMB_FILE_SCOPE = YES
namespace Namespace {