summaryrefslogtreecommitdiffstats
path: root/src/namespacedef.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-08-14 13:56:38 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2011-08-14 13:56:38 (GMT)
commit9e5aed6d58f0e33ca942f67daa49971d885b0110 (patch)
tree3138a0d18d53a00498b4cad59f934a4e64762cf8 /src/namespacedef.cpp
parent3426c85df5daa8d679bc2ed87740ccbc34d6346b (diff)
downloadDoxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.zip
Doxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.tar.gz
Doxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.tar.bz2
Release-1.7.5
Diffstat (limited to 'src/namespacedef.cpp')
-rw-r--r--src/namespacedef.cpp50
1 files changed, 21 insertions, 29 deletions
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index cc2d57b..69e016e 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -57,7 +57,6 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
memberGroupSDict->setAutoDelete(TRUE);
visited=FALSE;
m_subGrouping=Config_getBool("SUBGROUPING");
- m_isCSharp = df && getLanguageFromFileName(df)==SrcLangExt_CSharp;
}
NamespaceDef::~NamespaceDef()
@@ -416,16 +415,17 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol)
void NamespaceDef::writeDocumentation(OutputList &ol)
{
- static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
- static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //static bool outputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ SrcLangExt lang = getLanguage();
QCString pageTitle;
- if (outputJava)
+ if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
pageTitle = theTranslator->trPackage(displayName());
}
- else if (fortranOpt)
+ else if (lang==SrcLangExt_Fortran)
{
pageTitle = theTranslator->trModuleReference(displayName());
}
@@ -445,7 +445,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
startTitle(ol,getOutputFileBase(),this);
- ol.parseText(pageTitle,TRUE);
+ ol.parseText(pageTitle);
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),displayName());
ol.startContents();
@@ -715,12 +715,14 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
void NamespaceDef::addListReferences()
{
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
+ //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
{
LockingPtr< QList<ListItemInfo> > xrefItems = xrefListItems();
addRefItem(xrefItems.pointer(),
qualifiedName(),
- fortranOpt?theTranslator->trModule(TRUE,TRUE):theTranslator->trNamespace(TRUE,TRUE),
+ getLanguage()==SrcLangExt_Fortran ?
+ theTranslator->trModule(TRUE,TRUE) :
+ theTranslator->trNamespace(TRUE,TRUE),
getOutputFileBase(),displayName(),
0
);
@@ -745,10 +747,13 @@ void NamespaceDef::addListReferences()
QCString NamespaceDef::displayName() const
{
QCString result=name();
- if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
+ SrcLangExt lang = getLanguage();
+ QCString sep = getLanguageSpecificSeparator(lang);
+ if (sep!="::")
{
- result = substitute(result,"::",".");
+ result = substitute(result,"::",sep);
}
+ //printf("NamespaceDef::displayName() %s->%s lang=%d\n",name().data(),result.data(),lang);
return result;
}
@@ -821,22 +826,8 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
// write list of namespaces
ol.startMemberHeader("namespaces");
- bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
- bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
-#if 0
- if (javaOpt)
- {
- ol.parseText(theTranslator->trPackages());
- }
- else if (fortranOpt)
- {
- ol.parseText(theTranslator->trModules());
- }
- else
- {
- ol.parseText(theTranslator->trNamespaces());
- }
-#endif
+ //bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
+ //bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
ol.parseText(title);
ol.endMemberHeader();
ol.startMemberList();
@@ -844,12 +835,13 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca
{
if (nd->isLinkable())
{
+ SrcLangExt lang = nd->getLanguage();
ol.startMemberItem(0);
- if (javaOpt)
+ if (lang==SrcLangExt_Java || lang==SrcLangExt_CSharp)
{
ol.docify("package ");
}
- else if (fortranOpt)
+ else if (lang==SrcLangExt_Fortran)
{
ol.docify("module ");
}
@@ -975,7 +967,7 @@ bool NamespaceDef::isLinkableInProject() const
return TRUE;
}
return !name().isEmpty() && name().at(i)!='@' && // not anonymous
- (hasDocumentation() || m_isCSharp) && // documented
+ (hasDocumentation() || getLanguage()==SrcLangExt_CSharp) && // documented
!isReference() && // not an external reference
!isHidden() && // not hidden
!isArtificial() && // or artificial