Skip to main content

The index.cpp File Reference

This file contains functions for the various index pages. More...

Included Headers

#include <cstdlib> #include <array> #include <assert.h> #include "message.h" #include "index.h" #include "indexlist.h" #include "doxygen.h" #include "config.h" #include "filedef.h" #include "outputlist.h" #include "util.h" #include "groupdef.h" #include "language.h" #include "htmlgen.h" #include "htmlhelp.h" #include "ftvhelp.h" #include "dot.h" #include "dotgfxhierarchytable.h" #include "dotlegendgraph.h" #include "pagedef.h" #include "dirdef.h" #include "vhdldocgen.h" #include "layout.h" #include "memberlist.h" #include "classlist.h" #include "namespacedef.h" #include "filename.h" #include "tooltip.h" #include "utf8.h" #include "portable.h" #include "moduledef.h" #include "sitemap.h"

Classes Index

structPrivate
classAlphaIndexTableCell

Class representing a cell in the alphabetical class index. More...

structAnnotatedIndexContext
structCmhlInfo

Helper class representing a class member in the navigation menu. More...

structFmhlInfo

Helper class representing a file member in the navigation menu. More...

structNmhlInfo

Helper class representing a namespace member in the navigation menu. More...

structMmhlInfo

Helper class representing a module member in the navigation menu. More...

Typedefs Index

usingUsedIndexLetters = std::set< std::string >

Functions Index

