diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-05-17 19:26:02 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-05-17 19:26:02 (GMT) |
commit | 75fed7362598edf5a7210505cd38c92821863a39 (patch) | |
tree | cb90fc9b85934eb220249aae4ffd7e4979489b16 /src/namespacedef.cpp | |
parent | f5f5db18c34651c19f63a972e70087ce2131e764 (diff) | |
download | Doxygen-75fed7362598edf5a7210505cd38c92821863a39.zip Doxygen-75fed7362598edf5a7210505cd38c92821863a39.tar.gz Doxygen-75fed7362598edf5a7210505cd38c92821863a39.tar.bz2 |
Release-20010517
Diffstat (limited to 'src/namespacedef.cpp')
-rw-r--r-- | src/namespacedef.cpp | 51 |
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); +} + + |