summaryrefslogtreecommitdiffstats
path: root/src/namespacedef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-05-17 19:26:02 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-05-17 19:26:02 (GMT)
commit0921be2562e370352af05de47c5d997321874012 (patch)
treecb90fc9b85934eb220249aae4ffd7e4979489b16 /src/namespacedef.cpp
parent76e77e750cda807a7aa12d73d1fa0e5e6f24b043 (diff)
downloadDoxygen-0921be2562e370352af05de47c5d997321874012.zip
Doxygen-0921be2562e370352af05de47c5d997321874012.tar.gz
Doxygen-0921be2562e370352af05de47c5d997321874012.tar.bz2
Release-20010517
Diffstat (limited to 'src/namespacedef.cpp')
-rw-r--r--src/namespacedef.cpp51
1 files changed, 36 insertions, 15 deletions
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index efcd10f..7df4850 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -32,23 +32,22 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
Definition(df,dl,name)
{
fileName=(QCString)"namespace_"+name;
- classList = new ClassList;
- classDict = new ClassDict(1009);
- //memList = new MemberList;
+ classSDict = new ClassSDict(257);
+ namespaceSDict = new NamespaceSDict(257);
+ m_innerCompounds = new SDict<Definition>(257);
usingDirList = 0;
usingDeclList = 0;
setReference(lref);
memberGroupList = new MemberGroupList;
memberGroupList->setAutoDelete(TRUE);
memberGroupDict = new MemberGroupDict(1009);
- defFileName = df;
- defLine = dl;
}
NamespaceDef::~NamespaceDef()
{
- delete classList;
- delete classDict;
+ delete classSDict;
+ delete namespaceSDict;
+ delete m_innerCompounds;
delete usingDirList;
delete usingDeclList;
delete memberGroupList;
@@ -77,13 +76,23 @@ void NamespaceDef::insertUsedFile(const char *f)
void NamespaceDef::insertClass(ClassDef *cd)
{
- if (classDict->find(cd->name())==0)
+ if (classSDict->find(cd->name())==0)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
- classList->inSort(cd);
+ classSDict->inSort(cd->name(),cd);
else
- classList->append(cd);
- classDict->insert(cd->name(),cd);
+ classSDict->append(cd->name(),cd);
+ }
+}
+
+void NamespaceDef::insertNamespace(NamespaceDef *nd)
+{
+ if (namespaceSDict->find(nd->name())==0)
+ {
+ if (Config_getBool("SORT_MEMBER_DOCS"))
+ namespaceSDict->inSort(nd->name(),nd);
+ else
+ namespaceSDict->append(nd->name(),nd);
}
}
@@ -219,7 +228,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty())
{
- parseDoc(briefOutput,defFileName,defLine,name(),0,briefDescription());
+ parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
ol+=briefOutput;
ol.writeString(" \n");
ol.pushGeneratorState();
@@ -237,7 +246,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.endTextBlock();
ol.startMemberSections();
- classList->writeDeclaration(ol);
+ classSDict->writeDeclaration(ol);
/* write user defined member groups */
MemberGroupListIterator mgli(*memberGroupList);
@@ -283,7 +292,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
}
if (!documentation().isEmpty())
{
- parseDoc(ol,defFileName,defLine,name(),0,documentation()+"\n");
+ parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
ol.newParagraph();
}
ol.endTextBlock();
@@ -328,7 +337,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
int NamespaceDef::countMembers()
{
allMemberList.countDocMembers();
- return allMemberList.numDocMembers()+classList->count();
+ return allMemberList.numDocMembers()+classSDict->count();
}
void NamespaceDef::addUsingDirective(NamespaceDef *nd)
@@ -354,3 +363,15 @@ QCString NamespaceDef::getOutputFileBase() const
return convertNameToFile(fileName);
}
+Definition *NamespaceDef::findInnerCompound(const char *name)
+{
+ if (name==0) return 0;
+ return m_innerCompounds->find(name);
+}
+
+void NamespaceDef::addInnerCompound(Definition *d)
+{
+ m_innerCompounds->append(d->localName(),d);
+}
+
+