static intcountClassHierarchy (ClassDef::CompoundType ct)
static voidcountFiles (int &htmlFiles, int &files)
static intcountGroups ()
static intcountDirs ()
static intcountNamespaces ()
static intcountConcepts ()
static intcountAnnotatedClasses (int *cp, ClassDef::CompoundType ct)
static voidcountRelatedPages (int &docPages, int &indexPages)
static voidMemberIndexMap_add (Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
static voidstartIndexHierarchy (OutputList &ol, int level)
static voidendIndexHierarchy (OutputList &ol, int level)
static voidstartQuickIndexList (OutputList &ol, bool letterTabs=FALSE)
static voidendQuickIndexList (OutputList &ol)
static voidstartQuickIndexItem (OutputList &ol, const QCString &l, bool hl, bool, bool &first)
static voidendQuickIndexItem (OutputList &ol)
voidstartTitle (OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
voidendTitle (OutputList &ol, const QCString &fileName, const QCString &name)
voidstartFile (OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
voidendFile (OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
voidendFileWithNavPath (OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
static voidwriteMemberToIndex (const Definition *def, const MemberDef *md, bool addToIndex)
template <class T>
voidaddMembersToIndex (T *def, LayoutDocManager::LayoutPart part, const QCString &name, const QCString &anchor, bool addToIndex=TRUE, bool preventSeparateIndex=FALSE, const ConceptLinkedRefMap *concepts=nullptr)
static voidwriteClassTreeToOutput (OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
static booldirHasVisibleChildren (const DirDef *dd)
static voidwriteDirTreeNode (OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
static voidwriteDirHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static voidwriteClassTreeForList (OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
static voidwriteClassHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
static intcountClassesInTreeList (const ClassLinkedMap &cl, ClassDef::CompoundType ct)
static voidwriteHierarchicalIndex (OutputList &ol)
static voidwriteGraphicalClassHierarchy (OutputList &ol)
static voidwriteHierarchicalInterfaceIndex (OutputList &ol)
static voidwriteGraphicalInterfaceHierarchy (OutputList &ol)
static voidwriteHierarchicalExceptionIndex (OutputList &ol)
static voidwriteGraphicalExceptionHierarchy (OutputList &ol)
static voidwriteSingleFileIndex (OutputList &ol, const FileDef *fd)
static voidwriteFileIndex (OutputList &ol)
template <typename Ptr>
const ClassDef *get_pointer (const Ptr &p)
const ClassDef *get_pointer (const ClassLinkedMap::Ptr &p)
const ClassDef *get_pointer (const ClassLinkedRefMap::Ptr &p)
template <class ListType>
static voidwriteClassTree (const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
static voidwriteNamespaceMembers (const NamespaceDef *nd, bool addToIndex)
static voidwriteModuleMembers (const ModuleDef *mod, bool addToIndex)
static voidwriteConceptList (const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
static voidwriteNamespaceTree (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static voidwriteNamespaceTreeElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static voidwriteNamespaceTree (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static voidwriteClassTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static voidwriteClassTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static voidwriteClassTreeInsideNamespace (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static voidwriteNamespaceIndex (OutputList &ol)
static voidwriteAnnotatedClassList (OutputList &ol, ClassDef::CompoundType ct)
boolisId1 (int c)
static QCStringletterToLabel (const QCString &startLetter)
static voidwriteAlphabeticalClassList (OutputList &ol, ClassDef::CompoundType ct, int)
static voidwriteAlphabeticalIndex (OutputList &ol)
static voidwriteAlphabeticalInterfaceIndex (OutputList &ol)
static voidwriteAlphabeticalStructIndex (OutputList &ol)
static voidwriteAlphabeticalExceptionIndex (OutputList &ol)
static voidwriteAnnotatedIndexGeneric (OutputList &ol, const AnnotatedIndexContext ctx)
static voidwriteAnnotatedIndex (OutputList &ol)
static voidwriteAnnotatedInterfaceIndex (OutputList &ol)
static voidwriteAnnotatedStructIndex (OutputList &ol)
static voidwriteAnnotatedExceptionIndex (OutputList &ol)
static voidwriteClassLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
static voidwriteFileLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
static voidwriteNamespaceLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
static voidwriteModuleLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
static voidwriteMemberList (OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
static voidwriteQuickMemberIndex (OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
static const CmhlInfo *getCmhlInfo (size_t hl)
static voidwriteClassMemberIndexFiltered (OutputList &ol, ClassMemberHighlight::Enum hl)
static voidwriteClassMemberIndex (OutputList &ol)
static const FmhlInfo *getFmhlInfo (size_t hl)
static voidwriteFileMemberIndexFiltered (OutputList &ol, FileMemberHighlight::Enum hl)
static voidwriteFileMemberIndex (OutputList &ol)
static const NmhlInfo *getNmhlInfo (size_t hl)
static voidwriteNamespaceMemberIndexFiltered (OutputList &ol, NamespaceMemberHighlight::Enum hl)
static voidwriteNamespaceMemberIndex (OutputList &ol)
static const MmhlInfo *getMmhlInfo (size_t hl)
static voidwriteModuleMemberIndexFiltered (OutputList &ol, ModuleMemberHighlight::Enum hl)
static voidwriteModuleMemberIndex (OutputList &ol)
static voidwriteExampleIndex (OutputList &ol)
static boolmainPageHasOwnTitle ()
static voidwritePages (PageDef *pd, FTVHelp *ftv)
static voidwritePageIndex (OutputList &ol)
voidwriteGraphInfo (OutputList &ol)
static voidwriteGroupTreeNode (OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
static voidwriteGroupHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static voidwriteTopicIndex (OutputList &ol)
static voidwriteModuleTreeNode (OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
static voidwriteModuleList (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static voidwriteModuleIndex (OutputList &ol)
static voidwriteConceptTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static voidwriteConceptTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static voidwriteConceptRootList (FTVHelp *ftv, bool addToIndex)
static voidwriteConceptIndex (OutputList &ol)
static voidwriteUserGroupStubPage (OutputList &ol, LayoutNavEntry *lne)
static voidwriteIndex (OutputList &ol)
static voidwriteIndexHierarchyEntries (OutputList &ol, const LayoutNavEntryList &entries)
static boolquickLinkVisible (LayoutNavEntry::Kind kind)
template <class T>
voidrenderMemberIndicesAsJs (std::ostream &t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*getInfo)(size_t hl), std::size_t total)
static boolrenderQuickLinksAsJs (std::ostream &t, LayoutNavEntry *root, bool first)
static voidwriteMenuData ()
voidwriteIndexHierarchy (OutputList &ol)

Variables Index

const intmaxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX
static std::vector< bool >indexWritten

Macro Definitions Index

#defineMAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200
#defineMAX_ITEMS_BEFORE_QUICK_INDEX   30

Description

This file contains functions for the various index pages.

Typedefs

UsedIndexLetters

using UsedIndexLetters = std::set<std::string>

Definition at line 2249 of file index.cpp.

2249using UsedIndexLetters = std::set<std::string>;

Functions

addMembersToIndex()

template <class T>
void addMembersToIndex (T * def, LayoutDocManager::LayoutPart part, const QCString & name, const QCString & anchor, bool addToIndex=TRUE, bool preventSeparateIndex=FALSE, const ConceptLinkedRefMap * concepts=nullptr)

Definition at line 528 of file index.cpp.

529 const QCString &name,const QCString &anchor,
530 bool addToIndex=TRUE,bool preventSeparateIndex=FALSE,
531 const ConceptLinkedRefMap *concepts = nullptr)
532
533{
534 int numClasses=0;
535 for (const auto &cd : def->getClasses())
536 {
537 if (cd->isLinkable()) numClasses++;
538 }
539 int numConcepts=0;
540 if (concepts)
541 {
542 for (const auto &cd : *concepts)
543 {
544 if (cd->isLinkable()) numConcepts++;
545 }
546 }
547 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
548 Doxygen::indexList->addContentsItem(hasMembers,name,
549 def->getReference(),def->getOutputFileBase(),anchor,
550 hasMembers && !preventSeparateIndex,
551 addToIndex,
552 def);
553 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
554 if (hasMembers || numClasses>0 || numConcepts>0)
555 {
556 Doxygen::indexList->incContentsDepth();
557 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
558 {
559 auto kind = lde->kind();
560 if (kind==LayoutDocEntry::MemberDef)
561 {
562 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
563 if (lmd)
564 {
565 MemberList *ml = def->getMemberList(lmd->type);
566 if (ml)
567 {
568 for (const auto &md : *ml)
569 {
570 if (md->visibleInIndex())
571 {
572 writeMemberToIndex(def,md,addToIndex);
573 }
574 }
575 }
576 }
577 }
578 else if (kind==LayoutDocEntry::NamespaceClasses ||
579 kind==LayoutDocEntry::FileClasses ||
580 kind==LayoutDocEntry::ClassNestedClasses ||
581 kind==LayoutDocEntry::ModuleClasses
582 )
583 {
584 for (const auto &cd : def->getClasses())
585 {
586 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
587 {
588 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
589 bool isNestedClass = def->definitionType()==Definition::TypeClass;
590 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
591 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
592 preventSeparateIndex || cd->isEmbeddedInOuterScope());
593 }
594 }
595 }
596 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
597 {
598 for (const auto &cd : *concepts)
599 {
600 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
601 {
602 Doxygen::indexList->addContentsItem(false,cd->displayName(),
603 cd->getReference(),cd->getOutputFileBase(),QCString(),
604 addToIndex,
605 false,
606 cd);
607 }
608 }
609 }
610 }
611
612 Doxygen::indexList->decContentsDepth();
613 }
614}

References addMembersToIndex, Config_getBool, FALSE, Doxygen::indexList, LayoutDocManager::instance, TRUE, LayoutDocEntryMemberDef::type, Definition::TypeClass, Definition::TypeGroup and writeMemberToIndex.

countAnnotatedClasses()

int countAnnotatedClasses (int * cp, ClassDef::CompoundType ct)
static

Definition at line 2100 of file index.cpp.

2101{
2102 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2103 int count=0;
2104 int countPrinted=0;
2105 for (const auto &cd : *Doxygen::classLinkedMap)
2106 {
2107 if (sliceOpt && cd->compoundType() != ct)
2108 {
2109 continue;
2110 }
2111 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2112 {
2113 if (!cd->isEmbeddedInOuterScope())
2114 {
2115 countPrinted++;
2116 }
2117 count++;
2118 }
2119 }
2120 *cp = countPrinted;
2121 return count;
2122}

References Doxygen::classLinkedMap and Config_getBool.

Referenced by Index::countDataStructures.

countClassesInTreeList()

int countClassesInTreeList (const ClassLinkedMap & cl, ClassDef::CompoundType ct)
static

Definition at line 1090 of file index.cpp.

1091{
1092 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1093 int count=0;
1094 for (const auto &cd : cl)
1095 {
1096 if (sliceOpt && cd->compoundType() != ct)
1097 {
1098 continue;
1099 }
1100 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1101 {
1102 if (cd->isVisibleInHierarchy()) // should it be visible
1103 {
1104 if (!cd->subClasses().empty()) // should have sub classes
1105 {
1106 count++;
1107 }
1108 }
1109 }
1110 }
1111 return count;
1112}

References classHasVisibleRoot and Config_getBool.

Referenced by countClassHierarchy.

countClassHierarchy()

int countClassHierarchy (ClassDef::CompoundType ct)
static

Definition at line 1114 of file index.cpp.

1115{
1116 int count=0;
1119 return count;
1120}

References Doxygen::classLinkedMap, countClassesInTreeList and Doxygen::hiddenClassLinkedMap.

Referenced by Index::countDataStructures.

countConcepts()

int countConcepts ()
static

Definition at line 1681 of file index.cpp.

1681static int countConcepts()
1682{
1683 int count=0;
1684 for (const auto &cd : *Doxygen::conceptLinkedMap)
1685 {
1686 if (cd->isLinkableInProject()) count++;
1687 }
1688 return count;
1689}

Reference Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures.

countDirs()

int countDirs ()
static

Definition at line 4019 of file index.cpp.

4019static int countDirs()
4020{
4021 int count=0;
4022 for (const auto &dd : *Doxygen::dirLinkedMap)
4023 {
4024 if (dd->isLinkableInProject())
4025 {
4026 count++;
4027 }
4028 }
4029 return count;
4030}

Reference Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures.

countFiles()

void countFiles (int & htmlFiles, int & files)
static

Definition at line 1441 of file index.cpp.

1441static void countFiles(int &allFiles,int &docFiles)
1442{
1443 allFiles=0;
1444 docFiles=0;
1445 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1446 {
1447 for (const auto &fd: *fn)
1448 {
1449 bool src = false;
1450 bool doc = fileVisibleInIndex(fd.get(),src);
1451 if (doc || src)
1452 {
1453 allFiles++;
1454 }
1455 if (doc)
1456 {
1457 docFiles++;
1458 }
1459 }
1460 }
1461}

References fileVisibleInIndex and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures.

countGroups()

int countGroups ()
static

Definition at line 4003 of file index.cpp.

4003static int countGroups()
4004{
4005 int count=0;
4006 for (const auto &gd : *Doxygen::groupLinkedMap)
4007 {
4008 if (!gd->isReference())
4009 {
4010 //gd->visited=FALSE;
4011 count++;
4012 }
4013 }
4014 return count;
4015}

Reference Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures.

countNamespaces()

int countNamespaces ()
static

Definition at line 1670 of file index.cpp.

1670static int countNamespaces()
1671{
1672 int count=0;
1673 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1674 {
1675 if (nd->isLinkableInProject()) count++;
1676 }
1677 return count;
1678}

Reference Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures.

countRelatedPages()

void countRelatedPages (int & docPages, int & indexPages)
static

Definition at line 3871 of file index.cpp.

3871static void countRelatedPages(int &docPages,int &indexPages)
3872{
3873 docPages=indexPages=0;
3874 for (const auto &pd : *Doxygen::pageLinkedMap)
3875 {
3876 if (pd->visibleInIndex() && !pd->hasParentPage())
3877 {
3878 indexPages++;
3879 }
3880 if (pd->documentedPage())
3881 {
3882 docPages++;
3883 }
3884 }
3885}

Reference Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures.

dirHasVisibleChildren()

bool dirHasVisibleChildren (const DirDef * dd)
static

Definition at line 728 of file index.cpp.

728static bool dirHasVisibleChildren(const DirDef *dd)
729{
730 if (dd->hasDocumentation()) return TRUE;
731
732 for (const auto &fd : dd->getFiles())
733 {
734 bool genSourceFile = false;
735 if (fileVisibleInIndex(fd,genSourceFile))
736 {
737 return TRUE;
738 }
739 if (genSourceFile)
740 {
741 return TRUE;
742 }
743 }
744
745 for(const auto &subdd : dd->subDirs())
746 {
747 if (dirHasVisibleChildren(subdd))
748 {
749 return TRUE;
750 }
751 }
752 return FALSE;
753}

References dirHasVisibleChildren, FALSE, fileVisibleInIndex, DirDef::getFiles, Definition::hasDocumentation, DirDef::subDirs and TRUE.

Referenced by dirHasVisibleChildren and writeDirTreeNode.

endFile()

void endFile (OutputList & ol, bool skipNavIndex, bool skipEndContents, const QCString & navPath)

Definition at line 427 of file index.cpp.

427void endFile(OutputList &ol,bool skipNavIndex,bool skipEndContents,
428 const QCString &navPath)
429{
430 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
433 if (!skipNavIndex)
434 {
435 if (!skipEndContents) ol.endContents();
436 if (generateTreeView)
437 {
438 ol.writeString("</div><!-- doc-content -->\n");
439 ol.writeString("</div><!-- container -->\n");
440 }
441 }
442
443 ol.writeFooter(navPath); // write the footer
445 ol.endFile();
446}

References Config_getBool, OutputList::disableAllBut, OutputList::endContents, OutputList::endFile, Html, OutputList::popGeneratorState, OutputList::pushGeneratorState, OutputList::writeFooter and OutputList::writeString.

Referenced by endFileWithNavPath, generateExampleDocs, writeAlphabeticalExceptionIndex, writeAlphabeticalIndex, writeAlphabeticalInterfaceIndex, writeAlphabeticalStructIndex, writeAnnotatedIndexGeneric, writeClassMemberIndexFiltered, writeConceptIndex, GroupDefImpl::writeDocumentation, ModuleDefImpl::writeDocumentation, PageDefImpl::writeDocumentation, MemberList::writeDocumentationPage, writeExampleIndex, writeFileIndex, writeFileMemberIndexFiltered, writeGraphicalClassHierarchy, writeGraphicalExceptionHierarchy, writeGraphicalInterfaceHierarchy, writeGraphInfo, writeHierarchicalExceptionIndex, writeHierarchicalIndex, writeHierarchicalInterfaceIndex, writeIndex, ClassDefImpl::writeMemberList, writeModuleIndex, writeModuleMemberIndexFiltered, writeNamespaceIndex, writeNamespaceMemberIndexFiltered, writePageIndex, writeTopicIndex and writeUserGroupStubPage.

endFileWithNavPath()

void endFileWithNavPath (OutputList & ol, const DefinitionMutable * d, bool showPageNavigation)

Definition at line 448 of file index.cpp.

448void endFileWithNavPath(OutputList &ol,const DefinitionMutable *d,bool showPageNavigation)
449{
450 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
451 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
452 QCString navPath;
453 if (generateTreeview)
454 {
457 ol.writeString("</div><!-- doc-content -->\n");
458 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
459 ol.writeString("</div><!-- container -->\n");
461 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
462 }
463 endFile(ol,generateTreeview,TRUE,navPath);
464}

References Config_getBool, OutputList::disableAllBut, endFile, Html, Definition::navigationPathAsString, OutputList::popGeneratorState, OutputList::pushGeneratorState, toDefinition, TRUE, DefinitionMutable::writePageNavigation and OutputList::writeString.

Referenced by ClassDefImpl::writeDocumentation, ConceptDefImpl::writeDocumentation, DirDefImpl::writeDocumentation, DirRelation::writeDocumentation, FileDefImpl::writeDocumentation, NamespaceDefImpl::writeDocumentation, PageDefImpl::writeDocumentation, MemberList::writeDocumentationPage and FileDefImpl::writeSourceFooter.

endIndexHierarchy()

endQuickIndexItem()

void endQuickIndexItem (OutputList & ol)
static

Definition at line 377 of file index.cpp.

378{
379 ol.writeString("</span>");
380 ol.writeString("</a>");
381 ol.writeString("</li>\n");
382}

Reference OutputList::writeString.

Referenced by writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered, writeNamespaceMemberIndexFiltered and writeQuickMemberIndex.

endQuickIndexList()

void endQuickIndexList (OutputList & ol)
static

endTitle()

get_pointer()

template <typename Ptr>
const ClassDef * get_pointer (const Ptr & p)

Definition at line 1693 of file index.cpp.

Referenced by writeClassTree.

get_pointer()

const ClassDef * get_pointer (const ClassLinkedMap::Ptr & p)

Definition at line 1694 of file index.cpp.

1694template<> const ClassDef *get_pointer(const ClassLinkedMap::Ptr &p) { return p.get(); }

get_pointer()

const ClassDef * get_pointer (const ClassLinkedRefMap::Ptr & p)

Definition at line 1695 of file index.cpp.

1695template<> const ClassDef *get_pointer(const ClassLinkedRefMap::Ptr &p) { return p; }

getCmhlInfo()

const CmhlInfo * getCmhlInfo (size_t hl)
static

Definition at line 3082 of file index.cpp.

3082static const CmhlInfo *getCmhlInfo(size_t hl)
3083{
3084 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3085 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3086 static CmhlInfo cmhlInfo[] =
3087 {
3088 CmhlInfo("functions", theTranslator->trAll()),
3089 CmhlInfo("functions_func",
3090 fortranOpt ? theTranslator->trSubprograms() :
3091 vhdlOpt ? theTranslator->trFunctionAndProc() :
3092 theTranslator->trFunctions()),
3093 CmhlInfo("functions_vars",theTranslator->trVariables()),
3094 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3095 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3096 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3097 CmhlInfo("functions_prop",theTranslator->trProperties()),
3098 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3099 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3100 };
3101 return &cmhlInfo[hl];
3102}

References Config_getBool and theTranslator.

Referenced by renderQuickLinksAsJs and writeClassMemberIndexFiltered.

getFmhlInfo()

const FmhlInfo * getFmhlInfo (size_t hl)
static

Definition at line 3270 of file index.cpp.

3270static const FmhlInfo *getFmhlInfo(size_t hl)
3271{
3272 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3273 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3274 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3275 static FmhlInfo fmhlInfo[] =
3276 {
3277 FmhlInfo("globals", theTranslator->trAll()),
3278 FmhlInfo("globals_func",
3279 fortranOpt ? theTranslator->trSubprograms() :
3280 vhdlOpt ? theTranslator->trFunctionAndProc() :
3281 theTranslator->trFunctions()),
3282 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3283 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3284 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3285 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3286 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3287 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3288 FmhlInfo("globals_defs",theTranslator->trDefines())
3289 };
3290 return &fmhlInfo[hl];
3291}

References Config_getBool and theTranslator.

Referenced by renderQuickLinksAsJs and writeFileMemberIndexFiltered.

getMmhlInfo()

const MmhlInfo * getMmhlInfo (size_t hl)
static

Definition at line 3637 of file index.cpp.

3637static const MmhlInfo *getMmhlInfo(size_t hl)
3638{
3639 static MmhlInfo nmhlInfo[] =
3640 {
3641 MmhlInfo("modulemembers", theTranslator->trAll()),
3642 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3643 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3644 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3645 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3646 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3647 };
3648 return &nmhlInfo[hl];
3649}

Reference theTranslator.

Referenced by renderQuickLinksAsJs and writeModuleMemberIndexFiltered.

getNmhlInfo()

const NmhlInfo * getNmhlInfo (size_t hl)
static

Definition at line 3452 of file index.cpp.

3452static const NmhlInfo *getNmhlInfo(size_t hl)
3453{
3454 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3455 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3456 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3457 static NmhlInfo nmhlInfo[] =
3458 {
3459 NmhlInfo("namespacemembers", theTranslator->trAll()),
3460 NmhlInfo("namespacemembers_func",
3461 fortranOpt ? theTranslator->trSubprograms() :
3462 vhdlOpt ? theTranslator->trFunctionAndProc() :
3463 theTranslator->trFunctions()),
3464 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3465 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3466 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3467 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3468 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3469 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3470 };
3471 return &nmhlInfo[hl];
3472}

References Config_getBool and theTranslator.

Referenced by renderQuickLinksAsJs and writeNamespaceMemberIndexFiltered.

isId1()

bool isId1 (int c)
inline

Definition at line 2198 of file index.cpp.

2198inline bool isId1(int c)
2199{
2200 return (c<127 && c>31); // printable ASCII character
2201}

Referenced by letterToLabel.

letterToLabel()

QCString letterToLabel (const QCString & startLetter)
static

Definition at line 2203 of file index.cpp.

2203static QCString letterToLabel(const QCString &startLetter)
2204{
2205 if (startLetter.isEmpty()) return startLetter;
2206 const char *p = startLetter.data();
2207 char c = *p;
2208 QCString result;
2209 if (isId1(c))
2210 {
2211 result+=c;
2212 }
2213 else
2214 {
2215 result="0x";
2216 const char hex[]="0123456789abcdef";
2217 while ((c=*p++))
2218 {
2219 result+=hex[static_cast<unsigned char>(c)>>4];
2220 result+=hex[static_cast<unsigned char>(c)&0xf];
2221 }
2222 }
2223 return result;
2224}

References QCString::data, hex, QCString::isEmpty and isId1.

Referenced by renderMemberIndicesAsJs, writeAlphabeticalClassList, writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeMemberList, writeModuleMemberIndexFiltered, writeNamespaceMemberIndexFiltered and writeQuickMemberIndex.

mainPageHasOwnTitle()

bool mainPageHasOwnTitle ()
static

Definition at line 3889 of file index.cpp.

3890{
3891 QCString projectName = Config_getString(PROJECT_NAME);
3892 QCString title;
3894 {
3895 title = filterTitle(Doxygen::mainPage->title());
3896 }
3897 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3898}

References Config_getString, filterTitle, QCString::isEmpty, Doxygen::mainPage, mainPageHasTitle and qstricmp.

Referenced by writePages.

MemberIndexMap_add()

void MemberIndexMap_add (Index::MemberIndexMap & map, const std::string & letter, const MemberDef * md)
static

Definition at line 180 of file index.cpp.

180static void MemberIndexMap_add(Index::MemberIndexMap &map,const std::string &letter,const MemberDef *md)
181{
182 auto it = map.find(letter);
183 if (it!=map.end())
184 {
185 it->second.push_back(md);
186 }
187 else
188 {
189 map.emplace(letter,std::vector<const MemberDef*>({md}));
190 }
191}

Referenced by Index::incrementDocumentedClassMembers, Index::incrementDocumentedFileMembers, Index::incrementDocumentedModuleMembers and Index::incrementDocumentedNamespaceMembers.

quickLinkVisible()

bool quickLinkVisible (LayoutNavEntry::Kind kind)
static

Definition at line 5519 of file index.cpp.

5520{
5521 const auto &index = Index::instance();
5522 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5523 bool showFiles = Config_getBool(SHOW_FILES);
5524 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5525 switch (kind)
5526 {
5527 case LayoutNavEntry::MainPage: return TRUE;
5528 case LayoutNavEntry::User: return TRUE;
5529 case LayoutNavEntry::UserGroup: return TRUE;
5530 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5531 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5532 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5533 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5534 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5535 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5536 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5537 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5538 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5539 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5540 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5541 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5542 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5543 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5544 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5545 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5546 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5547 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5548 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5549 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5550 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5551 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5552 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5553 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5554 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5555 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5556 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5557 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5558 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5559 case LayoutNavEntry::None: // should never happen, means not properly initialized
5560 assert(kind != LayoutNavEntry::None);
5561 return FALSE;
5562 }
5563 return FALSE;
5564}

References ClassMemberHighlight::All, FileMemberHighlight::All, ModuleMemberHighlight::All, NamespaceMemberHighlight::All, Config_getBool, Doxygen::exampleLinkedMap, FALSE, Index::instance and TRUE.

renderMemberIndicesAsJs()

template <class T>
void renderMemberIndicesAsJs (std::ostream & t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*)(size_t hl) getInfo, std::size_t total)

Definition at line 5567 of file index.cpp.

5567void renderMemberIndicesAsJs(std::ostream &t,
5568 std::function<std::size_t(std::size_t)> numDocumented,
5569 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5570 const T *(*getInfo)(size_t hl),
5571 std::size_t total)
5572{
5573 // index items per category member lists
5574 bool firstMember=TRUE;
5575 for (std::size_t i=0;i<total;i++)
5576 {
5577 if (numDocumented(i)>0)
5578 {
5579 t << ",";
5580 if (firstMember)
5581 {
5582 t << "children:[";
5583 firstMember=FALSE;
5584 }
5585 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5586 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5587
5588 // Check if we have many members, then add sub entries per letter...
5589 // quick alphabetical index
5590 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5591 if (quickIndex)
5592 {
5593 bool multiPageIndex=FALSE;
5594 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5595 {
5596 multiPageIndex=TRUE;
5597 }
5598 t << ",children:[\n";
5599 bool firstLetter=TRUE;
5600 for (const auto &[letter,list] : getMemberList(i))
5601 {
5602 if (!firstLetter) t << ",\n";
5603 QCString ci(letter);
5604 QCString is(letterToLabel(ci));
5605 QCString anchor;
5607 QCString fullName = getInfo(i)->fname;
5608 if (!multiPageIndex || firstLetter)
5609 anchor=fullName+extension+"#index_";
5610 else // other pages of multi page index
5611 anchor=fullName+"_"+is+extension+"#index_";
5612 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5613 << convertToJSString(anchor+convertToId(is)) << "\"}";
5614 firstLetter=FALSE;
5615 }
5616 t << "]";
5617 }
5618 t << "}";
5619 }
5620 }
5621 if (!firstMember)
5622 {
5623 t << "]";
5624 }
5625}

References convertToId, convertToJSString, FALSE, Doxygen::htmlFileExtension, letterToLabel, MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex and TRUE.

Referenced by renderQuickLinksAsJs.

renderQuickLinksAsJs()

bool renderQuickLinksAsJs (std::ostream & t, LayoutNavEntry * root, bool first)
static

Definition at line 5627 of file index.cpp.

5627static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5628{
5629 int count=0;
5630 for (const auto &entry : root->children())
5631 {
5632 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5633 }
5634 if (count>0) // at least one item is visible
5635 {
5636 bool firstChild = TRUE;
5637 if (!first) t << ",";
5638 t << "children:[\n";
5639 for (const auto &entry : root->children())
5640 {
5641 if (entry->visible() && quickLinkVisible(entry->kind()))
5642 {
5643 if (!firstChild) t << ",\n";
5644 firstChild=FALSE;
5645 QCString url = entry->url();
5646 if (isURL(url)) url = "^" + url;
5647 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5648 << convertToJSString(url) << "\"";
5649 bool hasChildren=FALSE;
5650 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5651 {
5652 auto numDoc = [](std::size_t i) {
5654 };
5655 auto memList = [](std::size_t i) {
5657 };
5658 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5659 }
5660 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5661 {
5662 auto numDoc = [](std::size_t i) {
5664 };
5665 auto memList = [](std::size_t i) {
5667 };
5668 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5669 }
5670 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5671 {
5672 auto numDoc = [](std::size_t i) {
5674 };
5675 auto memList = [](std::size_t i) {
5677 };
5678 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5679 }
5680 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5681 {
5682 auto numDoc = [](std::size_t i) {
5684 };
5685 auto memList = [](std::size_t i) {
5687 };
5688 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5689 }
5690 else // recursive into child list
5691 {
5692 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5693 }
5694 if (hasChildren) t << "]";
5695 t << "}";
5696 }
5697 }
5698 }
5699 return count>0;
5700}

References LayoutNavEntry::children, convertToJSString, FALSE, getCmhlInfo, getFmhlInfo, getMmhlInfo, getNmhlInfo, Index::instance, Index::isClassIndexLetterUsed, Index::isFileIndexLetterUsed, Index::isModuleIndexLetterUsed, Index::isNamespaceIndexLetterUsed, isURL, Index::numDocumentedClassMembers, Index::numDocumentedFileMembers, Index::numDocumentedModuleMembers, Index::numDocumentedNamespaceMembers, quickLinkVisible, renderMemberIndicesAsJs, renderQuickLinksAsJs, ClassMemberHighlight::Total, FileMemberHighlight::Total, ModuleMemberHighlight::Total, NamespaceMemberHighlight::Total and TRUE.

Referenced by renderQuickLinksAsJs and writeMenuData.

startFile()

void startFile (OutputList & ol, const QCString & name, const QCString & manName, const QCString & title, HighlightedItem hli, bool additionalIndices, const QCString & altSidebarName, int hierarchyLevel, const QCString & allMembersFile)

Definition at line 401 of file index.cpp.

401void startFile(OutputList &ol,const QCString &name,const QCString &manName,
402 const QCString &title,HighlightedItem hli,bool additionalIndices,
403 const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
404{
405 bool disableIndex = Config_getBool(DISABLE_INDEX);
406 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
407 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
408 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
409 ol.startFile(name,manName,title,hierarchyLevel);
411 if (!disableIndex && !quickLinksAfterSplitbar)
412 {
413 ol.writeQuickLinks(hli,name);
414 }
415 if (!additionalIndices)
416 {
417 ol.endQuickIndices();
418 }
419 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
420 if (quickLinksAfterSplitbar)
421 {
422 ol.writeQuickLinks(hli,name);
423 }
424 ol.writeSearchInfo();
425}

References Config_getBool, OutputList::endQuickIndices, QCString::isEmpty, OutputList::startFile, OutputList::startQuickIndices, OutputList::writeQuickLinks, OutputList::writeSearchInfo and OutputList::writeSplitBar.

Referenced by generateExampleDocs, writeAlphabeticalExceptionIndex, writeAlphabeticalIndex, writeAlphabeticalInterfaceIndex, writeAlphabeticalStructIndex, writeAnnotatedIndexGeneric, writeConceptIndex, ClassDefImpl::writeDocumentation, ConceptDefImpl::writeDocumentation, DirDefImpl::writeDocumentation, DirRelation::writeDocumentation, FileDefImpl::writeDocumentation, GroupDefImpl::writeDocumentation, ModuleDefImpl::writeDocumentation, NamespaceDefImpl::writeDocumentation, PageDefImpl::writeDocumentation, MemberList::writeDocumentationPage, writeExampleIndex, writeFileIndex, writeGraphicalClassHierarchy, writeGraphicalExceptionHierarchy, writeGraphicalInterfaceHierarchy, writeGraphInfo, writeHierarchicalExceptionIndex, writeHierarchicalIndex, writeHierarchicalInterfaceIndex, ClassDefImpl::writeMemberList, writeModuleIndex, writeNamespaceIndex, writePageIndex, FileDefImpl::writeSourceHeader, writeTopicIndex and writeUserGroupStubPage.

startIndexHierarchy()

startQuickIndexItem()

void startQuickIndexItem (OutputList & ol, const QCString & l, bool hl, bool, bool & first)
static

Definition at line 364 of file index.cpp.

364static void startQuickIndexItem(OutputList &ol,const QCString &l,
365 bool hl,bool /* compact */,bool &first)
366{
367 first=FALSE;
368 ol.writeString(" <li");
369 if (hl) ol.writeString(" class=\"current\"");
370 ol.writeString("><a ");
371 ol.writeString("href=\"");
372 ol.writeString(l);
373 ol.writeString("\">");
374 ol.writeString("<span>");
375}

References FALSE and OutputList::writeString.

Referenced by writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered, writeNamespaceMemberIndexFiltered and writeQuickMemberIndex.

startQuickIndexList()

void startQuickIndexList (OutputList & ol, bool letterTabs=FALSE)
static

Definition at line 345 of file index.cpp.

345static void startQuickIndexList(OutputList &ol,bool letterTabs=FALSE)
346{
347 if (letterTabs)
348 {
349 ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
350 }
351 else
352 {
353 ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
354 }
355 ol.writeString(" <ul class=\"tablist\">\n");
356}

References FALSE and OutputList::writeString.

Referenced by writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered, writeNamespaceMemberIndexFiltered and writeQuickMemberIndex.

startTitle()

writeAlphabeticalClassList()

void writeAlphabeticalClassList (OutputList & ol, ClassDef::CompoundType ct, int)
static

Definition at line 2252 of file index.cpp.

2252static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int /* annotatedCount */)
2253{
2254 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2255
2256 // What starting letters are used
2257 UsedIndexLetters indexLettersUsed;
2258
2259 // first count the number of headers
2260 for (const auto &cd : *Doxygen::classLinkedMap)
2261 {
2262 if (sliceOpt && cd->compoundType() != ct)
2263 continue;
2264 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2265 {
2266 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2267 continue;
2268
2269 // get the first UTF8 character (after the part that should be ignored)
2270 int index = getPrefixIndex(cd->className());
2271 std::string letter = getUTF8CharAt(cd->className().str(),index);
2272 if (!letter.empty())
2273 {
2274 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2275 }
2276 }
2277 }
2278
2279 // write quick link index (row of letters)
2280 QCString alphaLinks = "<div class=\"qindex\">";
2281 bool first=true;
2282 for (const auto &letter : indexLettersUsed)
2283 {
2284 if (!first) alphaLinks += "&#160;|&#160;";
2285 first=false;
2286 QCString li = letterToLabel(letter.c_str());
2287 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2288 li + "\">" +
2289 QCString(letter) + "</a>";
2290 }
2291 alphaLinks += "</div>\n";
2292 ol.writeString(alphaLinks);
2293
2294 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2295
2296 // fill the columns with the class list (row elements in each column,
2297 // expect for the columns with number >= itemsInLastRow, which get one
2298 // item less.
2299 for (const auto &cd : *Doxygen::classLinkedMap)
2300 {
2301 if (sliceOpt && cd->compoundType() != ct)
2302 continue;
2303 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2304 continue;
2305
2306 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2307 {
2308 QCString className = cd->className();
2309 int index = getPrefixIndex(className);
2310 std::string letter = getUTF8CharAt(className.str(),index);
2311 if (!letter.empty())
2312 {
2313 letter = convertUTF8ToUpper(letter);
2314 auto it = classesByLetter.find(letter);
2315 if (it!=classesByLetter.end()) // add class to the existing list
2316 {
2317 it->second.push_back(cd.get());
2318 }
2319 else // new entry
2320 {
2321 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2322 }
2323 }
2324 }
2325 }
2326
2327 // sort the class lists per letter while ignoring the prefix
2328 for (auto &[letter,list] : classesByLetter)
2329 {
2330 std::stable_sort(list.begin(), list.end(),
2331 [](const auto &c1,const auto &c2)
2332 {
2333 QCString n1 = c1->className();
2334 QCString n2 = c2->className();
2335 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2336 });
2337 }
2338
2339 // generate table
2340 if (!classesByLetter.empty())
2341 {
2342 ol.writeString("<div class=\"classindex\">\n");
2343 int counter=0;
2344 for (const auto &cl : classesByLetter)
2345 {
2346 QCString parity = (counter++%2)==0 ? "even" : "odd";
2347 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2348
2349 // write character heading
2350 ol.writeString("<dt class=\"alphachar\">");
2351 QCString s = letterToLabel(cl.first.c_str());
2352 ol.writeString("<a id=\"letter_");
2353 ol.writeString(s);
2354 ol.writeString("\" name=\"letter_");
2355 ol.writeString(s);
2356 ol.writeString("\">");
2357 ol.writeString(cl.first.c_str());
2358 ol.writeString("</a>");
2359 ol.writeString("</dt>\n");
2360
2361 // write class links
2362 for (const auto &cd : cl.second)
2363 {
2364 ol.writeString("<dd>");
2365 QCString namesp,cname;
2366 extractNamespaceName(cd->name(),cname,namesp);
2367 QCString nsDispName;
2368 SrcLangExt lang = cd->getLanguage();
2370 if (sep!="::")
2371 {
2372 nsDispName=substitute(namesp,"::",sep);
2373 cname=substitute(cname,"::",sep);
2374 }
2375 else
2376 {
2377 nsDispName=namesp;
2378 }
2379
2380 ol.writeObjectLink(cd->getReference(),
2381 cd->getOutputFileBase(),cd->anchor(),cname);
2382 if (!namesp.isEmpty())
2383 {
2384 ol.writeString(" (");
2386 if (nd && nd->isLinkable())
2387 {
2389 nd->getOutputFileBase(),QCString(),nsDispName);
2390 }
2391 else
2392 {
2393 ol.docify(nsDispName);
2394 }
2395 ol.writeString(")");
2396 }
2397 ol.writeString("</dd>");
2398 }
2399
2400 ol.writeString("</dl>\n");
2401 }
2402 ol.writeString("</div>\n");
2403 }
2404}

References Doxygen::classLinkedMap, Config_getBool, VhdlDocGen::convert, convertUTF8ToUpper, OutputList::docify, VhdlDocGen::ENTITYCLASS, extractNamespaceName, getLanguageSpecificSeparator, Definition::getOutputFileBase, getPrefixIndex, Definition::getReference, getResolvedNamespace, getUTF8CharAt, QCString::isEmpty, Definition::isLinkable, letterToLabel, QCString::str, substitute, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeAlphabeticalExceptionIndex, writeAlphabeticalIndex, writeAlphabeticalInterfaceIndex and writeAlphabeticalStructIndex.

writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex (OutputList & ol)
static

Definition at line 2495 of file index.cpp.

2496{
2497 if (Index::instance().numAnnotatedExceptions()==0) return;
2500 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2501 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2502 bool addToIndex = lne==nullptr || lne->visible();
2503
2504 startFile(ol,"exceptions",QCString(),title,HighlightedItem::Exceptions);
2505
2506 startTitle(ol,QCString());
2507 ol.parseText(title);
2508 endTitle(ol,QCString(),QCString());
2509
2510 if (addToIndex)
2511 {
2512 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2513 }
2514
2515 ol.startContents();
2516 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2517 endFile(ol); // contains ol.endContents()
2518
2520}

References OutputList::disableAllBut, endFile, endTitle, ClassDef::Exception, Exceptions, FALSE, LayoutNavEntry::find, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, startTitle, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible and writeAlphabeticalClassList.

Referenced by writeIndexHierarchyEntries.

writeAlphabeticalIndex()

void writeAlphabeticalIndex (OutputList & ol)
static

Definition at line 2408 of file index.cpp.

2409{
2410 if (Index::instance().numAnnotatedClasses()==0) return;
2413 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2414 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2415 bool addToIndex = lne==nullptr || lne->visible();
2416
2417 startFile(ol,"classes",QCString(),title,HighlightedItem::Classes);
2418
2419 startTitle(ol,QCString());
2420 ol.parseText(title);
2421 endTitle(ol,QCString(),QCString());
2422
2423 if (addToIndex)
2424 {
2425 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2426 }
2427
2428 ol.startContents();
2429 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2430 endFile(ol); // contains ol.endContents()
2431
2433}

References ClassDef::Class, Classes, OutputList::disableAllBut, endFile, endTitle, FALSE, LayoutNavEntry::find, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, startTitle, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible and writeAlphabeticalClassList.

Referenced by writeIndexHierarchyEntries.

writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex (OutputList & ol)
static

Definition at line 2437 of file index.cpp.

2438{
2439 if (Index::instance().numAnnotatedInterfaces()==0) return;
2442 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2443 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2444 bool addToIndex = lne==nullptr || lne->visible();
2445
2446 startFile(ol,"interfaces",QCString(),title,HighlightedItem::Interfaces);
2447
2448 startTitle(ol,QCString());
2449 ol.parseText(title);
2450 endTitle(ol,QCString(),QCString());
2451
2452 if (addToIndex)
2453 {
2454 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2455 }
2456
2457 ol.startContents();
2458 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2459 endFile(ol); // contains ol.endContents()
2460
2462}

References OutputList::disableAllBut, endFile, endTitle, FALSE, LayoutNavEntry::find, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, ClassDef::Interface, Interfaces, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, startTitle, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible and writeAlphabeticalClassList.

Referenced by writeIndexHierarchyEntries.

writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex (OutputList & ol)
static

Definition at line 2466 of file index.cpp.

2467{
2468 if (Index::instance().numAnnotatedStructs()==0) return;
2471 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2472 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2473 bool addToIndex = lne==nullptr || lne->visible();
2474
2475 startFile(ol,"structs",QCString(),title,HighlightedItem::Structs);
2476
2477 startTitle(ol,QCString());
2478 ol.parseText(title);
2479 endTitle(ol,QCString(),QCString());
2480
2481 if (addToIndex)
2482 {
2483 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2484 }
2485
2486 ol.startContents();
2487 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2488 endFile(ol); // contains ol.endContents()
2489
2491}

References OutputList::disableAllBut, endFile, endTitle, FALSE, LayoutNavEntry::find, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, startTitle, ClassDef::Struct, Structs, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible and writeAlphabeticalClassList.

Referenced by writeIndexHierarchyEntries.

writeAnnotatedClassList()

void writeAnnotatedClassList (OutputList & ol, ClassDef::CompoundType ct)
static

Definition at line 2125 of file index.cpp.

2126{
2127 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2128 //bool addToIndex = lne==nullptr || lne->visible();
2129 bool first=TRUE;
2130
2131 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2132
2133 for (const auto &cd : *Doxygen::classLinkedMap)
2134 {
2135 if (cd->getLanguage()==SrcLangExt::VHDL &&
2136 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2138 ) // no architecture
2139 {
2140 continue;
2141 }
2142 if (first)
2143 {
2144 ol.startIndexList();
2145 first=FALSE;
2146 }
2147
2148 if (sliceOpt && cd->compoundType() != ct)
2149 {
2150 continue;
2151 }
2152
2154 if (cd->isEmbeddedInOuterScope())
2155 {
2159 }
2160 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2161 {
2162 ol.startIndexKey();
2163 if (cd->getLanguage()==SrcLangExt::VHDL)
2164 {
2166 ol.docify(prot);
2167 ol.writeString(" ");
2168 }
2169 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2170 ol.endIndexKey();
2171 bool hasBrief = !cd->briefDescription().isEmpty();
2172 ol.startIndexValue(hasBrief);
2173 if (hasBrief)
2174 {
2175 ol.generateDoc(
2176 cd->briefFile(),cd->briefLine(),
2177 cd.get(),nullptr,
2178 cd->briefDescription(TRUE),
2179 FALSE, // indexWords
2180 FALSE, // isExample
2181 QCString(), // example name
2182 TRUE, // single line
2183 TRUE // link from index
2184 );
2185 }
2186 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2187
2188 //if (addToIndex)
2189 //{
2190 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2191 //}
2192 }
2194 }
2195 if (!first) ol.endIndexList();
2196}

References Doxygen::classLinkedMap, Config_getBool, VhdlDocGen::convert, OutputList::disable, Docbook, OutputList::docify, OutputList::endIndexKey, OutputList::endIndexList, OutputList::endIndexValue, FALSE, OutputList::generateDoc, VhdlDocGen::getProtectionName, Latex, VhdlDocGen::PACKAGECLASS, VhdlDocGen::PACKBODYCLASS, OutputList::popGeneratorState, OutputList::pushGeneratorState, RTF, OutputList::startIndexKey, OutputList::startIndexList, OutputList::startIndexValue, TRUE, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeAnnotatedIndexGeneric.

writeAnnotatedExceptionIndex()

void writeAnnotatedExceptionIndex (OutputList & ol)
static

Definition at line 2666 of file index.cpp.

2667{
2668 const auto &index = Index::instance();
2670 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2671 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2672 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2674 "annotatedexceptions",
2676}

References AnnotatedExceptions, ClassDef::Exception, Index::instance, theTranslator and writeAnnotatedIndexGeneric.

Referenced by writeIndexHierarchyEntries.

writeAnnotatedIndex()

void writeAnnotatedIndex (OutputList & ol)
static

Definition at line 2624 of file index.cpp.

2625{
2626 const auto &index = Index::instance();
2628 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2629 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2630 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2632 "annotated",
2634}

References AnnotatedClasses, ClassDef::Class, Index::instance, theTranslator and writeAnnotatedIndexGeneric.

Referenced by writeIndexHierarchyEntries.

writeAnnotatedIndexGeneric()

void writeAnnotatedIndexGeneric (OutputList & ol, const AnnotatedIndexContext ctx)
static

Definition at line 2549 of file index.cpp.

2550{
2551 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2552 // annotatedClasses,annotatedClassesPrinted);
2553 if (ctx.numAnnotated==0) return;
2554
2557 if (ctx.numPrinted==0)
2558 {
2561 }
2563 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2564 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2565 bool addToIndex = lne==nullptr || lne->visible();
2566
2567 startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
2568
2569 startTitle(ol,QCString());
2570 ol.parseText(title);
2571 endTitle(ol,QCString(),QCString());
2572
2573 ol.startContents();
2574
2575 ol.startTextBlock();
2576 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2577 ol.endTextBlock();
2578
2579 // ---------------
2580 // Linear class index for Latex/RTF
2581 // ---------------
2584 Doxygen::indexList->disable();
2585
2587
2588 Doxygen::indexList->enable();
2590
2591 // ---------------
2592 // Hierarchical class index for HTML
2593 // ---------------
2596
2597 {
2598 if (addToIndex)
2599 {
2600 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2601 Doxygen::indexList->incContentsDepth();
2602 }
2603 FTVHelp ftv(false);
2606 TextStream t;
2608 ol.writeString(t.str().c_str());
2609 if (addToIndex)
2610 {
2611 Doxygen::indexList->decContentsDepth();
2612 }
2613 }
2614
2616 // ------
2617
2618 endFile(ol); // contains ol.endContents()
2620}

References Doxygen::classLinkedMap, AnnotatedIndexContext::compoundType, OutputList::disable, OutputList::disableAllBut, endFile, OutputList::endTextBlock, endTitle, AnnotatedIndexContext::fallbackKind, AnnotatedIndexContext::fileBaseName, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, AnnotatedIndexContext::hiItem, Html, Doxygen::indexList, LayoutDocManager::instance, LayoutNavEntry::intro, Latex, AnnotatedIndexContext::listDefaultIntroText, AnnotatedIndexContext::listDefaultTitleText, AnnotatedIndexContext::listKind, Man, Doxygen::namespaceLinkedMap, AnnotatedIndexContext::numAnnotated, AnnotatedIndexContext::numPrinted, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, RTF, OutputList::startContents, startFile, OutputList::startTextBlock, startTitle, TextStream::str, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeAnnotatedClassList, writeClassTree, writeClassTreeInsideNamespace and OutputList::writeString.

Referenced by writeAnnotatedExceptionIndex, writeAnnotatedIndex, writeAnnotatedInterfaceIndex and writeAnnotatedStructIndex.

writeAnnotatedInterfaceIndex()

void writeAnnotatedInterfaceIndex (OutputList & ol)
static

Definition at line 2638 of file index.cpp.

2639{
2640 const auto &index = Index::instance();
2642 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2643 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2644 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2646 "annotatedinterfaces",
2648}

References AnnotatedInterfaces, Index::instance, ClassDef::Interface, theTranslator and writeAnnotatedIndexGeneric.

Referenced by writeIndexHierarchyEntries.

writeAnnotatedStructIndex()

void writeAnnotatedStructIndex (OutputList & ol)
static

Definition at line 2652 of file index.cpp.

2653{
2654 const auto &index = Index::instance();
2656 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2657 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2658 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2660 "annotatedstructs",
2662}

References AnnotatedStructs, Index::instance, ClassDef::Struct, theTranslator and writeAnnotatedIndexGeneric.

Referenced by writeIndexHierarchyEntries.

writeClassHierarchy()

void writeClassHierarchy (OutputList & ol, FTVHelp * ftv, bool addToIndex, ClassDef::CompoundType ct)
static

Definition at line 1063 of file index.cpp.

1063static void writeClassHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex,ClassDef::CompoundType ct)
1064{
1065 ClassDefSet visitedClasses;
1066 if (ftv)
1067 {
1070 }
1071 bool started=FALSE;
1072 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1073 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1074 if (started)
1075 {
1076 endIndexHierarchy(ol,0);
1077 if (addToIndex)
1078 {
1079 Doxygen::indexList->decContentsDepth();
1080 }
1081 }
1082 if (ftv)
1083 {
1085 }
1086}

References Doxygen::classLinkedMap, OutputList::disable, endIndexHierarchy, FALSE, Doxygen::hiddenClassLinkedMap, Html, Doxygen::indexList, OutputList::popGeneratorState, OutputList::pushGeneratorState and writeClassTreeForList.

Referenced by writeHierarchicalExceptionIndex, writeHierarchicalIndex and writeHierarchicalInterfaceIndex.

writeClassLinkForMember()

void writeClassLinkForMember (OutputList & ol, const MemberDef * md, const QCString & separator, QCString & prevClassName)
static

Definition at line 2679 of file index.cpp.

2679static void writeClassLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2680 QCString &prevClassName)
2681{
2682 const ClassDef *cd=md->getClassDef();
2683 if ( cd && prevClassName!=cd->displayName())
2684 {
2685 ol.writeString(separator);
2687 cd->displayName());
2688 prevClassName = cd->displayName();
2689 }
2690}

References Definition::anchor, Definition::displayName, MemberDef::getClassDef, Definition::getOutputFileBase, Definition::getReference, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeMemberList.

writeClassMemberIndex()

void writeClassMemberIndex (OutputList & ol)
static

Definition at line 3233 of file index.cpp.

3234{
3235 const auto &index = Index::instance();
3236 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3237 bool addToIndex = lne==nullptr || lne->visible();
3238
3239 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3240 {
3241 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3242 Doxygen::indexList->incContentsDepth();
3243 }
3253 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3254 {
3255 Doxygen::indexList->decContentsDepth();
3256 }
3257
3258}

References ClassMemberHighlight::All, ClassMemberHighlight::Enums, ClassMemberHighlight::EnumValues, ClassMemberHighlight::Events, LayoutNavEntry::find, ClassMemberHighlight::Functions, Doxygen::indexList, Index::instance, LayoutDocManager::instance, ClassMemberHighlight::Properties, ClassMemberHighlight::Related, LayoutDocManager::rootNavEntry, theTranslator, LayoutNavEntry::title, TRUE, ClassMemberHighlight::Typedefs, ClassMemberHighlight::Variables, LayoutNavEntry::visible and writeClassMemberIndexFiltered.

Referenced by writeIndexHierarchyEntries.

writeClassMemberIndexFiltered()

void writeClassMemberIndexFiltered (OutputList & ol, ClassMemberHighlight::Enum hl)
static

Definition at line 3104 of file index.cpp.

3105{
3106 const auto &index = Index::instance();
3107 if (index.numDocumentedClassMembers(hl)==0) return;
3108
3109 bool disableIndex = Config_getBool(DISABLE_INDEX);
3110 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3111 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3112 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3113 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3114
3115 bool multiPageIndex=FALSE;
3116 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3117 {
3118 multiPageIndex=TRUE;
3119 }
3120
3123
3125 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3126 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3127 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3128 bool addToIndex = lne==nullptr || lne->visible();
3129
3130 if (addToIndex)
3131 {
3132 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3133 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3134 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3135 }
3136
3137 bool first=TRUE;
3138 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3139 {
3140 QCString fileName = getCmhlInfo(hl)->fname;
3141 if (multiPageIndex)
3142 {
3143 QCString cs(letter);
3144 if (!first)
3145 {
3146 fileName+="_"+letterToLabel(cs);
3147 }
3148 if (addToIndex)
3149 {
3150 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3151 }
3152 }
3153
3154 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3155
3156 auto writeQuickLinks = [&,cap_letter=letter]()
3157 {
3159 if (!dynamicMenus)
3160 {
3162
3163 // index item for global member list
3166 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3168
3169 // index items per category member lists
3170 for (int i=1;i<ClassMemberHighlight::Total;i++)
3171 {
3172 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3173 {
3175 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3176 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3177 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3179 }
3180 }
3181
3183
3184 // quick alphabetical index
3185 if (quickIndex)
3186 {
3187 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3188 getCmhlInfo(hl)->fname,multiPageIndex);
3189 }
3190
3191 ol.writeString("</div><!-- main-nav -->\n");
3192 }
3193 };
3194
3195 ol.startFile(fileName+extension,QCString(),title);
3197 if (!disableIndex && !quickLinksAfterSplitbar)
3198 {
3199 writeQuickLinks();
3200 }
3201 ol.endQuickIndices();
3202 ol.writeSplitBar(fileName,QCString());
3203 if (quickLinksAfterSplitbar)
3204 {
3205 writeQuickLinks();
3206 if (!dynamicMenus)
3207 {
3208 ol.writeString("<div id=\"container\">\n");
3209 ol.writeString("<div id=\"doc-content\">\n");
3210 }
3211 }
3212 ol.writeSearchInfo();
3213
3214 ol.startContents();
3215
3216 ol.startTextBlock();
3217 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3218 ol.endTextBlock();
3219
3220 writeMemberList(ol,quickIndex,
3221 multiPageIndex ? letter : std::string(),
3222 index.isClassIndexLetterUsed(hl),
3224 endFile(ol);
3225 first=FALSE;
3226 }
3227
3228 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3229
3231}

References ClassMemberHighlight::All, Config_getBool, OutputList::disableAllBut, endFile, endQuickIndexItem, endQuickIndexList, OutputList::endQuickIndices, OutputList::endTextBlock, FALSE, LayoutNavEntry::find, fixSpaces, CmhlInfo::fname, Functions, getCmhlInfo, Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, letterToLabel, MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, OutputList::startFile, startQuickIndexItem, startQuickIndexList, OutputList::startQuickIndices, OutputList::startTextBlock, theTranslator, CmhlInfo::title, LayoutNavEntry::title, ClassMemberHighlight::Total, TRUE, Definition::TypeClass, LayoutNavEntry::visible, writeMemberList, OutputList::writeQuickLinks, writeQuickMemberIndex, OutputList::writeSearchInfo, OutputList::writeSplitBar and OutputList::writeString.

Referenced by writeClassMemberIndex.

writeClassTree()

template <class ListType>
void writeClassTree (const ListType & cl, FTVHelp * ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
static

Definition at line 1698 of file index.cpp.

1698static void writeClassTree(const ListType &cl,FTVHelp *ftv,bool addToIndex,bool globalOnly,ClassDef::CompoundType ct)
1699{
1700 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1701 for (const auto &cdi : cl)
1702 {
1703 const ClassDef *cd = get_pointer(cdi);
1704 if (cd->getLanguage()==SrcLangExt::VHDL)
1705 {
1708 )// no architecture
1709 {
1710 continue;
1711 }
1712 }
1713
1714 if (sliceOpt && cd->compoundType() != ct)
1715 {
1716 continue;
1717 }
1718
1719 if (!globalOnly ||
1720 cd->getOuterScope()==nullptr ||
1722 )
1723 {
1724 int count=0;
1725 for (const auto &ccd : cd->getClasses())
1726 {
1727 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1728 {
1729 count++;
1730 }
1731 }
1733 {
1734 if (ftv)
1735 {
1736 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1737 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1738 }
1739 if (addToIndex &&
1740 (cd->getOuterScope()==nullptr ||
1742 )
1743 )
1744 {
1745 addMembersToIndex(cd,LayoutDocManager::Class,
1746 cd->displayName(FALSE),
1747 cd->anchor(),
1748 cd->partOfGroups().empty() && !cd->isSimple());
1749 }
1750 if (count>0)
1751 {
1752 if (ftv) ftv->incContentsDepth();
1753 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1754 if (ftv) ftv->decContentsDepth();
1755 }
1756 }
1757 }
1758 }
1759}

References FTVHelp::addContentsItem, addMembersToIndex, Definition::anchor, classVisibleInIndex, ClassDef::compoundType, Config_getBool, VhdlDocGen::convert, FTVHelp::decContentsDepth, Definition::definitionType, Definition::displayName, FALSE, get_pointer, ClassDef::getClasses, Definition::getLanguage, Definition::getOuterScope, Definition::getOutputFileBase, Definition::getReference, Doxygen::globalScope, FTVHelp::incContentsDepth, ClassDef::isImplicitTemplateInstance, ClassDef::isSimple, VhdlDocGen::PACKAGECLASS, VhdlDocGen::PACKBODYCLASS, Definition::partOfGroups, ClassDef::protection, TRUE, Definition::TypeClass and writeClassTree.

Referenced by writeAnnotatedIndexGeneric, writeClassTree, writeClassTreeInsideNamespaceElement, writeModuleTreeNode and writeNamespaceTreeElement.

writeClassTreeForList()

void writeClassTreeForList (OutputList & ol, const ClassLinkedMap & cl, bool & started, FTVHelp * ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet & visitedClasses)
static

Definition at line 964 of file index.cpp.

964static void writeClassTreeForList(OutputList &ol,const ClassLinkedMap &cl,bool &started,FTVHelp* ftv,bool addToIndex,
965 ClassDef::CompoundType ct,ClassDefSet &visitedClasses)
966{
967 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
968 for (const auto &cd : cl)
969 {
970 //printf("class %s classHasVisibleRoot=%d isVisibleInHierarchy=%d\n",
971 // qPrint(cd->name()),
972 // classHasVisibleRoot(cd->baseClasses()),
973 // cd->isVisibleInHierarchy()
974 // );
975 bool b = false;
976 if (cd->getLanguage()==SrcLangExt::VHDL)
977 {
978 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
979 {
980 continue;
981 }
982 b=!classHasVisibleRoot(cd->subClasses());
983 }
984 else if (sliceOpt && cd->compoundType() != ct)
985 {
986 continue;
987 }
988 else
989 {
990 b=!classHasVisibleRoot(cd->baseClasses());
991 }
992
993 if (b) //filter on root classes
994 {
995 if (cd->isVisibleInHierarchy()) // should it be visible
996 {
997 if (!started)
998 {
1000 if (addToIndex)
1001 {
1002 Doxygen::indexList->incContentsDepth();
1003 }
1004 started=TRUE;
1005 }
1007 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1008 classHasVisibleChildren(cd.get());
1009 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1010 if (cd->isLinkable())
1011 {
1012 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1013 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1014 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1015 ol.parseText(cd->displayName());
1016 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1017 if (cd->isReference())
1018 {
1019 ol.startTypewriter();
1020 ol.docify(" [external]");
1021 ol.endTypewriter();
1022 }
1023 if (addToIndex)
1024 {
1025 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1026 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
1027 }
1028 if (ftv)
1029 {
1030 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
1031 }
1032 }
1033 else
1034 {
1036 ol.parseText(cd->displayName());
1038 if (addToIndex)
1039 {
1040 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
1041 }
1042 if (ftv)
1043 {
1044 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
1045 }
1046 }
1047 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1048 {
1049 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1050 visitedClasses.insert(cd.get());
1051 }
1052 else if (hasChildren)
1053 {
1054 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1055 visitedClasses.insert(cd.get());
1056 }
1057 ol.endIndexListItem();
1058 }
1059 }
1060 }
1061}

References FTVHelp::addContentsItem, classHasVisibleChildren, classHasVisibleRoot, Config_getBool, VhdlDocGen::convert, OutputList::docify, OutputList::endIndexItem, OutputList::endIndexListItem, OutputList::endTypewriter, VhdlDocGen::ENTITYCLASS, FALSE, Doxygen::indexList, OutputList::parseText, startIndexHierarchy, OutputList::startIndexItem, OutputList::startIndexListItem, OutputList::startTypewriter, TRUE and writeClassTreeToOutput.

Referenced by writeClassHierarchy.

writeClassTreeInsideNamespace()

void writeClassTreeInsideNamespace (const NamespaceLinkedRefMap & nsLinkedMap, FTVHelp * ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static

Definition at line 1977 of file index.cpp.

1978 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1979{
1980 for (const auto &nd : nsLinkedMap)
1981 {
1982 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
1983 }
1984}

Reference writeClassTreeInsideNamespaceElement.

Referenced by writeAnnotatedIndexGeneric and writeClassTreeInsideNamespaceElement.

writeClassTreeInsideNamespace()

void writeClassTreeInsideNamespace (const NamespaceLinkedMap & nsLinkedMap, FTVHelp * ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static

Definition at line 1986 of file index.cpp.

1986static void writeClassTreeInsideNamespace(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1987 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1988{
1989 for (const auto &nd : nsLinkedMap)
1990 {
1991 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
1992 }
1993}

Reference writeClassTreeInsideNamespaceElement.

writeClassTreeInsideNamespaceElement()

void writeClassTreeInsideNamespaceElement (const NamespaceDef * nd, FTVHelp * ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static

Definition at line 1905 of file index.cpp.

1906 bool rootOnly,bool addToIndex,ClassDef::CompoundType ct)
1907{
1908 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1909 if (!nd->isAnonymous() &&
1910 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1911 {
1912 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1913 bool isLinkable = nd->isLinkableInProject();
1914
1915 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1916
1917 QCString ref;
1918 QCString file;
1919 if (isLinkable)
1920 {
1921 ref = nd->getReference();
1922 file = nd->getOutputFileBase();
1923 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1924 {
1925 file=file.replace(0,qstrlen("namespace"),"class");
1926 }
1927 }
1928
1929 if (isDir)
1930 {
1931 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1932
1933 if (addToIndex)
1934 {
1935 // the namespace entry is already shown under the namespace list so don't
1936 // add it to the nav index and don't create a separate index file for it otherwise
1937 // it will overwrite the one written for the namespace list.
1938 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1939 false, // separateIndex
1940 false // addToNavIndex
1941 );
1942 }
1943 if (addToIndex)
1944 {
1945 Doxygen::indexList->incContentsDepth();
1946 }
1947
1948 ftv->incContentsDepth();
1949 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1951 if (sliceOpt)
1952 {
1953 if (ct == ClassDef::Interface)
1954 {
1955 d = nd->getInterfaces();
1956 }
1957 else if (ct == ClassDef::Struct)
1958 {
1959 d = nd->getStructs();
1960 }
1961 else if (ct == ClassDef::Exception)
1962 {
1963 d = nd->getExceptions();
1964 }
1965 }
1966 writeClassTree(d,ftv,addToIndex,FALSE,ct);
1967 ftv->decContentsDepth();
1968
1969 if (addToIndex)
1970 {
1971 Doxygen::indexList->decContentsDepth();
1972 }
1973 }
1974 }
1975}

References FTVHelp::addContentsItem, Config_getBool, FTVHelp::decContentsDepth, ClassDef::Exception, FALSE, NamespaceDef::getClasses, NamespaceDef::getExceptions, NamespaceDef::getInterfaces, Definition::getLanguage, NamespaceDef::getNamespaces, Definition::getOuterScope, Definition::getOutputFileBase, Definition::getReference, NamespaceDef::getStructs, Doxygen::globalScope, FTVHelp::incContentsDepth, Doxygen::indexList, ClassDef::Interface, Definition::isAnonymous, Definition::isLinkableInProject, Definition::localName, namespaceHasNestedClass, qstrlen, QCString::replace, ClassDef::Struct, TRUE, writeClassTree and writeClassTreeInsideNamespace.

Referenced by writeClassTreeInsideNamespace and writeClassTreeInsideNamespace.

writeClassTreeToOutput()

void writeClassTreeToOutput (OutputList & ol, const BaseClassList & bcl, int level, FTVHelp * ftv, bool addToIndex, ClassDefSet & visitedClasses)
static

Generates HTML Help tree of classes

Definition at line 620 of file index.cpp.

620static void writeClassTreeToOutput(OutputList &ol,const BaseClassList &bcl,int level,FTVHelp* ftv,bool addToIndex,ClassDefSet &visitedClasses)
621{
622 if (bcl.empty()) return;
623 bool started=FALSE;
624 for (const auto &bcd : bcl)
625 {
626 ClassDef *cd=bcd.classDef;
627 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
628 {
629 continue;
630 }
631
632 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
633
634 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
635 {
636 if (!started)
637 {
638 startIndexHierarchy(ol,level);
639 if (addToIndex)
640 {
641 Doxygen::indexList->incContentsDepth();
642 }
643 if (ftv)
644 {
645 ftv->incContentsDepth();
646 }
647 started=TRUE;
648 }
650 //printf("Passed...\n");
651 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
653 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
654 if (cd->isLinkable())
655 {
656 //printf("Writing class %s\n",qPrint(cd->displayName()));
658 ol.parseText(cd->displayName());
660 if (cd->isReference())
661 {
662 ol.startTypewriter();
663 ol.docify(" [external]");
664 ol.endTypewriter();
665 }
666 if (addToIndex)
667 {
668 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
669 }
670 if (ftv)
671 {
672 if (cd->getLanguage()==SrcLangExt::VHDL)
673 {
674 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
675 }
676 else
677 {
678 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
679 }
680 }
681 }
682 else
683 {
685 ol.parseText(cd->name());
687 if (addToIndex)
688 {
689 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
690 }
691 if (ftv)
692 {
693 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
694 }
695 }
696 if (hasChildren)
697 {
698 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
699 visitedClasses.insert(cd);
700 if (cd->getLanguage()==SrcLangExt::VHDL)
701 {
702 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
703 }
704 else
705 {
706 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
707 }
708 }
710 }
711 }
712 if (started)
713 {
714 endIndexHierarchy(ol,level);
715 if (addToIndex)
716 {
717 Doxygen::indexList->decContentsDepth();
718 }
719 if (ftv)
720 {
721 ftv->decContentsDepth();
722 }
723 }
724}

References FTVHelp::addContentsItem, Definition::anchor, ClassDef::baseClasses, classHasVisibleChildren, classHasVisibleRoot, VhdlDocGen::convert, FTVHelp::decContentsDepth, Definition::displayName, OutputList::docify, endIndexHierarchy, OutputList::endIndexItem, OutputList::endIndexListItem, OutputList::endTypewriter, VhdlDocGen::ENTITYCLASS, FALSE, Definition::getLanguage, Definition::getOutputFileBase, Definition::getReference, FTVHelp::incContentsDepth, Doxygen::indexList, Definition::isLinkable, Definition::isReference, ClassDef::isVisibleInHierarchy, Definition::name, OutputList::parseText, ClassDef::protection, startIndexHierarchy, OutputList::startIndexItem, OutputList::startIndexListItem, OutputList::startTypewriter, ClassDef::subClasses, TRUE and writeClassTreeToOutput.

Referenced by writeClassTreeForList and writeClassTreeToOutput.

writeConceptIndex()

void writeConceptIndex (OutputList & ol)
static

Definition at line 4667 of file index.cpp.

4668{
4669 if (Index::instance().numDocumentedConcepts()==0) return;
4671 // 1.{
4674 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4675 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4676 bool addToIndex = lne==nullptr || lne->visible();
4677
4678 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4679 startTitle(ol,QCString());
4680 ol.parseText(title);
4681 endTitle(ol,QCString(),QCString());
4682 ol.startContents();
4683 ol.startTextBlock();
4684 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4685 ol.endTextBlock();
4686
4687 // ---------------
4688 // Normal group index for Latex/RTF
4689 // ---------------
4690 // 2.{
4693
4694 bool first=TRUE;
4695 for (const auto &cd : *Doxygen::conceptLinkedMap)
4696 {
4697 if (cd->isLinkableInProject())
4698 {
4699 if (first)
4700 {
4701 ol.startIndexList();
4702 first=FALSE;
4703 }
4704 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4705 ol.startIndexKey();
4706 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4707 ol.endIndexKey();
4708
4709 bool hasBrief = !cd->briefDescription().isEmpty();
4710 ol.startIndexValue(hasBrief);
4711 if (hasBrief)
4712 {
4713 //ol.docify(" (");
4714 ol.generateDoc(
4715 cd->briefFile(),cd->briefLine(),
4716 cd.get(),nullptr,
4717 cd->briefDescription(TRUE),
4718 FALSE, // index words
4719 FALSE, // isExample
4720 QCString(), // example name
4721 TRUE, // single line
4722 TRUE // link from index
4723 );
4724 //ol.docify(")");
4725 }
4726 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4727
4728 }
4729 }
4730 if (!first) ol.endIndexList();
4731
4733 // 2.}
4734
4735 // ---------------
4736 // interactive group index for HTML
4737 // ---------------
4738 // 2.{
4741
4742 {
4743 if (addToIndex)
4744 {
4745 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4746 Doxygen::indexList->incContentsDepth();
4747 }
4748 FTVHelp ftv(false);
4749 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4750 {
4751 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4752 }
4753 writeConceptRootList(&ftv,addToIndex);
4754 TextStream t;
4756 ol.writeString(t.str().c_str());
4757 if (addToIndex)
4758 {
4759 Doxygen::indexList->decContentsDepth();
4760 }
4761 }
4763 // 2.}
4764
4765 endFile(ol);
4767 // 1.}
4768}

References Doxygen::conceptLinkedMap, Concepts, Config_getBool, OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endIndexKey, OutputList::endIndexList, OutputList::endIndexValue, OutputList::endTextBlock, endTitle, FALSE, LayoutNavEntry::find, OutputList::generateDoc, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Man, Doxygen::namespaceLinkedMap, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startIndexKey, OutputList::startIndexList, OutputList::startIndexValue, OutputList::startTextBlock, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeConceptRootList, writeConceptTreeInsideNamespaceElement, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeConceptList()

void writeConceptList (const ConceptLinkedRefMap & concepts, FTVHelp * ftv, bool addToIndex)
static

Definition at line 4561 of file index.cpp.

4561static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv,bool addToIndex)
4562{
4563 for (const auto &cd : concepts)
4564 {
4565 if (cd->isLinkableInProject())
4566 {
4567 if (ftv)
4568 {
4569 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4570 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4571 }
4572 if (addToIndex)
4573 {
4574 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4575 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4576 }
4577 }
4578 }
4579}

References FTVHelp::addContentsItem, FALSE and Doxygen::indexList.

Referenced by writeConceptTreeInsideNamespaceElement, writeModuleTreeNode and writeNamespaceTreeElement.

writeConceptRootList()

void writeConceptRootList (FTVHelp * ftv, bool addToIndex)
static

Definition at line 4645 of file index.cpp.

4645static void writeConceptRootList(FTVHelp *ftv,bool addToIndex)
4646{
4647 for (const auto &cd : *Doxygen::conceptLinkedMap)
4648 {
4649 if ((cd->getOuterScope()==nullptr ||
4650 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4651 )
4652 {
4653 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4654 ftv->addContentsItem(
4655 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4656 QCString(),false,cd->partOfGroups().empty(),cd.get());
4657 if (addToIndex)
4658 {
4659 Doxygen::indexList->addContentsItem(
4660 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4661 QCString(),false,cd->partOfGroups().empty(),cd.get());
4662 }
4663 }
4664 }
4665}

References FTVHelp::addContentsItem, Doxygen::conceptLinkedMap, Doxygen::globalScope and Doxygen::indexList.

Referenced by writeConceptIndex.

writeConceptTreeInsideNamespace()

void writeConceptTreeInsideNamespace (const NamespaceLinkedRefMap & nsLinkedMap, FTVHelp * ftv, bool rootOnly, bool addToIndex)
static

Definition at line 4584 of file index.cpp.

4585 bool rootOnly, bool addToIndex)
4586{
4587 for (const auto &nd : nsLinkedMap)
4588 {
4589 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4590 }
4591}

Reference writeConceptTreeInsideNamespaceElement.

Referenced by writeConceptTreeInsideNamespaceElement.

writeConceptTreeInsideNamespaceElement()

void writeConceptTreeInsideNamespaceElement (const NamespaceDef * nd, FTVHelp * ftv, bool rootOnly, bool addToIndex)
static

Definition at line 4594 of file index.cpp.

4595 bool rootOnly, bool addToIndex)
4596{
4597 if (!nd->isAnonymous() &&
4598 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4599 {
4600 bool isDir = namespaceHasNestedConcept(nd);
4601 bool isLinkable = nd->isLinkableInProject();
4602
4603 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4604
4605 QCString ref;
4606 QCString file;
4607 if (isLinkable)
4608 {
4609 ref = nd->getReference();
4610 file = nd->getOutputFileBase();
4611 }
4612
4613 if (isDir)
4614 {
4615 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4616
4617 if (addToIndex)
4618 {
4619 // the namespace entry is already shown under the namespace list so don't
4620 // add it to the nav index and don't create a separate index file for it otherwise
4621 // it will overwrite the one written for the namespace list.
4622 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4623 false, // separateIndex
4624 false // addToNavIndex
4625 );
4626 }
4627 if (addToIndex)
4628 {
4629 Doxygen::indexList->incContentsDepth();
4630 }
4631
4632 ftv->incContentsDepth();
4634 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4635 ftv->decContentsDepth();
4636
4637 if (addToIndex)
4638 {
4639 Doxygen::indexList->decContentsDepth();
4640 }
4641 }
4642 }
4643}

References FTVHelp::addContentsItem, FTVHelp::decContentsDepth, FALSE, NamespaceDef::getConcepts, NamespaceDef::getNamespaces, Definition::getOuterScope, Definition::getOutputFileBase, Definition::getReference, Doxygen::globalScope, FTVHelp::incContentsDepth, Doxygen::indexList, Definition::isAnonymous, Definition::isLinkableInProject, Definition::localName, namespaceHasNestedConcept, TRUE, writeConceptList and writeConceptTreeInsideNamespace.

Referenced by writeConceptIndex and writeConceptTreeInsideNamespace.

writeDirHierarchy()

void writeDirHierarchy (OutputList & ol, FTVHelp * ftv, bool addToIndex)
static

Definition at line 900 of file index.cpp.

900static void writeDirHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
901{
902 if (ftv)
903 {
906 }
908 for (const auto &dd : *Doxygen::dirLinkedMap)
909 {
910 if (dd->getOuterScope()==Doxygen::globalScope)
911 {
912 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
913 }
914 }
915 if (ftv)
916 {
917 for (const auto &fn : *Doxygen::inputNameLinkedMap)
918 {
919 for (const auto &fd : *fn)
920 {
921 if (fd->getDirDef()==nullptr) // top level file
922 {
923 bool src = false;
924 bool doc = fileVisibleInIndex(fd.get(),src);
925 QCString reference, outputBase;
926 if (doc)
927 {
928 reference = fd->getReference();
929 outputBase = fd->getOutputFileBase();
930 }
931 if (doc || src)
932 {
933 ftv->addContentsItem(FALSE,fd->displayName(),
934 reference, outputBase, QCString(),
935 FALSE,FALSE,fd.get());
936 }
937 if (addToIndex)
938 {
939 if (doc)
940 {
941 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
942 }
943 else if (src)
944 {
945 Doxygen::indexList->addContentsItem(
946 FALSE, fd->displayName(), QCString(),
947 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
948 }
949 }
950 }
951 }
952 }
953 }
955 if (ftv)
956 {
958 }
959}

References FTVHelp::addContentsItem, addMembersToIndex, Doxygen::dirLinkedMap, OutputList::disable, endIndexHierarchy, FALSE, fileVisibleInIndex, Doxygen::globalScope, Html, Doxygen::indexList, Doxygen::inputNameLinkedMap, OutputList::popGeneratorState, OutputList::pushGeneratorState, startIndexHierarchy, TRUE and writeDirTreeNode.

Referenced by writeFileIndex.

writeDirTreeNode()

void writeDirTreeNode (OutputList & ol, const DirDef * dd, int level, FTVHelp * ftv, bool addToIndex)
static

Definition at line 756 of file index.cpp.

756static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp* ftv,bool addToIndex)
757{
758 if (level>20)
759 {
760 warn(dd->getDefFileName(),dd->getDefLine(),
761 "maximum nesting level exceeded for directory {}: "
762 "check for possible recursive directory relation!",dd->name());
763 return;
764 }
765
766 if (!dirHasVisibleChildren(dd))
767 {
768 return;
769 }
770
771 bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
772 bool isDir = !dd->subDirs().empty() || // there are subdirs
773 (tocExpand && // or toc expand and
774 !dd->getFiles().empty() // there are files
775 );
776 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
777 if (addToIndex)
778 {
779 Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
780 Doxygen::indexList->incContentsDepth();
781 }
782 if (ftv)
783 {
784 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
786 ftv->incContentsDepth();
787 }
788
791 ol.parseText(dd->shortName());
793 if (dd->isReference())
794 {
795 ol.startTypewriter();
796 ol.docify(" [external]");
797 ol.endTypewriter();
798 }
799
800 // write sub directories
801 if (dd->subDirs().size()>0)
802 {
803 startIndexHierarchy(ol,level+1);
804 for(const auto &subdd : dd->subDirs())
805 {
806 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
807 }
808 endIndexHierarchy(ol,level+1);
809 }
810
811 int fileCount=0;
812 if (!dd->getFiles().empty())
813 {
814 for (const auto &fd : dd->getFiles())
815 {
816 //bool allExternals = Config_getBool(ALLEXTERNALS);
817 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
818 //{
819 // fileCount++;
820 //}
821 bool genSourceFile = false;
822 if (fileVisibleInIndex(fd,genSourceFile))
823 {
824 fileCount++;
825 }
826 else if (genSourceFile)
827 {
828 fileCount++;
829 }
830 }
831 if (fileCount>0)
832 {
833 startIndexHierarchy(ol,level+1);
834 for (const auto &fd : dd->getFiles())
835 {
836 bool src = false;
837 bool doc = fileVisibleInIndex(fd,src);
838 QCString reference;
839 QCString outputBase;
840 if (doc)
841 {
842 reference = fd->getReference();
843 outputBase = fd->getOutputFileBase();
844 }
845 if (doc || src)
846 {
848 ol.startIndexItem(reference,outputBase);
849 ol.parseText(fd->displayName());
850 ol.endIndexItem(reference,outputBase);
852 if (ftv && (src || doc))
853 {
855 fd->displayName(),
856 reference,outputBase,
857 QCString(),FALSE,FALSE,fd);
858 }
859 }
860 }
861 endIndexHierarchy(ol,level+1);
862 }
863 }
864
865 if (tocExpand && addToIndex)
866 {
867 // write files of this directory
868 if (fileCount>0)
869 {
870 for (const auto &fd : dd->getFiles())
871 {
872 bool src = false;
873 bool doc = fileVisibleInIndex(fd,src);
874 if (doc)
875 {
876 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
877 !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
878 }
879 else if (src)
880 {
881 Doxygen::indexList->addContentsItem(
882 FALSE, fd->name(), QCString(),
883 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
884 }
885 }
886 }
887 }
889
890 if (addToIndex)
891 {
892 Doxygen::indexList->decContentsDepth();
893 }
894 if (ftv)
895 {
896 ftv->decContentsDepth();
897 }
898}

References FTVHelp::addContentsItem, addMembersToIndex, FTVHelp::decContentsDepth, dirHasVisibleChildren, OutputList::docify, endIndexHierarchy, OutputList::endIndexItem, OutputList::endIndexListItem, OutputList::endTypewriter, FALSE, fileVisibleInIndex, Definition::getDefFileName, Definition::getDefLine, DirDef::getFiles, Definition::getOutputFileBase, Definition::getReference, FTVHelp::incContentsDepth, Doxygen::indexList, Definition::isReference, Definition::name, OutputList::parseText, DirDef::shortName, startIndexHierarchy, OutputList::startIndexItem, OutputList::startIndexListItem, OutputList::startTypewriter, DirDef::subDirs, TRUE, warn and writeDirTreeNode.

Referenced by writeDirHierarchy and writeDirTreeNode.

writeExampleIndex()

void writeExampleIndex (OutputList & ol)
static

Definition at line 3806 of file index.cpp.

3807{
3808 if (Doxygen::exampleLinkedMap->empty()) return;
3812 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3813 QCString title = lne ? lne->title() : theTranslator->trExamples();
3814 bool addToIndex = lne==nullptr || lne->visible();
3815
3816 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3817
3818 startTitle(ol,QCString());
3819 ol.parseText(title);
3820 endTitle(ol,QCString(),QCString());
3821
3822 ol.startContents();
3823
3824 if (addToIndex)
3825 {
3826 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3827 Doxygen::indexList->incContentsDepth();
3828 }
3829
3830 ol.startTextBlock();
3831 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3832 ol.endTextBlock();
3833
3834 ol.startItemList();
3835 for (const auto &pd : *Doxygen::exampleLinkedMap)
3836 {
3838 QCString n=pd->getOutputFileBase();
3839 if (!pd->title().isEmpty())
3840 {
3841 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3842 if (addToIndex)
3843 {
3844 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3845 }
3846 }
3847 else
3848 {
3849 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3850 if (addToIndex)
3851 {
3852 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3853 }
3854 }
3855 ol.endItemListItem();
3856 //ol.writeString("\n");
3857 }
3858 ol.endItemList();
3859
3860 if (addToIndex)
3861 {
3862 Doxygen::indexList->decContentsDepth();
3863 }
3864 endFile(ol);
3866}

References OutputList::disable, Docbook, endFile, OutputList::endItemList, OutputList::endItemListItem, OutputList::endTextBlock, endTitle, Doxygen::exampleLinkedMap, Examples, FALSE, filterTitle, LayoutNavEntry::find, Doxygen::indexList, LayoutDocManager::instance, LayoutNavEntry::intro, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startItemList, OutputList::startItemListItem, OutputList::startTextBlock, startTitle, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible and OutputList::writeObjectLink.

Referenced by writeIndexHierarchyEntries.

writeFileIndex()

void writeFileIndex (OutputList & ol)
static

Definition at line 1542 of file index.cpp.

1543{
1544 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1545
1549
1550 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1551 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1552 QCString title = lne ? lne->title() : theTranslator->trFileList();
1553 bool addToIndex = lne==nullptr || lne->visible();
1554
1555 startFile(ol,"files",QCString(),title,HighlightedItem::Files);
1556 startTitle(ol,QCString());
1557 //if (!Config_getString(PROJECT_NAME).isEmpty())
1558 //{
1559 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1560 //}
1561 ol.parseText(title);
1562 endTitle(ol,QCString(),QCString());
1563 ol.startContents();
1564 ol.startTextBlock();
1565
1566 if (addToIndex)
1567 {
1568 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
1569 Doxygen::indexList->incContentsDepth();
1570 }
1571
1572 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1573 ol.endTextBlock();
1574
1575 // ---------------
1576 // Flat file index
1577 // ---------------
1578
1579 // 1 {
1582
1583 ol.startIndexList();
1584 if (Config_getBool(FULL_PATH_NAMES))
1585 {
1586 std::unordered_map<std::string,size_t> pathMap;
1587 std::vector<FilesInDir> outputFiles;
1588
1589 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1590 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1591 {
1592 for (const auto &fd : *fn)
1593 {
1594 QCString path=fd->getPath();
1595 if (path.isEmpty()) path="[external]";
1596 auto it = pathMap.find(path.str());
1597 if (it!=pathMap.end()) // existing path -> append
1598 {
1599 outputFiles.at(it->second).files.push_back(fd.get());
1600 }
1601 else // new path -> create path entry + append
1602 {
1603 pathMap.emplace(path.str(),outputFiles.size());
1604 outputFiles.emplace_back(path);
1605 outputFiles.back().files.push_back(fd.get());
1606 }
1607 }
1608 }
1609
1610 // sort the files by path
1611 std::stable_sort(outputFiles.begin(),
1612 outputFiles.end(),
1613 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1614 // sort the files inside the directory by name
1615 for (auto &fp : outputFiles)
1616 {
1617 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1618 }
1619 // write the results
1620 for (const auto &fp : outputFiles)
1621 {
1622 for (const auto &fd : fp.files)
1623 {
1625 }
1626 }
1627 }
1628 else
1629 {
1630 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1631 {
1632 for (const auto &fd : *fn)
1633 {
1634 writeSingleFileIndex(ol,fd.get());
1635 }
1636 }
1637 }
1638 ol.endIndexList();
1639
1640 // 1 }
1642
1643 // ---------------
1644 // Hierarchical file index for HTML
1645 // ---------------
1648
1649 {
1650 FTVHelp ftv(false);
1651 writeDirHierarchy(ol,&ftv,addToIndex);
1652 TextStream t;
1654 ol.writeString(t.str().c_str());
1655 }
1656
1658 // ------
1659
1660 if (addToIndex)
1661 {
1662 Doxygen::indexList->decContentsDepth();
1663 }
1664
1665 endFile(ol);
1667}

References compareFileDefs, Config_getBool, OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endIndexList, OutputList::endTextBlock, endTitle, Files, LayoutNavEntry::find, QCString::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Doxygen::inputNameLinkedMap, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, QCString::isEmpty, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startIndexList, OutputList::startTextBlock, startTitle, QCString::str, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeDirHierarchy, writeSingleFileIndex and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeFileLinkForMember()

void writeFileLinkForMember (OutputList & ol, const MemberDef * md, const QCString & separator, QCString & prevFileName)
static

Definition at line 2692 of file index.cpp.

2692static void writeFileLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2693 QCString &prevFileName)
2694{
2695 const FileDef *fd=md->getFileDef();
2696 if (fd && prevFileName!=fd->name())
2697 {
2698 ol.writeString(separator);
2700 fd->name());
2701 prevFileName = fd->name();
2702 }
2703}

References Definition::anchor, MemberDef::getFileDef, Definition::getOutputFileBase, Definition::getReference, Definition::name, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeMemberList.

writeFileMemberIndex()

void writeFileMemberIndex (OutputList & ol)
static

Definition at line 3417 of file index.cpp.

3418{
3419 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3420 bool addToIndex = lne==nullptr || lne->visible();
3421 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3422 {
3423 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3424 Doxygen::indexList->incContentsDepth();
3425 }
3435 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3436 {
3437 Doxygen::indexList->decContentsDepth();
3438 }
3439
3440}

References FileMemberHighlight::All, FileMemberHighlight::Defines, FileMemberHighlight::Dictionaries, FileMemberHighlight::Enums, FileMemberHighlight::EnumValues, LayoutNavEntry::find, FileMemberHighlight::Functions, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutDocManager::rootNavEntry, FileMemberHighlight::Sequences, theTranslator, LayoutNavEntry::title, FileMemberHighlight::Typedefs, FileMemberHighlight::Variables, LayoutNavEntry::visible and writeFileMemberIndexFiltered.

Referenced by writeIndexHierarchyEntries.

writeFileMemberIndexFiltered()

void writeFileMemberIndexFiltered (OutputList & ol, FileMemberHighlight::Enum hl)
static

Definition at line 3293 of file index.cpp.

3294{
3295 const auto &index = Index::instance();
3296 if (index.numDocumentedFileMembers(hl)==0) return;
3297
3298 bool disableIndex = Config_getBool(DISABLE_INDEX);
3299 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3300 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3301 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3302 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3303
3304 bool multiPageIndex=FALSE;
3305 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3306 {
3307 multiPageIndex=TRUE;
3308 }
3309
3312
3314 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3315 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3316 bool addToIndex = lne==nullptr || lne->visible();
3317
3318 if (addToIndex)
3319 {
3320 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3321 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3322 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3323 }
3324
3325 bool first=TRUE;
3326 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3327 {
3328 QCString fileName = getFmhlInfo(hl)->fname;
3329 if (multiPageIndex)
3330 {
3331 QCString cs(letter);
3332 if (!first)
3333 {
3334 fileName+="_"+letterToLabel(cs);
3335 }
3336 if (addToIndex)
3337 {
3338 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3339 }
3340 }
3341
3342 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3343
3344 auto writeQuickLinks = [&,cap_letter=letter]()
3345 {
3347 if (!dynamicMenus)
3348 {
3350
3351 // index item for all file member lists
3354 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3356
3357 // index items for per category member lists
3358 for (int i=1;i<FileMemberHighlight::Total;i++)
3359 {
3360 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3361 {
3363 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3364 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3366 }
3367 }
3368
3370
3371 if (quickIndex)
3372 {
3373 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3374 getFmhlInfo(hl)->fname,multiPageIndex);
3375 }
3376
3377 ol.writeString("</div><!-- main-nav -->\n");
3378 }
3379 };
3380
3381 ol.startFile(fileName+extension,QCString(),title);
3383 if (!disableIndex && !quickLinksAfterSplitbar)
3384 {
3385 writeQuickLinks();
3386 }
3387 ol.endQuickIndices();
3388 ol.writeSplitBar(fileName,QCString());
3389 if (quickLinksAfterSplitbar)
3390 {
3391 writeQuickLinks();
3392 if (!dynamicMenus)
3393 {
3394 ol.writeString("<div id=\"container\">\n");
3395 ol.writeString("<div id=\"doc-content\">\n");
3396 }
3397 }
3398 ol.writeSearchInfo();
3399
3400 ol.startContents();
3401
3402 ol.startTextBlock();
3403 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3404 ol.endTextBlock();
3405
3406 writeMemberList(ol,quickIndex,
3407 multiPageIndex ? letter : std::string(),
3408 index.isFileIndexLetterUsed(hl),
3410 endFile(ol);
3411 first=FALSE;
3412 }
3413 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3415}

References FileMemberHighlight::All, Config_getBool, OutputList::disableAllBut, endFile, endQuickIndexItem, endQuickIndexList, OutputList::endQuickIndices, OutputList::endTextBlock, FALSE, LayoutNavEntry::find, fixSpaces, FmhlInfo::fname, getFmhlInfo, Globals, Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, letterToLabel, MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, OutputList::startFile, startQuickIndexItem, startQuickIndexList, OutputList::startQuickIndices, OutputList::startTextBlock, theTranslator, LayoutNavEntry::title, FileMemberHighlight::Total, TRUE, Definition::TypeFile, LayoutNavEntry::visible, writeMemberList, OutputList::writeQuickLinks, writeQuickMemberIndex, OutputList::writeSearchInfo, OutputList::writeSplitBar and OutputList::writeString.

Referenced by writeFileMemberIndex.

writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy (OutputList & ol)
static

Definition at line 1205 of file index.cpp.

1206{
1207 if (Index::instance().numHierarchyClasses()==0) return;
1209 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1210 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1211 startFile(ol,"inherits",QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1212 startTitle(ol,QCString());
1213 ol.parseText(title);
1214 endTitle(ol,QCString(),QCString());
1215 ol.startContents();
1216 ol.startTextBlock();
1217 ol.startParagraph();
1218 ol.startTextLink("hierarchy",QCString());
1219 ol.parseText(theTranslator->trGotoTextualHierarchy());
1220 ol.endTextLink();
1221 ol.endParagraph();
1222 ol.endTextBlock();
1225 endFile(ol);
1226 ol.enableAll();
1227}

References ClassHierarchy, OutputList::disableAllBut, OutputList::enableAll, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, FALSE, LayoutNavEntry::find, Html, Index::instance, LayoutDocManager::instance, OutputList::parseText, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, theTranslator, LayoutNavEntry::title and OutputList::writeGraphicalHierarchy.

Referenced by writeIndexHierarchyEntries.

writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy (OutputList & ol)
static

Definition at line 1415 of file index.cpp.

1416{
1417 if (Index::instance().numHierarchyExceptions()==0) return;
1419 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1420 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1421 startFile(ol,"exceptioninherits",QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1422 startTitle(ol,QCString());
1423 ol.parseText(title);
1424 endTitle(ol,QCString(),QCString());
1425 ol.startContents();
1426 ol.startTextBlock();
1427 ol.startParagraph();
1428 ol.startTextLink("exceptionhierarchy",QCString());
1429 ol.parseText(theTranslator->trGotoTextualHierarchy());
1430 ol.endTextLink();
1431 ol.endParagraph();
1432 ol.endTextBlock();
1435 endFile(ol);
1436 ol.enableAll();
1437}

References OutputList::disableAllBut, OutputList::enableAll, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, ClassDef::Exception, ExceptionHierarchy, FALSE, LayoutNavEntry::find, Html, Index::instance, LayoutDocManager::instance, OutputList::parseText, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, theTranslator, LayoutNavEntry::title and OutputList::writeGraphicalHierarchy.

Referenced by writeIndexHierarchyEntries.

writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy (OutputList & ol)
static

Definition at line 1310 of file index.cpp.

1311{
1312 if (Index::instance().numHierarchyInterfaces()==0) return;
1314 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1315 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1316 startFile(ol,"interfaceinherits",QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1317 startTitle(ol,QCString());
1318 ol.parseText(title);
1319 endTitle(ol,QCString(),QCString());
1320 ol.startContents();
1321 ol.startTextBlock();
1322 ol.startParagraph();
1323 ol.startTextLink("interfacehierarchy",QCString());
1324 ol.parseText(theTranslator->trGotoTextualHierarchy());
1325 ol.endTextLink();
1326 ol.endParagraph();
1327 ol.endTextBlock();
1330 endFile(ol);
1331 ol.enableAll();
1332}

References OutputList::disableAllBut, OutputList::enableAll, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, FALSE, LayoutNavEntry::find, Html, Index::instance, LayoutDocManager::instance, ClassDef::Interface, InterfaceHierarchy, OutputList::parseText, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, theTranslator, LayoutNavEntry::title and OutputList::writeGraphicalHierarchy.

Referenced by writeIndexHierarchyEntries.

writeGraphInfo()

void writeGraphInfo (OutputList & ol)

Definition at line 4035 of file index.cpp.

4036{
4037 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4040
4042 gd.writeGraph(Config_getString(HTML_OUTPUT));
4043
4044 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4045 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4046 // temporarily disable the stripping of comments for our own code example!
4047 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4048 // temporarily disable create subdirs for linking to our example
4049 Config_updateBool(CREATE_SUBDIRS,FALSE);
4050
4051 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4052 startTitle(ol,QCString());
4053 ol.parseText(theTranslator->trLegendTitle());
4054 endTitle(ol,QCString(),QCString());
4055 ol.startContents();
4056 QCString legendDocs = theTranslator->trLegendDocs();
4057 int s = legendDocs.find("<center>");
4058 int e = legendDocs.find("</center>");
4060 if (imgExt=="svg" && s!=-1 && e!=-1)
4061 {
4062 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4063 //printf("legendDocs=%s\n",qPrint(legendDocs));
4064 }
4065
4066 {
4067 auto fd = createFileDef("","graph_legend.dox");
4068 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4070 }
4071
4072 // restore config settings
4073 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4074 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4075
4076 endFile(ol);
4078}

References Config_getBool, Config_getString, Config_updateBool, createFileDef, OutputList::disableAllBut, endFile, endTitle, FALSE, QCString::find, OutputList::generateDoc, getDotImageExtension, Html, QCString::left, QCString::mid, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, OutputList::startContents, startFile, startTitle, theTranslator and DotLegendGraph::writeGraph.

Referenced by generateOutput.

writeGroupHierarchy()

void writeGroupHierarchy (OutputList & ol, FTVHelp * ftv, bool addToIndex)
static

Definition at line 4329 of file index.cpp.

4329static void writeGroupHierarchy(OutputList &ol, FTVHelp* ftv,bool addToIndex)
4330{
4331 if (ftv)
4332 {
4335 }
4337 for (const auto &gd : *Doxygen::groupLinkedMap)
4338 {
4339 if (gd->isVisibleInHierarchy())
4340 {
4341 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4342 }
4343 }
4344 endIndexHierarchy(ol,0);
4345 if (ftv)
4346 {
4348 }
4349}

References OutputList::disable, endIndexHierarchy, Doxygen::groupLinkedMap, Html, OutputList::popGeneratorState, OutputList::pushGeneratorState, startIndexHierarchy and writeGroupTreeNode.

Referenced by writeTopicIndex.

writeGroupTreeNode()

void writeGroupTreeNode (OutputList & ol, const GroupDef * gd, int level, FTVHelp * ftv, bool addToIndex)
static

write groups as hierarchical trees

Definition at line 4086 of file index.cpp.

4086static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4087{
4088 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4089 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4090 if (level>20)
4091 {
4092 warn(gd->getDefFileName(),gd->getDefLine(),
4093 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4094 return;
4095 }
4096
4097 /* Some groups should appear twice under different parent-groups.
4098 * That is why we should not check if it was visited
4099 */
4100 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4101 {
4102 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4103 // write group info
4104 bool hasSubGroups = !gd->getSubGroups().empty();
4105 bool hasSubPages = !gd->getPages().empty();
4106 size_t numSubItems = 0;
4107 for (const auto &ml : gd->getMemberLists())
4108 {
4109 if (ml->listType().isDocumentation())
4110 {
4111 numSubItems += ml->size();
4112 }
4113 }
4114 numSubItems += gd->getNamespaces().size();
4115 numSubItems += gd->getClasses().size();
4116 numSubItems += gd->getFiles().size();
4117 numSubItems += gd->getConcepts().size();
4118 numSubItems += gd->getDirs().size();
4119 numSubItems += gd->getPages().size();
4120
4121 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4122 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4123 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4124
4125 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4126 if (addToIndex)
4127 {
4128 Doxygen::indexList->addContentsItem(isDir,title,
4130 isDir,TRUE,nullptr,titleAsHtml);
4131 Doxygen::indexList->incContentsDepth();
4132 }
4133 if (ftv)
4134 {
4135 ftv->addContentsItem(hasSubGroups,title,
4137 FALSE,FALSE,gd,titleAsHtml);
4138 ftv->incContentsDepth();
4139 }
4140
4141 //ol.writeListItem();
4142 //ol.startTextLink(gd->getOutputFileBase(),0);
4143 //parseText(ol,gd->groupTitle());
4144 //ol.endTextLink();
4145
4148 ol.parseText(gd->groupTitle());
4150 if (gd->isReference())
4151 {
4152 ol.startTypewriter();
4153 ol.docify(" [external]");
4154 ol.endTypewriter();
4155 }
4156
4157 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4158 {
4159 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4160 {
4161 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4162 if (lmd)
4163 {
4164 MemberList *ml = gd->getMemberList(lmd->type);
4165 if (ml)
4166 {
4167 for (const auto &md : *ml)
4168 {
4169 const MemberVector &enumList = md->enumFieldList();
4170 isDir = !enumList.empty() && md->isEnumerate();
4171 if (md->isVisible() && !md->isAnonymous())
4172 {
4173 Doxygen::indexList->addContentsItem(isDir,
4174 md->qualifiedName(),md->getReference(),
4175 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4176 }
4177 if (isDir)
4178 {
4179 Doxygen::indexList->incContentsDepth();
4180 for (const auto &emd : enumList)
4181 {
4182 if (emd->isVisible())
4183 {
4184 Doxygen::indexList->addContentsItem(FALSE,
4185 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4186 emd->anchor(),FALSE,addToIndex);
4187 }
4188 }
4189 Doxygen::indexList->decContentsDepth();
4190 }
4191 }
4192 }
4193 }
4194 }
4195 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4196 {
4197 for (const auto &cd : gd->getClasses())
4198 {
4199 //bool nestedClassInSameGroup =
4200 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4201 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4202 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4203 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4204 {
4206 LayoutDocManager::Class,
4207 cd->displayName(),
4208 cd->anchor(),
4209 addToIndex,
4210 TRUE);
4211 }
4212 }
4213 }
4214 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4215 {
4216 for (const auto &nd : gd->getNamespaces())
4217 {
4218 if (nd->isVisible())
4219 {
4220 Doxygen::indexList->addContentsItem(FALSE,
4221 nd->displayName(),nd->getReference(),
4222 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4223 }
4224 }
4225 }
4226 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4227 {
4228 for (const auto &cd : gd->getConcepts())
4229 {
4230 if (cd->isVisible())
4231 {
4232 Doxygen::indexList->addContentsItem(FALSE,
4233 cd->displayName(),cd->getReference(),
4234 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4235 }
4236 }
4237 }
4238 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4239 {
4240 for (const auto &fd : gd->getFiles())
4241 {
4242 if (fd->isVisible())
4243 {
4244 Doxygen::indexList->addContentsItem(FALSE,
4245 fd->displayName(),fd->getReference(),
4246 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4247 }
4248 }
4249 }
4250 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4251 {
4252 for (const auto &dd : gd->getDirs())
4253 {
4254 if (dd->isVisible())
4255 {
4256 Doxygen::indexList->addContentsItem(FALSE,
4257 dd->shortName(),dd->getReference(),
4258 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4259 }
4260 }
4261 }
4262 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4263 {
4264 for (const auto &pd : gd->getPages())
4265 {
4266 const SectionInfo *si=nullptr;
4267 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4268 hasSubPages = pd->hasSubPages();
4269 bool hasSections = pd->hasSections();
4270 QCString pageTitle;
4271 if (pd->title().isEmpty())
4272 pageTitle=pd->name();
4273 else
4274 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4275 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4276 Doxygen::indexList->addContentsItem(
4277 hasSubPages || hasSections,
4278 pageTitle,
4279 gd->getReference(),
4280 gd->getOutputFileBase(),
4281 si ? si->label() : QCString(),
4282 hasSubPages || hasSections,
4283 TRUE,
4284 nullptr,
4285 pageTitleAsHtml); // addToNavIndex
4286 if (hasSections || hasSubPages)
4287 {
4288 Doxygen::indexList->incContentsDepth();
4289 }
4290 if (hasSections)
4291 {
4292 pd->addSectionsToIndex();
4293 }
4294 writePages(pd,nullptr);
4295 if (hasSections || hasSubPages)
4296 {
4297 Doxygen::indexList->decContentsDepth();
4298 }
4299 }
4300 }
4301 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4302 {
4303 if (!gd->getSubGroups().empty())
4304 {
4305 startIndexHierarchy(ol,level+1);
4306 for (const auto &subgd : gd->getSubGroups())
4307 {
4308 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4309 }
4310 endIndexHierarchy(ol,level+1);
4311 }
4312 }
4313 }
4314
4315 ol.endIndexListItem();
4316
4317 if (addToIndex)
4318 {
4319 Doxygen::indexList->decContentsDepth();
4320 }
4321 if (ftv)
4322 {
4323 ftv->decContentsDepth();
4324 }
4325 //gd->visited=TRUE;
4326 }
4327}

References FTVHelp::addContentsItem, addMembersToIndex, Config_getBool, FTVHelp::decContentsDepth, OutputList::docify, LinkedRefMap< T, Hash, KeyEqual, Map >::empty, MemberVector::empty, endIndexHierarchy, OutputList::endIndexItem, OutputList::endIndexListItem, OutputList::endTypewriter, FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find, GroupDef::getClasses, GroupDef::getConcepts, Definition::getDefFileName, Definition::getDefLine, GroupDef::getDirs, GroupDef::getFiles, GroupDef::getMemberList, GroupDef::getMemberLists, GroupDef::getNamespaces, Definition::getOutputFileBase, GroupDef::getPages, Definition::getReference, GroupDef::getSubGroups, GroupDef::groupTitle, FTVHelp::incContentsDepth, Doxygen::indexList, LayoutDocManager::instance, SectionManager::instance, GroupDef::isASubGroup, Definition::isReference, Definition::isVisible, GroupDef::isVisibleInHierarchy, SectionInfo::label, Definition::name, parseCommentAsHtml, parseCommentAsText, OutputList::parseText, LinkedRefMap< T, Hash, KeyEqual, Map >::size, startIndexHierarchy, OutputList::startIndexItem, OutputList::startIndexListItem, OutputList::startTypewriter, TRUE, LayoutDocEntryMemberDef::type, warn, writeGroupTreeNode and writePages.

Referenced by writeGroupHierarchy and writeGroupTreeNode.

writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex (OutputList & ol)
static

Definition at line 1336 of file index.cpp.

1337{
1338 if (Index::instance().numHierarchyExceptions()==0) return;
1340 //1.{
1342
1343 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1344 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1345 bool addToIndex = lne==nullptr || lne->visible();
1346
1347 startFile(ol,"exceptionhierarchy",QCString(), title, HighlightedItem::ExceptionHierarchy);
1348 startTitle(ol,QCString());
1349 ol.parseText(title);
1350 endTitle(ol,QCString(),QCString());
1351 ol.startContents();
1352 ol.startTextBlock();
1353
1354 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1355 {
1358 ol.startParagraph();
1359 ol.startTextLink("exceptioninherits",QCString());
1360 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1361 ol.endTextLink();
1362 ol.endParagraph();
1365 }
1366 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1367 ol.endTextBlock();
1368
1369 // ---------------
1370 // Static exception hierarchy for Latex/RTF
1371 // ---------------
1373 //2.{
1375 Doxygen::indexList->disable();
1376
1377 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1378
1379 Doxygen::indexList->enable();
1381 //2.}
1382
1383 // ---------------
1384 // Dynamic exception hierarchical index for HTML
1385 // ---------------
1387 //2.{
1389
1390 {
1391 if (addToIndex)
1392 {
1393 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1394 }
1395 FTVHelp ftv(false);
1396 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1397 TextStream t;
1401 ol.writeString(t.str().c_str());
1403 }
1405 //2.}
1406 // ------
1407
1408 endFile(ol);
1410 //1.}
1411}

References Config_getBool, OutputList::disable, OutputList::disableAllBut, OutputList::enable, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, ClassDef::Exception, ExceptionHierarchy, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Latex, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, RTF, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeClassHierarchy and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeHierarchicalIndex()

void writeHierarchicalIndex (OutputList & ol)
static

Definition at line 1124 of file index.cpp.

1125{
1126 if (Index::instance().numHierarchyClasses()==0) return;
1128 //1.{
1131
1132 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1133 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1134 bool addToIndex = lne==nullptr || lne->visible();
1135
1136 startFile(ol,"hierarchy",QCString(), title, HighlightedItem::ClassHierarchy);
1137 startTitle(ol,QCString());
1138 ol.parseText(title);
1139 endTitle(ol,QCString(),QCString());
1140 ol.startContents();
1141 ol.startTextBlock();
1142
1143 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1144 {
1149 ol.startParagraph();
1150 ol.startTextLink("inherits",QCString());
1151 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1152 ol.endTextLink();
1153 ol.endParagraph();
1155 }
1156 ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription());
1157 ol.endTextBlock();
1158
1159 // ---------------
1160 // Static class hierarchy for Latex/RTF
1161 // ---------------
1163 //2.{
1165 Doxygen::indexList->disable();
1166
1167 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1168
1169 Doxygen::indexList->enable();
1171 //2.}
1172
1173 // ---------------
1174 // Dynamic class hierarchical index for HTML
1175 // ---------------
1177 //2.{
1179
1180 {
1181 if (addToIndex)
1182 {
1183 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
1184 }
1185 FTVHelp ftv(false);
1186 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1187 TextStream t;
1191 ol.writeString(t.str().c_str());
1193 }
1195 //2.}
1196 // ------
1197
1198 endFile(ol);
1200 //1.}
1201}

References ClassDef::Class, ClassHierarchy, Config_getBool, OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Latex, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, RTF, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeClassHierarchy and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex (OutputList & ol)
static

Definition at line 1231 of file index.cpp.

1232{
1233 if (Index::instance().numHierarchyInterfaces()==0) return;
1235 //1.{
1237
1238 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1239 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1240 bool addToIndex = lne==nullptr || lne->visible();
1241
1242 startFile(ol,"interfacehierarchy",QCString(), title, HighlightedItem::InterfaceHierarchy);
1243 startTitle(ol,QCString());
1244 ol.parseText(title);
1245 endTitle(ol,QCString(),QCString());
1246 ol.startContents();
1247 ol.startTextBlock();
1248
1249 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1250 {
1253 ol.startParagraph();
1254 ol.startTextLink("interfaceinherits",QCString());
1255 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1256 ol.endTextLink();
1257 ol.endParagraph();
1260 }
1261 ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription());
1262 ol.endTextBlock();
1263
1264 // ---------------
1265 // Static interface hierarchy for Latex/RTF
1266 // ---------------
1268 //2.{
1270 Doxygen::indexList->disable();
1271
1272 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1273
1274 Doxygen::indexList->enable();
1276 //2.}
1277
1278 // ---------------
1279 // Dynamic interface hierarchical index for HTML
1280 // ---------------
1282 //2.{
1284
1285 {
1286 if (addToIndex)
1287 {
1288 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1289 }
1290 FTVHelp ftv(false);
1291 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1292 TextStream t;
1296 ol.writeString(t.str().c_str());
1298 }
1300 //2.}
1301 // ------
1302
1303 endFile(ol);
1305 //1.}
1306}

References Config_getBool, OutputList::disable, OutputList::disableAllBut, OutputList::enable, endFile, OutputList::endParagraph, OutputList::endTextBlock, OutputList::endTextLink, endTitle, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, ClassDef::Interface, InterfaceHierarchy, LayoutNavEntry::intro, Latex, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, RTF, OutputList::startContents, startFile, OutputList::startParagraph, OutputList::startTextBlock, OutputList::startTextLink, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeClassHierarchy and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeIndex()

void writeIndex (OutputList & ol)
static

Definition at line 4809 of file index.cpp.

4809static void writeIndex(OutputList &ol)
4810{
4811 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4812 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4813 bool disableIndex = Config_getBool(DISABLE_INDEX);
4814 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4815 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4816 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4817 QCString projectName = Config_getString(PROJECT_NAME);
4818 // save old generator state
4820
4821 QCString projPrefix;
4822 if (!projectName.isEmpty())
4823 {
4824 projPrefix=projectName+" ";
4825 }
4826
4827 //--------------------------------------------------------------------
4828 // write HTML index
4829 //--------------------------------------------------------------------
4831
4832 QCString defFileName =
4833 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4834 int defLine =
4835 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4836
4837 QCString title, titleAsHtml;
4838 if (!mainPageHasTitle())
4839 {
4840 title = theTranslator->trMainPage();
4841 }
4842 else if (Doxygen::mainPage)
4843 {
4844 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4845 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4846 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4847 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4848 }
4849
4850 QCString indexName="index";
4851 ol.startFile(indexName,QCString(),title);
4852
4854 {
4855 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4856 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4857 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4858 if (hasTitle) // to avoid duplicate entries in the treeview
4859 {
4860 Doxygen::indexList->addContentsItem(hasSubs,
4861 title,
4862 QCString(),
4863 indexName,
4864 QCString(),
4865 hasSubs,
4866 TRUE,
4867 nullptr,
4868 titleAsHtml);
4869 }
4870 if (hasSubs)
4871 {
4872 writePages(Doxygen::mainPage.get(),nullptr);
4873 }
4874 }
4875
4876 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4878 if (!disableIndex && !quickLinksAfterSplitbar)
4879 {
4881 }
4882 ol.endQuickIndices();
4883 ol.writeSplitBar(indexName,QCString());
4884 if (quickLinksAfterSplitbar)
4885 {
4887 }
4888 ol.writeSearchInfo();
4889 bool headerWritten=FALSE;
4891 {
4892 if (!Doxygen::mainPage->title().isEmpty())
4893 {
4894 if (Doxygen::mainPage->title().lower() != "notitle")
4895 ol.startPageDoc(Doxygen::mainPage->title());
4896 else
4897 ol.startPageDoc("");
4898 }
4899 else
4900 ol.startPageDoc(projectName);
4901 }
4902 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4903 {
4904 if (Doxygen::mainPage->title().lower()!="notitle")
4905 {
4908 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4909 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4910 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT),false);
4911 headerWritten = TRUE;
4912 }
4913 }
4914 else
4915 {
4916 if (!projectName.isEmpty())
4917 {
4920 ol.parseText(theTranslator->trDocumentation(projectName));
4921 headerWritten = TRUE;
4922 }
4923 }
4924 if (headerWritten)
4925 {
4927 ol.endHeaderSection();
4928 }
4929
4930 ol.startContents();
4931 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4932 {
4934 }
4935
4937 {
4938 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4939 {
4940 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4941 }
4942
4943 ol.startTextBlock();
4944 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4945 Doxygen::mainPage->documentation(),true,false,
4946 QCString(),false,false,
4947 Config_getBool(MARKDOWN_SUPPORT),false);
4948 ol.endTextBlock();
4949 ol.endPageDoc();
4950 }
4951
4954 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4955 Doxygen::indexList->addIndexFile(fn);
4956
4957 if (Doxygen::mainPage &&
4958 generateTreeView &&
4959 pageOutlinePanel &&
4960 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4961 Doxygen::mainPage->hasSections()
4962 )
4963 {
4964 ol.writeString("</div><!-- doc-content -->\n");
4965 ol.endContents();
4966 Doxygen::mainPage->writePageNavigation(ol);
4967 ol.writeString("</div><!-- container -->\n");
4968 endFile(ol,true,true);
4969 }
4970 else
4971 {
4972 endFile(ol);
4973 }
4974
4976
4977 //--------------------------------------------------------------------
4978 // write LaTeX/RTF index
4979 //--------------------------------------------------------------------
4983
4985 {
4986 msg("Generating main page...\n");
4987 Doxygen::mainPage->writeDocumentation(ol);
4988 }
4989
4990 ol.startFile("refman",QCString(),QCString());
4994
4995 if (projPrefix.isEmpty())
4996 {
4997 ol.parseText(theTranslator->trReferenceManual());
4998 }
4999 else
5000 {
5001 ol.parseText(projPrefix);
5002 }
5003
5004 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5005 {
5007 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
5008 QCString(),false,false);
5009 ol.endProjectNumber();
5010 }
5013 ol.parseText(theTranslator->trGeneratedBy());
5017
5018 ol.lastIndexPage();
5020 {
5023 }
5024 const auto &index = Index::instance();
5025 if (index.numDocumentedPages()>0)
5026 {
5029 }
5030
5032 if (!Config_getBool(LATEX_HIDE_INDICES))
5033 {
5034 //if (indexedPages>0)
5035 //{
5036 // ol.startIndexSection(isPageIndex);
5037 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5038 // ol.endIndexSection(isPageIndex);
5039 //}
5040 if (index.numDocumentedModules()>0)
5041 {
5043 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5045 }
5046 if (index.numDocumentedGroups()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5051 }
5052 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5053 {
5054 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5055 if (lne)
5056 {
5058 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5060 }
5061 }
5062 if (index.numDocumentedConcepts()>0)
5063 {
5065 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5067 }
5068 if (index.numHierarchyInterfaces()>0)
5069 {
5071 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5073 }
5074 if (index.numHierarchyClasses()>0)
5075 {
5076 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5077 if (lne)
5078 {
5080 ol.parseText(/*projPrefix+*/
5081 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5082 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5083 theTranslator->trHierarchicalIndex()
5084 ));
5086 }
5087 }
5088 if (index.numHierarchyExceptions()>0)
5089 {
5091 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5093 }
5094 if (index.numAnnotatedInterfacesPrinted()>0)
5095 {
5097 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5099 }
5100 if (index.numAnnotatedClassesPrinted()>0)
5101 {
5103 ol.parseText(/*projPrefix+*/
5104 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5105 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5106 theTranslator->trCompoundIndex()
5107 ));
5109 }
5110 if (index.numAnnotatedStructsPrinted()>0)
5111 {
5113 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5115 }
5116 if (index.numAnnotatedExceptionsPrinted()>0)
5117 {
5119 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5121 }
5122 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5123 {
5125 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5127 }
5128 }
5130
5131 if (index.numDocumentedModules()>0)
5132 {
5134 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5136 }
5137 if (index.numDocumentedGroups()>0)
5138 {
5140 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5142 }
5143 if (index.numDocumentedNamespaces()>0)
5144 {
5146 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5148 }
5149 if (index.numDocumentedConcepts()>0)
5150 {
5152 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5154 }
5155 if (index.numAnnotatedInterfacesPrinted()>0)
5156 {
5158 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5160 }
5161 if (index.numAnnotatedClassesPrinted()>0)
5162 {
5164 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5166 }
5167 if (index.numAnnotatedStructsPrinted()>0)
5168 {
5170 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5172 }
5173 if (index.numAnnotatedExceptionsPrinted()>0)
5174 {
5176 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5178 }
5179 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5180 {
5182 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5184 }
5185 if (!Doxygen::exampleLinkedMap->empty())
5186 {
5188 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5190 }
5192 endFile(ol);
5193
5195}

References addHtmlExtensionIfMissing, Config_getBool, Config_getString, Crawlmap::crawlFileName, OutputList::disable, OutputList::disableAllBut, Docbook, OutputList::enable, OutputList::endContents, endFile, OutputList::endHeaderSection, OutputList::endIndexSection, OutputList::endPageDoc, OutputList::endProjectNumber, OutputList::endQuickIndices, OutputList::endTextBlock, OutputList::endTitleHead, Doxygen::exampleLinkedMap, FALSE, LayoutNavEntry::find, OutputList::generateDoc, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, isClassDocumentation, isClassHierarchyIndex, isCompoundIndex, isConceptDocumentation, isConceptIndex, QCString::isEmpty, isEndIndex, isExampleDocumentation, isFileDocumentation, isFileIndex, isMainPage, isModuleDocumentation, isModuleIndex, isNamespaceDocumentation, isNamespaceIndex, isPageDocumentation, isTitlePageAuthor, isTitlePageStart, isTopicDocumentation, isTopicIndex, OutputList::lastIndexPage, Latex, Main, Doxygen::mainPage, mainPageHasTitle, msg, parseCommentAsHtml, parseCommentAsText, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, qstricmp, LayoutDocManager::rootNavEntry, RTF, OutputList::startContents, OutputList::startFile, OutputList::startHeaderSection, OutputList::startIndexSection, OutputList::startPageDoc, OutputList::startProjectNumber, OutputList::startQuickIndices, OutputList::startTextBlock, OutputList::startTitleHead, theTranslator, TRUE, writePages, OutputList::writeQuickLinks, OutputList::writeSearchInfo, OutputList::writeSplitBar and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeIndexHierarchy()

void writeIndexHierarchy (OutputList & ol)

writeIndexHierarchyEntries()

void writeIndexHierarchyEntries (OutputList & ol, const LayoutNavEntryList & entries)
static

Definition at line 5199 of file index.cpp.

5200{
5201 auto isRef = [](const QCString &s)
5202 {
5203 return s.startsWith("@ref") || s.startsWith("\\ref");
5204 };
5205 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5206 const auto &index = Index::instance();
5207 for (const auto &lne : entries)
5208 {
5209 LayoutNavEntry::Kind kind = lne->kind();
5210 size_t idx = static_cast<size_t>(kind);
5211 if (idx>=indexWritten.size())
5212 {
5213 size_t oldSize = indexWritten.size();
5214 size_t newSize = idx+1;
5215 indexWritten.resize(newSize);
5216 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5217 }
5218 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5219 bool addToIndex=lne->visible();
5220 bool needsClosing=FALSE;
5221 if (!indexWritten.at(idx))
5222 {
5223 switch(kind)
5224 {
5225 case LayoutNavEntry::MainPage:
5226 msg("Generating index page...\n");
5227 writeIndex(ol);
5228 break;
5229 case LayoutNavEntry::Pages:
5230 msg("Generating page index...\n");
5231 writePageIndex(ol);
5232 break;
5233 case LayoutNavEntry::Topics:
5234 msg("Generating topic index...\n");
5235 writeTopicIndex(ol);
5236 break;
5237 case LayoutNavEntry::Modules:
5238 {
5239 if (index.numDocumentedModules()>0 && addToIndex)
5240 {
5241 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5242 Doxygen::indexList->incContentsDepth();
5243 needsClosing=TRUE;
5244 }
5245 }
5246 break;
5247 case LayoutNavEntry::ModuleList:
5248 msg("Generating module index...\n");
5250 break;
5251 case LayoutNavEntry::ModuleMembers:
5252 msg("Generating module member index...\n");
5254 break;
5255 case LayoutNavEntry::Namespaces:
5256 {
5257 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5258 if (showNamespaces)
5259 {
5260 if (index.numDocumentedNamespaces()>0 && addToIndex)
5261 {
5262 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5263 Doxygen::indexList->incContentsDepth();
5264 needsClosing=TRUE;
5265 }
5266 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5267 {
5268 msg("Generating namespace index...\n");
5270 }
5271 }
5272 }
5273 break;
5274 case LayoutNavEntry::NamespaceList:
5275 {
5276 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5277 if (showNamespaces)
5278 {
5279 msg("Generating namespace index...\n");
5281 }
5282 }
5283 break;
5284 case LayoutNavEntry::NamespaceMembers:
5285 msg("Generating namespace member index...\n");
5287 break;
5288 case LayoutNavEntry::Classes:
5289 if (index.numAnnotatedClasses()>0 && addToIndex)
5290 {
5291 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5292 Doxygen::indexList->incContentsDepth();
5293 needsClosing=TRUE;
5294 }
5295 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5296 {
5297 msg("Generating annotated compound index...\n");
5299 }
5300 break;
5301 case LayoutNavEntry::Concepts:
5302 msg("Generating concept index...\n");
5304 break;
5305 case LayoutNavEntry::ClassList:
5306 msg("Generating annotated compound index...\n");
5308 break;
5309 case LayoutNavEntry::ClassIndex:
5310 msg("Generating alphabetical compound index...\n");
5312 break;
5313 case LayoutNavEntry::ClassHierarchy:
5314 msg("Generating hierarchical class index...\n");
5316 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5317 {
5318 msg("Generating graphical class hierarchy...\n");
5320 }
5321 break;
5322 case LayoutNavEntry::ClassMembers:
5323 if (!sliceOpt)
5324 {
5325 msg("Generating member index...\n");
5327 }
5328 break;
5329 case LayoutNavEntry::Interfaces:
5330 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5331 {
5332 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5333 Doxygen::indexList->incContentsDepth();
5334 needsClosing=TRUE;
5335 }
5336 break;
5337 case LayoutNavEntry::InterfaceList:
5338 if (sliceOpt)
5339 {
5340 msg("Generating annotated interface index...\n");
5342 }
5343 break;
5344 case LayoutNavEntry::InterfaceIndex:
5345 if (sliceOpt)
5346 {
5347 msg("Generating alphabetical interface index...\n");
5349 }
5350 break;
5351 case LayoutNavEntry::InterfaceHierarchy:
5352 if (sliceOpt)
5353 {
5354 msg("Generating hierarchical interface index...\n");
5356 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5357 {
5358 msg("Generating graphical interface hierarchy...\n");
5360 }
5361 }
5362 break;
5363 case LayoutNavEntry::Structs:
5364 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5365 {
5366 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5367 Doxygen::indexList->incContentsDepth();
5368 needsClosing=TRUE;
5369 }
5370 break;
5371 case LayoutNavEntry::StructList:
5372 if (sliceOpt)
5373 {
5374 msg("Generating annotated struct index...\n");
5376 }
5377 break;
5378 case LayoutNavEntry::StructIndex:
5379 if (sliceOpt)
5380 {
5381 msg("Generating alphabetical struct index...\n");
5383 }
5384 break;
5385 case LayoutNavEntry::Exceptions:
5386 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5387 {
5388 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5389 Doxygen::indexList->incContentsDepth();
5390 needsClosing=TRUE;
5391 }
5392 break;
5393 case LayoutNavEntry::ExceptionList:
5394 if (sliceOpt)
5395 {
5396 msg("Generating annotated exception index...\n");
5398 }
5399 break;
5400 case LayoutNavEntry::ExceptionIndex:
5401 if (sliceOpt)
5402 {
5403 msg("Generating alphabetical exception index...\n");
5405 }
5406 break;
5407 case LayoutNavEntry::ExceptionHierarchy:
5408 if (sliceOpt)
5409 {
5410 msg("Generating hierarchical exception index...\n");
5412 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5413 {
5414 msg("Generating graphical exception hierarchy...\n");
5416 }
5417 }
5418 break;
5419 case LayoutNavEntry::Files:
5420 {
5421 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5422 {
5423 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5424 Doxygen::indexList->incContentsDepth();
5425 needsClosing=TRUE;
5426 }
5427 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5428 {
5429 msg("Generating file index...\n");
5430 writeFileIndex(ol);
5431 }
5432 }
5433 break;
5434 case LayoutNavEntry::FileList:
5435 msg("Generating file index...\n");
5436 writeFileIndex(ol);
5437 break;
5438 case LayoutNavEntry::FileGlobals:
5439 msg("Generating file member index...\n");
5441 break;
5442 case LayoutNavEntry::Examples:
5443 msg("Generating example index...\n");
5445 break;
5446 case LayoutNavEntry::User:
5447 if (addToIndex)
5448 {
5449 // prepend a ! or ^ marker to the URL to avoid tampering with it
5450 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5451 bool isRelative=url.at(0)=='!';
5452 if (!url.isEmpty() && !isRelative) // absolute URL
5453 {
5454 url.prepend("^"); // prepend ^ to absolute URL
5455 }
5456 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5457 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5458 }
5459 break;
5460 case LayoutNavEntry::UserGroup:
5461 if (addToIndex)
5462 {
5463 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5464 if (!url.isEmpty())
5465 {
5466 if (url=="!") // result of a "[none]" url
5467 {
5468 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5469 }
5470 else
5471 {
5472 bool isRelative=url.at(0)=='!';
5473 if (!isRelative) // absolute URL
5474 {
5475 url.prepend("^"); // prepend ^ to absolute URL
5476 }
5477 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5478 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5479 }
5480 }
5481 else
5482 {
5483 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5484 }
5485 Doxygen::indexList->incContentsDepth();
5486 needsClosing=TRUE;
5487 }
5488 writeUserGroupStubPage(ol,lne.get());
5489 break;
5490 case LayoutNavEntry::None:
5491 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5492 break;
5493 }
5494 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5495 {
5496 indexWritten.at(idx)=TRUE;
5497 }
5498 }
5499 writeIndexHierarchyEntries(ol,lne->children());
5500 if (needsClosing)
5501 {
5502 switch(kind)
5503 {
5504 case LayoutNavEntry::Modules:
5505 case LayoutNavEntry::Namespaces:
5506 case LayoutNavEntry::Classes:
5507 case LayoutNavEntry::Files:
5508 case LayoutNavEntry::UserGroup:
5509 Doxygen::indexList->decContentsDepth();
5510 break;
5511 default:
5512 break;
5513 }
5514 }
5515 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5516 }
5517}

References QCString::at, Config_getBool, correctURL, FALSE, Doxygen::indexList, indexWritten, Index::instance, LayoutDocManager::instance, QCString::isEmpty, msg, QCString::prepend, TRUE, writeAlphabeticalExceptionIndex, writeAlphabeticalIndex, writeAlphabeticalInterfaceIndex, writeAlphabeticalStructIndex, writeAnnotatedExceptionIndex, writeAnnotatedIndex, writeAnnotatedInterfaceIndex, writeAnnotatedStructIndex, writeClassMemberIndex, writeConceptIndex, writeExampleIndex, writeFileIndex, writeFileMemberIndex, writeGraphicalClassHierarchy, writeGraphicalExceptionHierarchy, writeGraphicalInterfaceHierarchy, writeHierarchicalExceptionIndex, writeHierarchicalIndex, writeHierarchicalInterfaceIndex, writeIndex, writeIndexHierarchyEntries, writeModuleIndex, writeModuleMemberIndex, writeNamespaceIndex, writeNamespaceMemberIndex, writePageIndex, writeTopicIndex and writeUserGroupStubPage.

Referenced by writeIndexHierarchy and writeIndexHierarchyEntries.

writeMemberList()

void writeMemberList (OutputList & ol, bool useSections, const std::string & page, const Index::MemberIndexMap & memberIndexMap, Definition::DefType type)
static

Definition at line 2733 of file index.cpp.

2733static void writeMemberList(OutputList &ol,bool useSections,const std::string &page,
2734 const Index::MemberIndexMap &memberIndexMap,
2736{
2737 int index = static_cast<int>(type);
2738 const int numIndices = 4;
2739 ASSERT(index<numIndices);
2740
2741 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2742 QCString &prevNamespaceName);
2743
2744 // each index tab has its own write function
2745 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2746 {
2751 };
2752 QCString prevName;
2753 QCString prevDefName;
2754 bool first=TRUE;
2755 bool firstSection=TRUE;
2756 bool firstItem=TRUE;
2757 const Index::MemberIndexList *mil = nullptr;
2758 std::string letter;
2759 for (const auto &kv : memberIndexMap)
2760 {
2761 if (!page.empty()) // specific page mode
2762 {
2763 auto it = memberIndexMap.find(page);
2764 if (it != memberIndexMap.end())
2765 {
2766 mil = &it->second;
2767 letter = page;
2768 }
2769 }
2770 else // do all pages
2771 {
2772 mil = &kv.second;
2773 letter = kv.first;
2774 }
2775 if (mil==nullptr || mil->empty()) continue;
2776 for (const auto &md : *mil)
2777 {
2778 const char *sep = nullptr;
2779 bool isFunc=!md->isObjCMethod() &&
2780 (md->isFunction() || md->isSlot() || md->isSignal());
2781 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2782 int startIndex = getPrefixIndex(name);
2783 if (name.data()+startIndex!=prevName) // new entry
2784 {
2785 if ((prevName.isEmpty() ||
2786 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2787 useSections) // new section
2788 {
2789 if (!firstItem) ol.endItemListItem();
2790 if (!firstSection) ol.endItemList();
2791 QCString cs = letterToLabel(letter.c_str());
2792 QCString anchor=QCString("index_")+convertToId(cs);
2793 QCString title=QCString("- ")+letter.c_str()+" -";
2794 ol.startSection(anchor,title,SectionType::Subsection);
2795 ol.docify(title);
2797 ol.startItemList();
2798 firstSection=FALSE;
2799 firstItem=TRUE;
2800 }
2801 else if (!useSections && first)
2802 {
2803 ol.startItemList();
2804 first=FALSE;
2805 }
2806
2807 // member name
2808 if (!firstItem) ol.endItemListItem();
2810 firstItem=FALSE;
2811 ol.docify(name);
2812 if (isFunc) ol.docify("()");
2813 //ol.writeString("\n");
2814
2815 // link to class
2816 prevDefName="";
2817 sep = "&#160;:&#160;";
2818 prevName = name.data()+startIndex;
2819 }
2820 else // same entry
2821 {
2822 sep = ", ";
2823 // link to class for other members with the same name
2824 }
2825 if (index<numIndices)
2826 {
2827 // write the link for the specific list type
2828 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2829 }
2830 }
2831 if (!page.empty())
2832 {
2833 break;
2834 }
2835 }
2836 if (!firstItem) ol.endItemListItem();
2837 ol.endItemList();
2838}

References ASSERT, QCString::at, convertToId, QCString::data, OutputList::docify, OutputList::endItemList, OutputList::endItemListItem, OutputList::endSection, FALSE, getPrefixIndex, QCString::isEmpty, letterToLabel, OutputList::startItemList, OutputList::startItemListItem, OutputList::startSection, SectionType::Subsection, TRUE, Definition::TypeModule, writeClassLinkForMember, writeFileLinkForMember, writeModuleLinkForMember and writeNamespaceLinkForMember.

Referenced by writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered and writeNamespaceMemberIndexFiltered.

writeMemberToIndex()

void writeMemberToIndex (const Definition * def, const MemberDef * md, bool addToIndex)
static

Definition at line 468 of file index.cpp.

468static void writeMemberToIndex(const Definition *def,const MemberDef *md,bool addToIndex)
469{
470 bool isAnonymous = md->isAnonymous();
471 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
472 const MemberVector &enumList = md->enumFieldList();
473 bool isDir = !enumList.empty() && md->isEnumerate();
474 auto defType = def->definitionType();
475 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
476 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
477 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
478 md->qualifiedName() : md->name();
479 if (md->getOuterScope()==def ||
480 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
482 {
483 Doxygen::indexList->addContentsItem(isDir,
484 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
485 }
486 else // inherited member
487 {
488 Doxygen::indexList->addContentsItem(isDir,
489 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
490 }
491 if (isDir)
492 {
493 if (!isAnonymous)
494 {
495 Doxygen::indexList->incContentsDepth();
496 }
497 for (const auto &emd : enumList)
498 {
499 if (!hideUndocMembers || emd->hasDocumentation())
500 {
501 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
502 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
503 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
504 emd->qualifiedName() : emd->name();
505 if (emd->getOuterScope()==def ||
506 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
508 {
509 Doxygen::indexList->addContentsItem(FALSE,
510 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
511 }
512 else // inherited member
513 {
514 Doxygen::indexList->addContentsItem(FALSE,
515 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
516 }
517 }
518 }
519 if (!isAnonymous)
520 {
521 Doxygen::indexList->decContentsDepth();
522 }
523 }
524}

References Definition::anchor, Config_getBool, Definition::definitionType, MemberVector::empty, MemberDef::enumFieldList, FALSE, MemberDef::getGroupDef, MemberDef::getNamespaceDef, Definition::getOuterScope, Definition::getOutputFileBase, Definition::getReference, Doxygen::globalScope, Doxygen::indexList, Definition::isAnonymous, MemberDef::isEnumerate, Definition::name, Definition::qualifiedName, Definition::TypeFile and Definition::TypeModule.

Referenced by addMembersToIndex, writeModuleMembers and writeNamespaceMembers.

writeMenuData()

void writeMenuData ()
static

Definition at line 5702 of file index.cpp.

5702static void writeMenuData()
5703{
5704 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5705 QCString outputDir = Config_getBool(HTML_OUTPUT);
5707 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5708 if (t.is_open())
5709 {
5711 t << "var menudata={";
5712 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5713 if (hasChildren) t << "]";
5714 t << "}\n";
5715 }
5716}

References Config_getBool, LayoutDocManager::instance, JAVASCRIPT_LICENSE_TEXT, Portable::openOutputStream, renderQuickLinksAsJs, LayoutDocManager::rootNavEntry and TRUE.

Referenced by writeIndexHierarchy.

writeModuleIndex()

void writeModuleIndex (OutputList & ol)
static

Definition at line 4493 of file index.cpp.

4494{
4495 if (ModuleManager::instance().numDocumentedModules()==0) return;
4497 // 1.{
4498
4501 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4502 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4503 QCString title = lne ? lne->title() : theTranslator->trModules();
4504 bool addToIndex = lne==nullptr || lne->visible();
4505
4506 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4507 startTitle(ol,QCString());
4508 ol.parseText(title);
4509 endTitle(ol,QCString(),QCString());
4510 ol.startContents();
4511 ol.startTextBlock();
4512 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4513 ol.endTextBlock();
4514
4515 // ---------------
4516 // Normal group index for Latex/RTF
4517 // ---------------
4518 // 2.{
4521 Doxygen::indexList->disable();
4522
4523 writeModuleList(ol,nullptr,FALSE);
4524
4525 Doxygen::indexList->enable();
4527 // 2.}
4528
4529 // ---------------
4530 // interactive group index for HTML
4531 // ---------------
4532 // 2.{
4535
4536 {
4537 if (addToIndex)
4538 {
4539 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4540 Doxygen::indexList->incContentsDepth();
4541 }
4542 FTVHelp ftv(false);
4543 writeModuleList(ol,&ftv,addToIndex);
4544 TextStream t;
4546 ol.writeString(t.str().c_str());
4547 if (addToIndex)
4548 {
4549 Doxygen::indexList->decContentsDepth();
4550 }
4551 }
4553 // 2.}
4554 endFile(ol);
4556 // 1.}
4557}

References Config_getBool, OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endTextBlock, endTitle, FALSE, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, LayoutDocManager::instance, ModuleManager::instance, LayoutNavEntry::intro, Man, Modules, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startTextBlock, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeModuleList and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeModuleLinkForMember()

void writeModuleLinkForMember (OutputList & ol, const MemberDef * md, const QCString & separator, QCString & prevModuleName)
static

Definition at line 2718 of file index.cpp.

2718static void writeModuleLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2719 QCString &prevModuleName)
2720{
2721 const ModuleDef *mod=md->getModuleDef();
2722 if (mod && prevModuleName!=mod->displayName())
2723 {
2724 ol.writeString(separator);
2725 // link to the member declaration in the module page
2726 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2727 mod->displayName());
2728 prevModuleName = mod->displayName();
2729 }
2730}

References Definition::anchor, Definition::displayName, MemberDef::getModuleDef, Definition::getOutputFileBase, Definition::getReference, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeMemberList.

writeModuleList()

void writeModuleList (OutputList & ol, FTVHelp * ftv, bool addToIndex)
static

Definition at line 4469 of file index.cpp.

4469static void writeModuleList(OutputList &ol, FTVHelp *ftv,bool addToIndex)
4470{
4471 if (ftv)
4472 {
4475 }
4477 for (const auto &mod : ModuleManager::instance().modules())
4478 {
4479 if (mod->isPrimaryInterface())
4480 {
4481 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4482 }
4483 }
4484 endIndexHierarchy(ol,0);
4485 if (ftv)
4486 {
4488 }
4489}

References OutputList::disable, endIndexHierarchy, Html, ModuleManager::instance, OutputList::popGeneratorState, OutputList::pushGeneratorState, startIndexHierarchy and writeModuleTreeNode.

Referenced by writeModuleIndex.

writeModuleMemberIndex()

void writeModuleMemberIndex (OutputList & ol)
static

Definition at line 3781 of file index.cpp.

3782{
3783 const auto &index = Index::instance();
3784 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3785 bool addToIndex = lne==nullptr || lne->visible();
3786 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3787 {
3788 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3789 Doxygen::indexList->incContentsDepth();
3790 }
3791 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3798 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3799 {
3800 Doxygen::indexList->decContentsDepth();
3801 }
3802}

References ModuleMemberHighlight::All, ModuleMemberHighlight::Enums, ModuleMemberHighlight::EnumValues, LayoutNavEntry::find, ModuleMemberHighlight::Functions, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutDocManager::rootNavEntry, theTranslator, LayoutNavEntry::title, ModuleMemberHighlight::Typedefs, ModuleMemberHighlight::Variables, LayoutNavEntry::visible and writeModuleMemberIndexFiltered.

Referenced by writeIndexHierarchyEntries.

writeModuleMemberIndexFiltered()

void writeModuleMemberIndexFiltered (OutputList & ol, ModuleMemberHighlight::Enum hl)
static

Definition at line 3653 of file index.cpp.

3655{
3656 const auto &index = Index::instance();
3657 if (index.numDocumentedModuleMembers(hl)==0) return;
3658
3659 bool disableIndex = Config_getBool(DISABLE_INDEX);
3660 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3661 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3662 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3663 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3664
3665 bool multiPageIndex=FALSE;
3666 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3667 {
3668 multiPageIndex=TRUE;
3669 }
3670
3673
3675 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3676 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3677 bool addToIndex = lne==nullptr || lne->visible();
3678
3679 if (addToIndex)
3680 {
3681 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3682 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3683 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3684 }
3685
3686 bool first=TRUE;
3687 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3688 {
3689 QCString fileName = getMmhlInfo(hl)->fname;
3690 if (multiPageIndex)
3691 {
3692 QCString cs(letter);
3693 if (!first)
3694 {
3695 fileName+="_"+letterToLabel(cs);
3696 }
3697 if (addToIndex)
3698 {
3699 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3700 }
3701 }
3702
3703 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3704
3705 auto writeQuickLinks = [&,cap_letter=letter]()
3706 {
3708 if (!dynamicMenus)
3709 {
3711
3712 // index item for all namespace member lists
3715 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3717
3718 // index items per category member lists
3719 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3720 {
3721 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3722 {
3724 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3725 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3727 }
3728 }
3729
3731
3732 if (quickIndex)
3733 {
3734 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3735 getMmhlInfo(hl)->fname,multiPageIndex);
3736 }
3737
3738 ol.writeString("</div><!-- main-nav -->\n");
3739 }
3740 };
3741
3742 ol.startFile(fileName+extension,QCString(),title);
3744 if (!disableIndex && !quickLinksAfterSplitbar)
3745 {
3746 writeQuickLinks();
3747 }
3748 ol.endQuickIndices();
3749 ol.writeSplitBar(fileName,QCString());
3750 if (quickLinksAfterSplitbar)
3751 {
3752 writeQuickLinks();
3753 if (!dynamicMenus)
3754 {
3755 ol.writeString("<div id=\"container\">\n");
3756 ol.writeString("<div id=\"doc-content\">\n");
3757 }
3758 }
3759 ol.writeSearchInfo();
3760
3761 ol.startContents();
3762
3763 ol.startTextBlock();
3764 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3765 ol.endTextBlock();
3766
3767 writeMemberList(ol,quickIndex,
3768 multiPageIndex ? letter : std::string(),
3769 index.isModuleIndexLetterUsed(hl),
3771 endFile(ol);
3772 first=FALSE;
3773 }
3774 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3776}

References ModuleMemberHighlight::All, Config_getBool, OutputList::disableAllBut, endFile, endQuickIndexItem, endQuickIndexList, OutputList::endQuickIndices, OutputList::endTextBlock, FALSE, LayoutNavEntry::find, fixSpaces, MmhlInfo::fname, getMmhlInfo, Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, letterToLabel, MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, ModuleMembers, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, OutputList::startFile, startQuickIndexItem, startQuickIndexList, OutputList::startQuickIndices, OutputList::startTextBlock, theTranslator, LayoutNavEntry::title, ModuleMemberHighlight::Total, TRUE, Definition::TypeModule, LayoutNavEntry::visible, writeMemberList, OutputList::writeQuickLinks, writeQuickMemberIndex, OutputList::writeSearchInfo, OutputList::writeSplitBar and OutputList::writeString.

Referenced by writeModuleMemberIndex.

writeModuleMembers()

void writeModuleMembers (const ModuleDef * mod, bool addToIndex)
static

Definition at line 1787 of file index.cpp.

1787static void writeModuleMembers(const ModuleDef *mod,bool addToIndex)
1788{
1789 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1790 {
1791 if (lde->kind()==LayoutDocEntry::MemberDecl)
1792 {
1793 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1794 if (lmd)
1795 {
1796 MemberList *ml = mod->getMemberList(lmd->type);
1797 if (ml)
1798 {
1799 for (const auto &md : *ml)
1800 {
1801 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1802 if (md->visibleInIndex())
1803 {
1804 writeMemberToIndex(mod,md,addToIndex);
1805 }
1806 }
1807 }
1808 }
1809 }
1810 }
1811}

References ModuleDef::getMemberList, LayoutDocManager::instance, LayoutDocEntryMemberDecl::type and writeMemberToIndex.

Referenced by writeModuleTreeNode.

writeModuleTreeNode()

void writeModuleTreeNode (OutputList & ol, const ModuleDef * mod, FTVHelp * ftv, bool addToIndex)
static

Definition at line 4422 of file index.cpp.

4422static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4423 FTVHelp* ftv, bool addToIndex)
4424{
4425 int visibleMembers = mod->countVisibleMembers();
4426 bool isDir=visibleMembers>0;
4427 if (addToIndex)
4428 {
4429 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4430 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4431 }
4432 if (ftv)
4433 {
4434 ftv->addContentsItem(false,mod->name(),
4436 false,false,mod);
4437 }
4440 ol.parseText(mod->qualifiedName());
4442 if (mod->isReference())
4443 {
4444 ol.startTypewriter();
4445 ol.docify(" [external]");
4446 ol.endTypewriter();
4447 }
4448 if (addToIndex && isDir)
4449 {
4450 Doxygen::indexList->incContentsDepth();
4451 }
4452 if (isDir)
4453 {
4454 //ftv->incContentsDepth();
4455 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4456 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4457 writeModuleMembers(mod,addToIndex);
4458 //ftv->decContentsDepth();
4459 }
4460 if (addToIndex && isDir)
4461 {
4462 Doxygen::indexList->decContentsDepth();
4463 }
4464 ol.endIndexListItem();
4465}

References FTVHelp::addContentsItem, ClassDef::Class, ModuleDef::countVisibleMembers, OutputList::docify, OutputList::endIndexItem, OutputList::endIndexListItem, OutputList::endTypewriter, FALSE, ModuleDef::getClasses, ModuleDef::getConcepts, Definition::getOutputFileBase, Definition::getReference, Doxygen::indexList, Definition::isReference, Definition::name, OutputList::parseText, Definition::qualifiedName, OutputList::startIndexItem, OutputList::startIndexListItem, OutputList::startTypewriter, TRUE, writeClassTree, writeConceptList and writeModuleMembers.

Referenced by writeModuleList.

writeNamespaceIndex()

void writeNamespaceIndex (OutputList & ol)
static

Definition at line 1995 of file index.cpp.

1996{
1997 if (Index::instance().numDocumentedNamespaces()==0) return;
2001 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2002 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2003 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2004 bool addToIndex = lne==nullptr || lne->visible();
2005 startFile(ol,"namespaces",QCString(),title,HighlightedItem::Namespaces);
2006 startTitle(ol,QCString());
2007 ol.parseText(title);
2008 endTitle(ol,QCString(),QCString());
2009 ol.startContents();
2010 ol.startTextBlock();
2011 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2012 ol.endTextBlock();
2013
2014 bool first=TRUE;
2015
2016 // ---------------
2017 // Linear namespace index for Latex/RTF
2018 // ---------------
2021
2022 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2023 {
2024 if (nd->isLinkableInProject())
2025 {
2026 if (first)
2027 {
2028 ol.startIndexList();
2029 first=FALSE;
2030 }
2031 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2032 ol.startIndexKey();
2033 if (nd->getLanguage()==SrcLangExt::VHDL)
2034 {
2035 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2036 }
2037 else
2038 {
2039 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2040 }
2041 ol.endIndexKey();
2042
2043 bool hasBrief = !nd->briefDescription().isEmpty();
2044 ol.startIndexValue(hasBrief);
2045 if (hasBrief)
2046 {
2047 //ol.docify(" (");
2048 ol.generateDoc(
2049 nd->briefFile(),nd->briefLine(),
2050 nd.get(),nullptr,
2051 nd->briefDescription(TRUE),
2052 FALSE, // index words
2053 FALSE, // isExample
2054 QCString(), // example name
2055 TRUE, // single line
2056 TRUE // link from index
2057 );
2058 //ol.docify(")");
2059 }
2060 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2061
2062 }
2063 }
2064 if (!first) ol.endIndexList();
2065
2067
2068 // ---------------
2069 // Hierarchical namespace index for HTML
2070 // ---------------
2073
2074 {
2075 if (addToIndex)
2076 {
2077 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2078 Doxygen::indexList->incContentsDepth();
2079 }
2080 FTVHelp ftv(false);
2082 TextStream t;
2084 ol.writeString(t.str().c_str());
2085 if (addToIndex)
2086 {
2087 Doxygen::indexList->decContentsDepth();
2088 }
2089 }
2090
2092 // ------
2093
2094 endFile(ol);
2096}

References Config_getBool, OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endIndexKey, OutputList::endIndexList, OutputList::endIndexValue, OutputList::endTextBlock, endTitle, FALSE, LayoutNavEntry::find, OutputList::generateDoc, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Man, Doxygen::namespaceLinkedMap, Namespaces, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, qstrlen, QCString::replace, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startIndexKey, OutputList::startIndexList, OutputList::startIndexValue, OutputList::startTextBlock, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, TRUE, LayoutNavEntry::visible, writeNamespaceTree, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeNamespaceLinkForMember()

void writeNamespaceLinkForMember (OutputList & ol, const MemberDef * md, const QCString & separator, QCString & prevNamespaceName)
static

Definition at line 2705 of file index.cpp.

2705static void writeNamespaceLinkForMember(OutputList &ol,const MemberDef *md,const QCString &separator,
2706 QCString &prevNamespaceName)
2707{
2708 const NamespaceDef *nd=md->getNamespaceDef();
2709 if (nd && prevNamespaceName!=nd->displayName())
2710 {
2711 ol.writeString(separator);
2713 nd->displayName());
2714 prevNamespaceName = nd->displayName();
2715 }
2716}

References Definition::anchor, Definition::displayName, MemberDef::getNamespaceDef, Definition::getOutputFileBase, Definition::getReference, OutputList::writeObjectLink and OutputList::writeString.

Referenced by writeMemberList.

writeNamespaceMemberIndex()

void writeNamespaceMemberIndex (OutputList & ol)
static

Definition at line 3601 of file index.cpp.

3602{
3603 const auto &index = Index::instance();
3604 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3605 bool addToIndex = lne==nullptr || lne->visible();
3606 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3607 {
3608 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3609 Doxygen::indexList->incContentsDepth();
3610 }
3611 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3620 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3621 {
3622 Doxygen::indexList->decContentsDepth();
3623 }
3624
3625}

References NamespaceMemberHighlight::All, NamespaceMemberHighlight::Dictionaries, NamespaceMemberHighlight::Enums, NamespaceMemberHighlight::EnumValues, LayoutNavEntry::find, NamespaceMemberHighlight::Functions, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutDocManager::rootNavEntry, NamespaceMemberHighlight::Sequences, theTranslator, LayoutNavEntry::title, NamespaceMemberHighlight::Typedefs, NamespaceMemberHighlight::Variables, LayoutNavEntry::visible and writeNamespaceMemberIndexFiltered.

Referenced by writeIndexHierarchyEntries.

writeNamespaceMemberIndexFiltered()

void writeNamespaceMemberIndexFiltered (OutputList & ol, NamespaceMemberHighlight::Enum hl)
static

Definition at line 3476 of file index.cpp.

3478{
3479 const auto &index = Index::instance();
3480 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3481
3482 bool disableIndex = Config_getBool(DISABLE_INDEX);
3483 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3484 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3485 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3486 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3487
3488 bool multiPageIndex=FALSE;
3489 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3490 {
3491 multiPageIndex=TRUE;
3492 }
3493
3496
3498 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3499 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3500 bool addToIndex = lne==nullptr || lne->visible();
3501
3502 if (addToIndex)
3503 {
3504 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3505 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3506 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3507 }
3508
3509 bool first=TRUE;
3510 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3511 {
3512 QCString fileName = getNmhlInfo(hl)->fname;
3513 if (multiPageIndex)
3514 {
3515 QCString cs(letter);
3516 if (!first)
3517 {
3518 fileName+="_"+letterToLabel(cs);
3519 }
3520 if (addToIndex)
3521 {
3522 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3523 }
3524 }
3525
3526 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3527
3528 auto writeQuickLinks = [&,cap_letter=letter]()
3529 {
3531 if (!dynamicMenus)
3532 {
3534
3535 // index item for all namespace member lists
3538 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3540
3541 // index items per category member lists
3542 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3543 {
3544 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3545 {
3547 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3548 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3550 }
3551 }
3552
3554
3555 if (quickIndex)
3556 {
3557 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3558 getNmhlInfo(hl)->fname,multiPageIndex);
3559 }
3560
3561 ol.writeString("</div><!-- main-nav -->\n");
3562 }
3563 };
3564
3565 ol.startFile(fileName+extension,QCString(),title);
3567 if (!disableIndex && !quickLinksAfterSplitbar)
3568 {
3569 writeQuickLinks();
3570 }
3571 ol.endQuickIndices();
3572 ol.writeSplitBar(fileName,QCString());
3573 if (quickLinksAfterSplitbar)
3574 {
3575 writeQuickLinks();
3576 if (!dynamicMenus)
3577 {
3578 ol.writeString("<div id=\"container\">\n");
3579 ol.writeString("<div id=\"doc-content\">\n");
3580 }
3581 }
3582 ol.writeSearchInfo();
3583
3584 ol.startContents();
3585
3586 ol.startTextBlock();
3587 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3588 ol.endTextBlock();
3589
3590 writeMemberList(ol,quickIndex,
3591 multiPageIndex ? letter : std::string(),
3592 index.isNamespaceIndexLetterUsed(hl),
3594 endFile(ol);
3595 first=FALSE;
3596 }
3597 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3599}

References NamespaceMemberHighlight::All, Config_getBool, OutputList::disableAllBut, endFile, endQuickIndexItem, endQuickIndexList, OutputList::endQuickIndices, OutputList::endTextBlock, FALSE, LayoutNavEntry::find, fixSpaces, NmhlInfo::fname, getNmhlInfo, Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, letterToLabel, MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, NamespaceMembers, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, OutputList::startFile, startQuickIndexItem, startQuickIndexList, OutputList::startQuickIndices, OutputList::startTextBlock, theTranslator, LayoutNavEntry::title, NamespaceMemberHighlight::Total, TRUE, Definition::TypeNamespace, LayoutNavEntry::visible, writeMemberList, OutputList::writeQuickLinks, writeQuickMemberIndex, OutputList::writeSearchInfo, OutputList::writeSplitBar and OutputList::writeString.

Referenced by writeNamespaceMemberIndex.

writeNamespaceMembers()

void writeNamespaceMembers (const NamespaceDef * nd, bool addToIndex)
static

Definition at line 1761 of file index.cpp.

1761static void writeNamespaceMembers(const NamespaceDef *nd,bool addToIndex)
1762{
1763 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1764 {
1765 if (lde->kind()==LayoutDocEntry::MemberDef)
1766 {
1767 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1768 if (lmd)
1769 {
1770 MemberList *ml = nd->getMemberList(lmd->type);
1771 if (ml)
1772 {
1773 for (const auto &md : *ml)
1774 {
1775 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1776 if (md->visibleInIndex())
1777 {
1778 writeMemberToIndex(nd,md,addToIndex);
1779 }
1780 }
1781 }
1782 }
1783 }
1784 }
1785}

References NamespaceDef::getMemberList, LayoutDocManager::instance, LayoutDocEntryMemberDef::type and writeMemberToIndex.

Referenced by writeNamespaceTreeElement.

writeNamespaceTree()

void writeNamespaceTree (const NamespaceLinkedRefMap & nsLinkedMap, FTVHelp * ftv, bool rootOnly, bool addToIndex)
static

Definition at line 1878 of file index.cpp.

1878static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
1879 bool rootOnly,bool addToIndex)
1880{
1881 for (const auto &nd : nsLinkedMap)
1882 {
1883 if (nd->isVisibleInHierarchy())
1884 {
1885 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1886 }
1887 }
1888}

Reference writeNamespaceTreeElement.

Referenced by writeNamespaceIndex and writeNamespaceTreeElement.

writeNamespaceTree()

void writeNamespaceTree (const NamespaceLinkedMap & nsLinkedMap, FTVHelp * ftv, bool rootOnly, bool addToIndex)
static

Definition at line 1890 of file index.cpp.

1890static void writeNamespaceTree(const NamespaceLinkedMap &nsLinkedMap,FTVHelp *ftv,
1891 bool rootOnly,bool addToIndex)
1892{
1893 for (const auto &nd : nsLinkedMap)
1894 {
1895 if (nd->isVisibleInHierarchy())
1896 {
1897 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1898 }
1899 }
1900}

Reference writeNamespaceTreeElement.

writeNamespaceTreeElement()

void writeNamespaceTreeElement (const NamespaceDef * nd, FTVHelp * ftv, bool rootOnly, bool addToIndex)
static

Definition at line 1818 of file index.cpp.

1819 bool rootOnly,bool addToIndex)
1820{
1821 if (!nd->isAnonymous() &&
1822 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1823 {
1824
1825 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1826 bool hasChildren = hasNestedNamespace ||
1829 bool isLinkable = nd->isLinkable();
1830 int visibleMembers = nd->countVisibleMembers();
1831
1832 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1833
1834 QCString ref;
1835 QCString file;
1836 if (isLinkable)
1837 {
1838 ref = nd->getReference();
1839 file = nd->getOutputFileBase();
1840 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1841 {
1842 file=file.replace(0,qstrlen("namespace"),"class");
1843 }
1844 }
1845
1846 bool isDir = hasChildren || visibleMembers>0;
1847 if (isLinkable || isDir)
1848 {
1849 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1850
1851 if (addToIndex)
1852 {
1853 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1854 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1855 }
1856 if (addToIndex && isDir)
1857 {
1858 Doxygen::indexList->incContentsDepth();
1859 }
1860
1861 if (isDir)
1862 {
1863 ftv->incContentsDepth();
1864 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1865 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1866 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1867 writeNamespaceMembers(nd,addToIndex);
1868 ftv->decContentsDepth();
1869 }
1870 if (addToIndex && isDir)
1871 {
1872 Doxygen::indexList->decContentsDepth();
1873 }
1874 }
1875 }
1876}

References FTVHelp::addContentsItem, ClassDef::Class, NamespaceDef::countVisibleMembers, FTVHelp::decContentsDepth, FALSE, NamespaceDef::getClasses, NamespaceDef::getConcepts, Definition::getLanguage, NamespaceDef::getNamespaces, Definition::getOuterScope, Definition::getOutputFileBase, Definition::getReference, Doxygen::globalScope, FTVHelp::incContentsDepth, Doxygen::indexList, Definition::isAnonymous, QCString::isEmpty, Definition::isLinkable, Definition::localName, namespaceHasNestedClass, namespaceHasNestedConcept, namespaceHasNestedNamespace, Definition::partOfGroups, qstrlen, QCString::replace, writeClassTree, writeConceptList, writeNamespaceMembers and writeNamespaceTree.

Referenced by writeNamespaceTree and writeNamespaceTree.

writePageIndex()

void writePageIndex (OutputList & ol)
static

Definition at line 3961 of file index.cpp.

3962{
3963 if (Index::instance().numIndexedPages()==0) return;
3966 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3967 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3968 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3969 startTitle(ol,QCString());
3970 ol.parseText(title);
3971 endTitle(ol,QCString(),QCString());
3972 ol.startContents();
3973 ol.startTextBlock();
3974 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3975 ol.endTextBlock();
3976
3977 {
3978 FTVHelp ftv(false);
3979 for (const auto &pd : *Doxygen::pageLinkedMap)
3980 {
3981 if ((pd->getOuterScope()==nullptr ||
3982 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3983 pd->visibleInIndex()
3984 )
3985 {
3986 writePages(pd.get(),&ftv);
3987 }
3988 }
3989 TextStream t;
3991 ol.writeString(t.str().c_str());
3992 }
3993
3994// ol.popGeneratorState();
3995 // ------
3996
3997 endFile(ol);
3999}

References OutputList::disableAllBut, endFile, OutputList::endTextBlock, endTitle, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Doxygen::pageLinkedMap, Pages, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startTextBlock, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, Definition::TypePage, writePages and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writePages()

void writePages (PageDef * pd, FTVHelp * ftv)
static

Definition at line 3900 of file index.cpp.

3900static void writePages(PageDef *pd,FTVHelp *ftv)
3901{
3902 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3903 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3904 bool addToIndex = lne==nullptr || lne->visible();
3905 if (!addToIndex) return;
3906
3907 bool hasSubPages = pd->hasSubPages();
3908 bool hasSections = pd->hasSections();
3909
3910 if (pd->visibleInIndex())
3911 {
3912 QCString pageTitle, pageTitleAsHtml;
3913
3914 if (pd->title().isEmpty())
3915 pageTitle=pd->name();
3916 else
3917 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3918 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3919
3920 if (ftv)
3921 {
3922 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3923 ftv->addContentsItem(
3924 hasSubPages,pageTitle,
3926 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3927 }
3928 if (addToIndex && pd!=Doxygen::mainPage.get())
3929 {
3930 Doxygen::indexList->addContentsItem(
3931 hasSubPages || hasSections,pageTitle,
3933 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3934 }
3935 }
3936 if (hasSubPages && ftv) ftv->incContentsDepth();
3937 bool doIndent = (hasSections || hasSubPages) &&
3938 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3939 if (doIndent)
3940 {
3941 Doxygen::indexList->incContentsDepth();
3942 }
3943 if (hasSections)
3944 {
3945 pd->addSectionsToIndex();
3946 }
3947 for (const auto &subPage : pd->getSubPages())
3948 {
3949 writePages(subPage,ftv);
3950 }
3951 if (hasSubPages && ftv) ftv->decContentsDepth();
3952 if (doIndent)
3953 {
3954 Doxygen::indexList->decContentsDepth();
3955 }
3956 //printf("end writePages()=%s\n",qPrint(pd->title()));
3957}

References FTVHelp::addContentsItem, PageDef::addSectionsToIndex, FTVHelp::decContentsDepth, LayoutNavEntry::find, Definition::getDefFileName, Definition::getDefLine, Definition::getOutputFileBase, Definition::getReference, PageDef::getSubPages, Definition::hasSections, PageDef::hasSubPages, FTVHelp::incContentsDepth, Doxygen::indexList, LayoutDocManager::instance, QCString::isEmpty, Doxygen::mainPage, mainPageHasOwnTitle, Definition::name, parseCommentAsHtml, parseCommentAsText, LayoutDocManager::rootNavEntry, PageDef::title, TRUE, LayoutNavEntry::visible, PageDef::visibleInIndex and writePages.

Referenced by writeGroupTreeNode, writeIndex, writePageIndex and writePages.

writeQuickMemberIndex()

void writeQuickMemberIndex (OutputList & ol, const Index::MemberIndexMap & map, const std::string & page, QCString fullName, bool multiPage)
static

Definition at line 3046 of file index.cpp.

3047 const Index::MemberIndexMap &map,const std::string &page,
3048 QCString fullName,bool multiPage)
3049{
3050 bool first=TRUE;
3052 for (const auto &[letter,list] : map)
3053 {
3054 QCString ci(letter);
3055 QCString is = letterToLabel(ci);
3056 QCString anchor;
3058 if (!multiPage)
3059 anchor="#index_";
3060 else if (first)
3061 anchor=fullName+extension+"#index_";
3062 else
3063 anchor=fullName+"_"+is+extension+"#index_";
3064 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3065 ol.writeString(ci);
3067 first=FALSE;
3068 }
3070}

References convertToId, endQuickIndexItem, endQuickIndexList, FALSE, Doxygen::htmlFileExtension, letterToLabel, startQuickIndexItem, startQuickIndexList, TRUE and OutputList::writeString.

Referenced by writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered and writeNamespaceMemberIndexFiltered.

writeSingleFileIndex()

void writeSingleFileIndex (OutputList & ol, const FileDef * fd)
static

Definition at line 1463 of file index.cpp.

1463static void writeSingleFileIndex(OutputList &ol,const FileDef *fd)
1464{
1465 //printf("Found filedef %s\n",qPrint(fd->name()));
1466 bool doc = fd->isLinkableInProject();
1467 bool src = fd->generateSourceFile();
1468 bool nameOk = !fd->isDocumentationFile();
1469 if (nameOk && (doc || src) && !fd->isReference())
1470 {
1471 QCString path;
1472 if (Config_getBool(FULL_PATH_NAMES))
1473 {
1474 path=stripFromPath(fd->getPath());
1475 }
1476 QCString fullName=fd->name();
1477 if (!path.isEmpty())
1478 {
1479 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1480 fullName.prepend(path);
1481 }
1482
1483 ol.startIndexKey();
1484 ol.docify(path);
1485 if (doc)
1486 {
1488 //if (addToIndex)
1489 //{
1490 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1491 //}
1492 }
1493 else if (src)
1494 {
1496 }
1497 if (doc && src)
1498 {
1501 ol.docify(" ");
1503 ol.docify("[");
1504 ol.parseText(theTranslator->trCode());
1505 ol.docify("]");
1506 ol.endTextLink();
1508 }
1509 ol.endIndexKey();
1510 bool hasBrief = !fd->briefDescription().isEmpty();
1511 ol.startIndexValue(hasBrief);
1512 if (hasBrief)
1513 {
1514 //ol.docify(" (");
1515 ol.generateDoc(
1516 fd->briefFile(),fd->briefLine(),
1517 fd,nullptr,
1519 FALSE, // index words
1520 FALSE, // isExample
1521 QCString(), // example name
1522 TRUE, // single line
1523 TRUE // link from index
1524 );
1525 //ol.docify(")");
1526 }
1527 if (doc)
1528 {
1529 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1530 }
1531 else // src
1532 {
1533 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1534 }
1535 //ol.popGeneratorState();
1536 // --------------------------------------------------------
1537 }
1538}

References QCString::at, Definition::briefDescription, Definition::briefFile, Definition::briefLine, Config_getBool, OutputList::disableAllBut, OutputList::docify, OutputList::endIndexKey, OutputList::endIndexValue, OutputList::endTextLink, FALSE, OutputList::generateDoc, FileDef::generateSourceFile, Definition::getOutputFileBase, FileDef::getPath, Definition::getSourceFileBase, Html, FileDef::includeName, FileDef::isDocumentationFile, QCString::isEmpty, Definition::isLinkableInProject, Definition::isReference, QCString::length, Definition::name, OutputList::parseText, OutputList::popGeneratorState, QCString::prepend, OutputList::pushGeneratorState, OutputList::startIndexKey, OutputList::startIndexValue, OutputList::startTextLink, stripFromPath, theTranslator, TRUE and OutputList::writeObjectLink.

Referenced by writeFileIndex.

writeTopicIndex()

void writeTopicIndex (OutputList & ol)
static

Definition at line 4353 of file index.cpp.

4354{
4355 if (Index::instance().numDocumentedGroups()==0) return;
4357 // 1.{
4360 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4361 QCString title = lne ? lne->title() : theTranslator->trTopics();
4362 bool addToIndex = lne==nullptr || lne->visible();
4363
4364 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4365 startTitle(ol,QCString());
4366 ol.parseText(title);
4367 endTitle(ol,QCString(),QCString());
4368 ol.startContents();
4369 ol.startTextBlock();
4370 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4371 ol.endTextBlock();
4372
4373 // ---------------
4374 // Normal group index for Latex/RTF
4375 // ---------------
4376 // 2.{
4379 Doxygen::indexList->disable();
4380
4381 writeGroupHierarchy(ol,nullptr,FALSE);
4382
4383 Doxygen::indexList->enable();
4385 // 2.}
4386
4387 // ---------------
4388 // interactive group index for HTML
4389 // ---------------
4390 // 2.{
4393
4394 {
4395 if (addToIndex)
4396 {
4397 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4398 Doxygen::indexList->incContentsDepth();
4399 }
4400 FTVHelp ftv(false);
4401 writeGroupHierarchy(ol,&ftv,addToIndex);
4402 TextStream t;
4405 ol.writeString(t.str().c_str());
4406 if (addToIndex)
4407 {
4408 Doxygen::indexList->decContentsDepth();
4409 }
4410 }
4412 // 2.}
4413
4414 endFile(ol);
4416 // 1.}
4417}

References OutputList::disable, OutputList::disableAllBut, Docbook, endFile, OutputList::endTextBlock, endTitle, FALSE, LayoutNavEntry::find, FTVHelp::generateTreeViewInline, Html, Doxygen::indexList, Index::instance, LayoutDocManager::instance, LayoutNavEntry::intro, Man, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, LayoutDocManager::rootNavEntry, OutputList::startContents, startFile, OutputList::startTextBlock, startTitle, TextStream::str, theTranslator, LayoutNavEntry::title, Topics, TRUE, LayoutNavEntry::visible, writeGroupHierarchy and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

writeUserGroupStubPage()

void writeUserGroupStubPage (OutputList & ol, LayoutNavEntry * lne)
static

Definition at line 4772 of file index.cpp.

4773{
4774 if (lne->baseFile().startsWith("usergroup"))
4775 {
4779 startTitle(ol,QCString());
4780 ol.parseText(lne->title());
4781 endTitle(ol,QCString(),QCString());
4782 ol.startContents();
4783 int count=0;
4784 for (const auto &entry: lne->children())
4785 {
4786 if (entry->visible()) count++;
4787 }
4788 if (count>0)
4789 {
4790 ol.writeString("<ul>\n");
4791 for (const auto &entry: lne->children())
4792 {
4793 if (entry->visible())
4794 {
4795 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4796 fixSpaces(entry->title())+"</span></a></li>\n");
4797 }
4798 }
4799 ol.writeString("</ul>\n");
4800 }
4801 endFile(ol);
4803 }
4804}

References LayoutNavEntry::baseFile, LayoutNavEntry::children, OutputList::disableAllBut, endFile, endTitle, fixSpaces, Html, OutputList::parseText, OutputList::popGeneratorState, OutputList::pushGeneratorState, OutputList::startContents, startFile, QCString::startsWith, startTitle, LayoutNavEntry::title, UserGroup and OutputList::writeString.

Referenced by writeIndexHierarchyEntries.

Variables

indexWritten

std::vector<bool> indexWritten
static

Definition at line 5197 of file index.cpp.

5197static std::vector<bool> indexWritten;

Referenced by writeIndexHierarchyEntries.

maxItemsBeforeQuickIndex

Macro Definitions

MAX_ITEMS_BEFORE_MULTIPAGE_INDEX

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200

Definition at line 55 of file index.cpp.

55#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX 200

Referenced by renderMemberIndicesAsJs, writeClassMemberIndexFiltered, writeFileMemberIndexFiltered, writeModuleMemberIndexFiltered and writeNamespaceMemberIndexFiltered.

MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 56 of file index.cpp.

56#define MAX_ITEMS_BEFORE_QUICK_INDEX 30

Generated via doxygen2docusaurus by Doxygen 1.14.0.