summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVladimír Vondruš <mosra@centrum.cz>2018-02-09 22:11:38 (GMT)
committerVladimír Vondruš <mosra@centrum.cz>2018-02-10 13:37:08 (GMT)
commitf5ed5051c0754f9c7e0e5556114e173016d7f984 (patch)
treeed39dd57ef9f41b54ce57c60721025a791b11846 /src
parentb6f01ff09b17e5c2288f2418ef0a8f074456c357 (diff)
downloadDoxygen-f5ed5051c0754f9c7e0e5556114e173016d7f984.zip
Doxygen-f5ed5051c0754f9c7e0e5556114e173016d7f984.tar.gz
Doxygen-f5ed5051c0754f9c7e0e5556114e173016d7f984.tar.bz2
Make it possible to list namespace members in file scope for XML output.
For better consistency with the HTML output, where each file documentation lists (and links to) all members of given namespace. This also makes it possible to be consistent with the HTML output in case a namespace is not documented and thus all its member detailed docs should be put into corresponding file docs instead. In order to be backwards compatible and avoid breaking stuff for existing users of the XML output, this is controlled by a new XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE configuration option that defaults to NO. Note that this, unlike the HTML output, will put the whole detailed docs into the file scope instead of just listing them. It's up to the user of the XML output to deduplicate this information. It can be done for example by comparing member ID prefixes with compound ID -- íf different, the detailed docs are already somewhere else.
Diffstat (limited to 'src')
-rw-r--r--src/config.xml9
-rw-r--r--src/xmlgen.cpp4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/config.xml b/src/config.xml
index 38dfefb..2c9212a 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -2881,6 +2881,15 @@ or
]]>
</docs>
</option>
+ <option type='bool' id='XML_NAMESPACE_MEMBERS_IN_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
+ will include namespace members in file scope as well, matching the HTML
+ output.
+]]>
+ </docs>
+ </option>
</group>
<group name='Docbook' docs='Configuration options related to the DOCBOOK output'>
<option type='bool' id='GENERATE_DOCBOOK' defval='0'>
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 697a4d8..0f46c6e 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1052,7 +1052,7 @@ static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
- if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ if ((Config_getBool(XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE) || d->definitionType()!=Definition::TypeFile) || md->getNamespaceDef()==0)
{
count++;
}
@@ -1074,7 +1074,7 @@ static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
{
// namespace members are also inserted in the file scope, but
// to prevent this duplication in the XML output, we filter those here.
- if (d->definitionType()!=Definition::TypeFile || md->getNamespaceDef()==0)
+ if ((Config_getBool(XML_NAMESPACE_MEMBERS_IN_FILE_SCOPE) || d->definitionType()!=Definition::TypeFile) || md->getNamespaceDef()==0)
{
generateXMLForMember(md,ti,t,d);
}