summaryrefslogtreecommitdiffstats
path: root/src/namespacedef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-29 08:47:51 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-29 08:47:51 (GMT)
commit744d1ca52e25dfa9e3d656056d87ed7cb6320585 (patch)
tree4829b62cf252449983b94d46c0cf167d3442c62e /src/namespacedef.cpp
parent2912829ca5bced897a2c063d1883b9cfd39d3bd9 (diff)
downloadDoxygen-744d1ca52e25dfa9e3d656056d87ed7cb6320585.zip
Doxygen-744d1ca52e25dfa9e3d656056d87ed7cb6320585.tar.gz
Doxygen-744d1ca52e25dfa9e3d656056d87ed7cb6320585.tar.bz2
More work on the template and context mechanisms
Diffstat (limited to 'src/namespacedef.cpp')
-rw-r--r--src/namespacedef.cpp56
1 files changed, 33 insertions, 23 deletions
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index d00d845..c39b38f 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -916,29 +916,9 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
continue; // will be output in another pass, see layout_default.xml
ol.startMemberDeclaration();
ol.startMemberItem(nd->getOutputFileBase(),0);
- if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
- {
- ol.docify("package ");
- }
- else if (lang==SrcLangExt_Fortran)
- {
- ol.docify("module ");
- }
- else if (lang==SrcLangExt_IDL)
- {
- if (nd->isModule())
- {
- ol.docify("module ");
- }
- else if (nd->isConstantGroup())
- {
- ol.docify("constants");
- }
- else
- {
- err("Internal inconsistency: namespace in IDL not module or cg\n");
- }
- }
+ QCString ct = nd->compoundTypeString();
+ ol.docify(ct);
+ ol.docify(" ");
ol.insertMemberAlign();
QCString name;
if (localName)
@@ -1103,3 +1083,33 @@ QCString NamespaceDef::title() const
}
return pageTitle;
}
+
+QCString NamespaceDef::compoundTypeString() const
+{
+ SrcLangExt lang = getLanguage();
+ if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
+ {
+ return "package";
+ }
+ else if (lang==SrcLangExt_Fortran)
+ {
+ return "module";
+ }
+ else if (lang==SrcLangExt_IDL)
+ {
+ if (isModule())
+ {
+ return "module";
+ }
+ else if (isConstantGroup())
+ {
+ return "constants";
+ }
+ else
+ {
+ err("Internal inconsistency: namespace in IDL not module or constant group\n");
+ }
+ }
+ return "";
+}
+