diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-05 17:53:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-11-09 18:47:45 (GMT) |
commit | 075229e586b391c3ec7ad79597aaeae392ca64e5 (patch) | |
tree | 2ad99929371727ad0811a55e597fa81a70ba43a7 /src/pagedef.cpp | |
parent | 6922d5d63d77c8f640c58e9c68a9955f9f0aa9a7 (diff) | |
download | Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.zip Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.tar.gz Doxygen-075229e586b391c3ec7ad79597aaeae392ca64e5.tar.bz2 |
Refactoring: Introduce immutable and mutable interfaces
Split Definition/ClassDef/NamespaceDef/MemberDef into a immutable and mutable part
Aliases are immutable, other symbols are stored using an immutable
interface but can be made mutable explicitly by dynamic casting.
Diffstat (limited to 'src/pagedef.cpp')
-rw-r--r-- | src/pagedef.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/pagedef.cpp b/src/pagedef.cpp index 12a7bdc..15f4932 100644 --- a/src/pagedef.cpp +++ b/src/pagedef.cpp @@ -128,15 +128,18 @@ void PageDefImpl::addInnerCompound(const Definition *const_def) { Definition *def = const_cast<Definition*>(const_def); // uck: fix me PageDef *pd = dynamic_cast<PageDef*>(def); - m_subPageDict->append(pd->name(),pd); - def->setOuterScope(this); - if (this==Doxygen::mainPage) + if (pd) { - pd->setNestingLevel(m_nestingLevel); - } - else - { - pd->setNestingLevel(m_nestingLevel+1); + m_subPageDict->append(pd->name(),pd); + pd->setOuterScope(this); + if (this==Doxygen::mainPage) + { + pd->setNestingLevel(m_nestingLevel); + } + else + { + pd->setNestingLevel(m_nestingLevel+1); + } } } } @@ -209,7 +212,11 @@ void PageDefImpl::writeDocumentation(OutputList &ol) { if (getOuterScope()!=Doxygen::globalScope && !Config_getBool(DISABLE_INDEX)) { - getOuterScope()->writeNavigationPath(ol); + DefinitionMutable *outerScope = Definition::make_mutable(getOuterScope()); + if (outerScope) + { + outerScope->writeNavigationPath(ol); + } } ol.endQuickIndices(); } |