Doxygen
Loading...
Searching...
No Matches
index.cpp File Reference

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

#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"
Include dependency graph for index.cpp:

Go to the source code of this file.

Classes

struct  Index::Private
struct  AnnotatedIndexContext
struct  CmhlInfo
 Helper class representing a class member in the navigation menu. More...
struct  FmhlInfo
 Helper class representing a file member in the navigation menu. More...
struct  NmhlInfo
 Helper class representing a namespace member in the navigation menu. More...
struct  MmhlInfo
 Helper class representing a module member in the navigation menu. More...

Macros

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200
#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Typedefs

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

Functions

static int countClassHierarchy (ClassDef::CompoundType ct)
static void countFiles (int &htmlFiles, int &files)
static int countGroups ()
static int countDirs ()
static int countNamespaces ()
static int countConcepts ()
static int countAnnotatedClasses (int *cp, ClassDef::CompoundType ct)
static void countRelatedPages (int &docPages, int &indexPages)
static void MemberIndexMap_add (Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
static void startIndexHierarchy (OutputList &ol, int level)
static void endIndexHierarchy (OutputList &ol, int level)
static void startQuickIndexList (OutputList &ol, bool letterTabs=FALSE)
static void endQuickIndexList (OutputList &ol)
static void startQuickIndexItem (OutputList &ol, const QCString &l, bool hl, bool, bool &first)
static void endQuickIndexItem (OutputList &ol)
void startTitle (OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
void endTitle (OutputList &ol, const QCString &fileName, const QCString &name)
void startFile (OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
void endFile (OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
void endFileWithNavPath (OutputList &ol, const DefinitionMutable *d, bool showPageNavigation)
static void writeMemberToIndex (const Definition *def, const MemberDef *md, bool addToIndex)
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)
static void writeClassTreeToOutput (OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
static bool dirHasVisibleChildren (const DirDef *dd)
static void writeDirTreeNode (OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
static void writeDirHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeClassTreeForList (OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
static void writeClassHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
static int countClassesInTreeList (const ClassLinkedMap &cl, ClassDef::CompoundType ct)
static void writeHierarchicalIndex (OutputList &ol)
static void writeGraphicalClassHierarchy (OutputList &ol)
static void writeHierarchicalInterfaceIndex (OutputList &ol)
static void writeGraphicalInterfaceHierarchy (OutputList &ol)
static void writeHierarchicalExceptionIndex (OutputList &ol)
static void writeGraphicalExceptionHierarchy (OutputList &ol)
static void writeSingleFileIndex (OutputList &ol, const FileDef *fd)
static void writeDirIndex (OutputList &ol)
static void writeFileIndex (OutputList &ol)
template<typename Ptr>
const ClassDefget_pointer (const Ptr &p)
template<>
const ClassDefget_pointer (const ClassLinkedMap::Ptr &p)
template<>
const ClassDefget_pointer (const ClassLinkedRefMap::Ptr &p)
template<class ListType>
static void writeClassTree (const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
static void writeNamespaceMembers (const NamespaceDef *nd, bool addToIndex)
static void writeModuleMembers (const ModuleDef *mod, bool addToIndex)
static void writeConceptList (const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
static void writeNamespaceTree (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeNamespaceTreeElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeNamespaceTree (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeClassTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeClassTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeClassTreeInsideNamespace (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeNamespaceIndex (OutputList &ol)
static void writeAnnotatedClassList (OutputList &ol, ClassDef::CompoundType ct)
bool isId1 (int c)
static QCString letterToLabel (const QCString &startLetter)
static void writeAlphabeticalClassList (OutputList &ol, ClassDef::CompoundType ct, int)
static void writeAlphabeticalIndex (OutputList &ol)
static void writeAlphabeticalInterfaceIndex (OutputList &ol)
static void writeAlphabeticalStructIndex (OutputList &ol)
static void writeAlphabeticalExceptionIndex (OutputList &ol)
static void writeAnnotatedIndexGeneric (OutputList &ol, const AnnotatedIndexContext ctx)
static void writeAnnotatedIndex (OutputList &ol)
static void writeAnnotatedInterfaceIndex (OutputList &ol)
static void writeAnnotatedStructIndex (OutputList &ol)
static void writeAnnotatedExceptionIndex (OutputList &ol)
static void writeClassLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
static void writeFileLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
static void writeNamespaceLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
static void writeModuleLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
static void writeMemberList (OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
static void writeQuickMemberIndex (OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
static const CmhlInfogetCmhlInfo (size_t hl)
static void writeClassMemberIndexFiltered (OutputList &ol, ClassMemberHighlight::Enum hl)
static void writeClassMemberIndex (OutputList &ol)
static const FmhlInfogetFmhlInfo (size_t hl)
static void writeFileMemberIndexFiltered (OutputList &ol, FileMemberHighlight::Enum hl)
static void writeFileMemberIndex (OutputList &ol)
static const NmhlInfogetNmhlInfo (size_t hl)
static void writeNamespaceMemberIndexFiltered (OutputList &ol, NamespaceMemberHighlight::Enum hl)
static void writeNamespaceMemberIndex (OutputList &ol)
static const MmhlInfogetMmhlInfo (size_t hl)
static void writeModuleMemberIndexFiltered (OutputList &ol, ModuleMemberHighlight::Enum hl)
static void writeModuleMemberIndex (OutputList &ol)
static void writeExampleIndex (OutputList &ol)
static bool mainPageHasOwnTitle ()
static void writePages (PageDef *pd, FTVHelp *ftv)
static void writePageIndex (OutputList &ol)
void writeGraphInfo (OutputList &ol)
static void writeGroupTreeNode (OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
static void writeGroupHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeTopicIndex (OutputList &ol)
static void writeModuleTreeNode (OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
static void writeModuleList (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeModuleIndex (OutputList &ol)
static void writeConceptTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptRootList (FTVHelp *ftv, bool addToIndex)
static void writeConceptIndex (OutputList &ol)
static void writeUserGroupStubPage (OutputList &ol, LayoutNavEntry *lne)
static void writeIndex (OutputList &ol)
static void writeIndexHierarchyEntries (OutputList &ol, const LayoutNavEntryList &entries)
static bool quickLinkVisible (LayoutNavEntry::Kind kind)
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 *(*getInfo)(size_t hl), std::size_t total)
static bool renderQuickLinksAsJs (std::ostream &t, LayoutNavEntry *root, bool first)
static void writeMenuData ()
void writeIndexHierarchy (OutputList &ol)

Variables

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX
static std::vector< bool > indexWritten

Detailed Description

This file contains functions for the various index pages.

Definition in file index.cpp.

Macro Definition Documentation

◆ MAX_ITEMS_BEFORE_MULTIPAGE_INDEX

◆ MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 56 of file index.cpp.

Typedef Documentation

◆ UsedIndexLetters

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

Definition at line 2274 of file index.cpp.

Function Documentation

◆ 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 527 of file index.cpp.

532{
533 int numClasses=0;
534 for (const auto &cd : def->getClasses())
535 {
536 if (cd->isLinkable()) numClasses++;
537 }
538 int numConcepts=0;
539 if (concepts)
540 {
541 for (const auto &cd : *concepts)
542 {
543 if (cd->isLinkable()) numConcepts++;
544 }
545 }
546 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
547 Doxygen::indexList->addContentsItem(hasMembers,name,
548 def->getReference(),def->getOutputFileBase(),anchor,
549 hasMembers && !preventSeparateIndex,
550 addToIndex,
551 def);
552 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
553 if (hasMembers || numClasses>0 || numConcepts>0)
554 {
555 Doxygen::indexList->incContentsDepth();
556 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
557 {
558 auto kind = lde->kind();
559 if (kind==LayoutDocEntry::MemberDef)
560 {
561 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
562 if (lmd)
563 {
564 MemberList *ml = def->getMemberList(lmd->type);
565 if (ml)
566 {
567 for (const auto &md : *ml)
568 {
569 if (md->visibleInIndex())
570 {
571 writeMemberToIndex(def,md,addToIndex);
572 }
573 }
574 }
575 }
576 }
577 else if (kind==LayoutDocEntry::NamespaceClasses ||
578 kind==LayoutDocEntry::FileClasses ||
579 kind==LayoutDocEntry::ClassNestedClasses ||
580 kind==LayoutDocEntry::ModuleClasses
581 )
582 {
583 for (const auto &cd : def->getClasses())
584 {
585 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
586 {
587 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
588 bool isNestedClass = def->definitionType()==Definition::TypeClass;
589 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
590 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
591 preventSeparateIndex || cd->isEmbeddedInOuterScope());
592 }
593 }
594 }
595 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
596 {
597 for (const auto &cd : *concepts)
598 {
599 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
600 {
601 Doxygen::indexList->addContentsItem(false,cd->displayName(),
602 cd->getReference(),cd->getOutputFileBase(),QCString(),
603 addToIndex,
604 false,
605 cd);
606 }
607 }
608 }
609 }
610
611 Doxygen::indexList->decContentsDepth();
612 }
613}
static IndexList * indexList
Definition doxygen.h:134
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
This is an alternative implementation of QCString.
Definition qcstring.h:101
#define Config_getBool(name)
Definition config.h:33
static void addMembersToIndex()
Definition doxygen.cpp:8096
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition index.cpp:468
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137

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 2147 of file index.cpp.

2148{
2149 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2150 int count=0;
2151 int countPrinted=0;
2152 for (const auto &cd : *Doxygen::classLinkedMap)
2153 {
2154 if (sliceOpt && cd->compoundType() != ct)
2155 {
2156 continue;
2157 }
2158 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2159 {
2160 if (!cd->isEmbeddedInOuterScope())
2161 {
2162 countPrinted++;
2163 }
2164 count++;
2165 }
2166 }
2167 *cp = countPrinted;
2168 return count;
2169}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1117 of file index.cpp.

1118{
1119 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1120 int count=0;
1121 for (const auto &cd : cl)
1122 {
1123 if (sliceOpt && cd->compoundType() != ct)
1124 {
1125 continue;
1126 }
1127 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1128 {
1129 if (cd->isVisibleInHierarchy()) // should it be visible
1130 {
1131 if (!cd->subClasses().empty()) // should have sub classes
1132 {
1133 count++;
1134 }
1135 }
1136 }
1137 }
1138 return count;
1139}
bool classHasVisibleRoot(const BaseClassList &bcl)

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1141 of file index.cpp.

1142{
1143 int count=0;
1146 return count;
1147}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:97
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1117

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1732 of file index.cpp.

1733{
1734 int count=0;
1735 for (const auto &cd : *Doxygen::conceptLinkedMap)
1736 {
1737 if (cd->isLinkableInProject()) count++;
1738 }
1739 return count;
1740}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4044 of file index.cpp.

4045{
4046 int count=0;
4047 for (const auto &dd : *Doxygen::dirLinkedMap)
4048 {
4049 if (dd->isLinkableInProject())
4050 {
4051 count++;
4052 }
4053 }
4054 return count;
4055}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129

References Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1468 of file index.cpp.

1469{
1470 allFiles=0;
1471 docFiles=0;
1472 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1473 {
1474 for (const auto &fd: *fn)
1475 {
1476 bool src = false;
1477 bool doc = fileVisibleInIndex(fd.get(),src);
1478 if (doc || src)
1479 {
1480 allFiles++;
1481 }
1482 if (doc)
1483 {
1484 docFiles++;
1485 }
1486 }
1487 }
1488}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6019

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4028 of file index.cpp.

4029{
4030 int count=0;
4031 for (const auto &gd : *Doxygen::groupLinkedMap)
4032 {
4033 if (!gd->isReference())
4034 {
4035 //gd->visited=FALSE;
4036 count++;
4037 }
4038 }
4039 return count;
4040}
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1721 of file index.cpp.

1722{
1723 int count=0;
1724 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1725 {
1726 if (nd->isLinkableInProject()) count++;
1727 }
1728 return count;
1729}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115

References Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3896 of file index.cpp.

3897{
3898 docPages=indexPages=0;
3899 for (const auto &pd : *Doxygen::pageLinkedMap)
3900 {
3901 if (pd->visibleInIndex() && !pd->hasParentPage())
3902 {
3903 indexPages++;
3904 }
3905 if (pd->documentedPage())
3906 {
3907 docPages++;
3908 }
3909 }
3910}
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 734 of file index.cpp.

735{
736 if (dd->hasDocumentation()) return TRUE;
737
738 for (const auto &fd : dd->getFiles())
739 {
740 bool genSourceFile = false;
741 if (fileVisibleInIndex(fd,genSourceFile))
742 {
743 return TRUE;
744 }
745 if (genSourceFile)
746 {
747 return TRUE;
748 }
749 }
750
751 for(const auto &subdd : dd->subDirs())
752 {
753 if (dirHasVisibleChildren(subdd))
754 {
755 return TRUE;
756 }
757 }
758 return FALSE;
759}
virtual bool hasDocumentation() const =0
virtual const DirList & subDirs() const =0
virtual const FileList & getFiles() const =0
static bool dirHasVisibleChildren(const DirDef *dd)
Definition index.cpp:734
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

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.

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}
void writeString(const QCString &text)
Definition outputlist.h:411
void endContents()
Definition outputlist.h:620
void endFile()
Definition outputlist.h:401
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void writeFooter(const QCString &navPath)
Definition outputlist.h:399

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(), writeDirIndex(), 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.

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}
virtual QCString navigationPathAsString() const =0
virtual void writePageNavigation(OutputList &) const =0
Definition * toDefinition(DefinitionMutable *dm)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:427

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

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1745 of file index.cpp.

1745{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1746 of file index.cpp.

1746{ return p; }

◆ get_pointer() [3/3]

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

Referenced by writeClassTree().

◆ getCmhlInfo()

const CmhlInfo * getCmhlInfo ( size_t hl)
static

Definition at line 3107 of file index.cpp.

3108{
3109 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3110 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3111 static CmhlInfo cmhlInfo[] =
3112 {
3113 CmhlInfo("functions", theTranslator->trAll()),
3114 CmhlInfo("functions_func",
3115 fortranOpt ? theTranslator->trSubprograms() :
3116 vhdlOpt ? theTranslator->trFunctionAndProc() :
3117 theTranslator->trFunctions()),
3118 CmhlInfo("functions_vars",theTranslator->trVariables()),
3119 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3120 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3121 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3122 CmhlInfo("functions_prop",theTranslator->trProperties()),
3123 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3124 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3125 };
3126 return &cmhlInfo[hl];
3127}
Translator * theTranslator
Definition language.cpp:71
Helper class representing a class member in the navigation menu.
Definition index.cpp:3101

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeClassMemberIndexFiltered().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3295 of file index.cpp.

3296{
3297 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3298 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3299 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3300 static FmhlInfo fmhlInfo[] =
3301 {
3302 FmhlInfo("globals", theTranslator->trAll()),
3303 FmhlInfo("globals_func",
3304 fortranOpt ? theTranslator->trSubprograms() :
3305 vhdlOpt ? theTranslator->trFunctionAndProc() :
3306 theTranslator->trFunctions()),
3307 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3308 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3309 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3310 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3311 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3312 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3313 FmhlInfo("globals_defs",theTranslator->trDefines())
3314 };
3315 return &fmhlInfo[hl];
3316}
Helper class representing a file member in the navigation menu.
Definition index.cpp:3289

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3662 of file index.cpp.

3663{
3664 static MmhlInfo nmhlInfo[] =
3665 {
3666 MmhlInfo("modulemembers", theTranslator->trAll()),
3667 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3668 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3669 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3670 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3671 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3672 };
3673 return &nmhlInfo[hl];
3674}
Helper class representing a module member in the navigation menu.
Definition index.cpp:3656

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3477 of file index.cpp.

3478{
3479 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3480 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3481 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3482 static NmhlInfo nmhlInfo[] =
3483 {
3484 NmhlInfo("namespacemembers", theTranslator->trAll()),
3485 NmhlInfo("namespacemembers_func",
3486 fortranOpt ? theTranslator->trSubprograms() :
3487 vhdlOpt ? theTranslator->trFunctionAndProc() :
3488 theTranslator->trFunctions()),
3489 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3490 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3491 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3492 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3493 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3494 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3495 };
3496 return &nmhlInfo[hl];
3497}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3471

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2243 of file index.cpp.

2244{
2245 return (c<127 && c>31); // printable ASCII character
2246}

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2248 of file index.cpp.

2249{
2250 if (startLetter.isEmpty()) return startLetter;
2251 const char *p = startLetter.data();
2252 char c = *p;
2253 QCString result;
2254 if (isId1(c))
2255 {
2256 result+=c;
2257 }
2258 else
2259 {
2260 result="0x";
2261 const char hex[]="0123456789abcdef";
2262 while ((c=*p++))
2263 {
2264 result+=hex[static_cast<unsigned char>(c)>>4];
2265 result+=hex[static_cast<unsigned char>(c)&0xf];
2266 }
2267 }
2268 return result;
2269}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
static constexpr auto hex
bool isId1(int c)
Definition index.cpp:2243

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 3914 of file index.cpp.

3915{
3916 QCString projectName = Config_getString(PROJECT_NAME);
3917 QCString title;
3919 {
3920 title = filterTitle(Doxygen::mainPage->title());
3921 }
3922 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3923}
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
#define Config_getString(name)
Definition config.h:32
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:447
bool mainPageHasTitle()
Definition util.cpp:6214
QCString filterTitle(const QCString &title)
Definition util.cpp:5546

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.

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 5575 of file index.cpp.

5576{
5577 const auto &index = Index::instance();
5578 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5579 bool showFiles = Config_getBool(SHOW_FILES);
5580 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5581 switch (kind)
5582 {
5583 case LayoutNavEntry::MainPage: return TRUE;
5584 case LayoutNavEntry::User: return TRUE;
5585 case LayoutNavEntry::UserGroup: return TRUE;
5586 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5587 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5588 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5589 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5590 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5591 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5592 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5593 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5594 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5595 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5596 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5597 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5598 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5599 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5600 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5601 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5602 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5603 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5604 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5605 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5606 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5607 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5608 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5609 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5610 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5611 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5612 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5613 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5614 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5615 case LayoutNavEntry::None: // should never happen, means not properly initialized
5616 assert(kind != LayoutNavEntry::None);
5617 return FALSE;
5618 }
5619 return FALSE;
5620}
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:99
static Index & instance()
Definition index.cpp:106

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 *(* getInfo )(size_t hl),
std::size_t total )

Definition at line 5623 of file index.cpp.

5628{
5629 // index items per category member lists
5630 bool firstMember=TRUE;
5631 for (std::size_t i=0;i<total;i++)
5632 {
5633 if (numDocumented(i)>0)
5634 {
5635 t << ",";
5636 if (firstMember)
5637 {
5638 t << "children:[";
5639 firstMember=FALSE;
5640 }
5641 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5642 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5643
5644 // Check if we have many members, then add sub entries per letter...
5645 // quick alphabetical index
5646 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5647 if (quickIndex)
5648 {
5649 bool multiPageIndex=FALSE;
5650 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5651 {
5652 multiPageIndex=TRUE;
5653 }
5654 t << ",children:[\n";
5655 bool firstLetter=TRUE;
5656 for (const auto &[letter,list] : getMemberList(i))
5657 {
5658 if (!firstLetter) t << ",\n";
5659 QCString ci(letter);
5660 QCString is(letterToLabel(ci));
5661 QCString anchor;
5663 QCString fullName = getInfo(i)->fname;
5664 if (!multiPageIndex || firstLetter)
5665 anchor=fullName+extension+"#index_";
5666 else // other pages of multi page index
5667 anchor=fullName+"_"+is+extension+"#index_";
5668 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5669 << convertToJSString(anchor+convertToId(is)) << "\"}";
5670 firstLetter=FALSE;
5671 }
5672 t << "]";
5673 }
5674 t << "}";
5675 }
5676 }
5677 if (!firstMember)
5678 {
5679 t << "]";
5680 }
5681}
static QCString htmlFileExtension
Definition doxygen.h:122
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
Definition index.cpp:55
const int maxItemsBeforeQuickIndex
Definition index.cpp:341
static QCString letterToLabel(const QCString &startLetter)
Definition index.cpp:2248
QCString convertToJSString(const QCString &s, bool keepEntities, bool singleQuotes)
Definition util.cpp:3953
QCString convertToId(const QCString &s)
Definition util.cpp:3802

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 5683 of file index.cpp.

5684{
5685 int count=0;
5686 for (const auto &entry : root->children())
5687 {
5688 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5689 }
5690 if (count>0) // at least one item is visible
5691 {
5692 bool firstChild = TRUE;
5693 if (!first) t << ",";
5694 t << "children:[\n";
5695 for (const auto &entry : root->children())
5696 {
5697 if (entry->visible() && quickLinkVisible(entry->kind()))
5698 {
5699 if (!firstChild) t << ",\n";
5700 firstChild=FALSE;
5701 QCString url = entry->url();
5702 if (isURL(url)) url = "^" + url;
5703 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5704 << convertToJSString(url) << "\"";
5705 bool hasChildren=FALSE;
5706 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5707 {
5708 auto numDoc = [](std::size_t i) {
5710 };
5711 auto memList = [](std::size_t i) {
5713 };
5714 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5715 }
5716 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5717 {
5718 auto numDoc = [](std::size_t i) {
5720 };
5721 auto memList = [](std::size_t i) {
5723 };
5724 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5725 }
5726 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5727 {
5728 auto numDoc = [](std::size_t i) {
5730 };
5731 auto memList = [](std::size_t i) {
5733 };
5734 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5735 }
5736 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5737 {
5738 auto numDoc = [](std::size_t i) {
5740 };
5741 auto memList = [](std::size_t i) {
5743 };
5744 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5745 }
5746 else // recursive into child list
5747 {
5748 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5749 }
5750 if (hasChildren) t << "]";
5751 t << "}";
5752 }
5753 }
5754 }
5755 return count>0;
5756}
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
Definition index.cpp:136
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:131
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:134
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:132
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:141
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:151
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:146
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2790
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5683
void renderMemberIndicesAsJs(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)
Definition index.cpp:5623
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3295
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3662
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3477
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3107
const LayoutNavEntryList & children() const
Definition layout.h:219
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:5845

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,
bool isSource,
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.

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,isSource,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}
void writeSearchInfo()
Definition outputlist.h:397
void startQuickIndices()
Definition outputlist.h:602
void startFile(const QCString &name, bool isSource, const QCString &manName, const QCString &title, int hierarchyLevel=0)
void endQuickIndices()
Definition outputlist.h:604
void writeSplitBar(const QCString &name, const QCString &allMembersFile)
Definition outputlist.h:606
void writeQuickLinks(HighlightedItem hli, const QCString &file, bool extraTabs=false)
Definition outputlist.h:612

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(), writeDirIndex(), 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.

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.

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()

void startTitle ( OutputList & ol,
const QCString & fileName,
const DefinitionMutable * def )

Definition at line 384 of file index.cpp.

385{
386 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
388 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
389 ol.startTitleHead(fileName);
392}
virtual void writeSummaryLinks(OutputList &) const =0
void startTitleHead(const QCString &fileName)
Definition outputlist.h:403
void startHeaderSection()
Definition outputlist.h:465

References Config_getBool, OutputList::disable(), Man, OutputList::pushGeneratorState(), OutputList::startHeaderSection(), OutputList::startTitleHead(), and DefinitionMutable::writeSummaryLinks().

Referenced by generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), writeConceptIndex(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), FileDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), writeExampleIndex(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeGraphInfo(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeModuleIndex(), writeNamespaceIndex(), writePageIndex(), FileDefImpl::writeSourceHeader(), writeTopicIndex(), and writeUserGroupStubPage().

◆ writeAlphabeticalClassList()

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

Definition at line 2277 of file index.cpp.

2278{
2279 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2280
2281 // What starting letters are used
2282 UsedIndexLetters indexLettersUsed;
2283
2284 // first count the number of headers
2285 for (const auto &cd : *Doxygen::classLinkedMap)
2286 {
2287 if (sliceOpt && cd->compoundType() != ct)
2288 continue;
2289 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2290 {
2291 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2292 continue;
2293
2294 // get the first UTF8 character (after the part that should be ignored)
2295 int index = getPrefixIndex(cd->className());
2296 std::string letter = getUTF8CharAt(cd->className().str(),index);
2297 if (!letter.empty())
2298 {
2299 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2300 }
2301 }
2302 }
2303
2304 // write quick link index (row of letters)
2305 QCString alphaLinks = "<div class=\"qindex\">";
2306 bool first=true;
2307 for (const auto &letter : indexLettersUsed)
2308 {
2309 if (!first) alphaLinks += "&#160;|&#160;";
2310 first=false;
2311 QCString li = letterToLabel(letter);
2312 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2313 li + "\">" +
2314 letter + "</a>";
2315 }
2316 alphaLinks += "</div>\n";
2317 ol.writeString(alphaLinks);
2318
2319 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2320
2321 // fill the columns with the class list (row elements in each column,
2322 // expect for the columns with number >= itemsInLastRow, which get one
2323 // item less.
2324 for (const auto &cd : *Doxygen::classLinkedMap)
2325 {
2326 if (sliceOpt && cd->compoundType() != ct)
2327 continue;
2328 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2329 continue;
2330
2331 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2332 {
2333 QCString className = cd->className();
2334 int index = getPrefixIndex(className);
2335 std::string letter = getUTF8CharAt(className.str(),index);
2336 if (!letter.empty())
2337 {
2338 letter = convertUTF8ToUpper(letter);
2339 auto it = classesByLetter.find(letter);
2340 if (it!=classesByLetter.end()) // add class to the existing list
2341 {
2342 it->second.push_back(cd.get());
2343 }
2344 else // new entry
2345 {
2346 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2347 }
2348 }
2349 }
2350 }
2351
2352 // sort the class lists per letter while ignoring the prefix
2353 for (auto &[letter,list] : classesByLetter)
2354 {
2355 std::stable_sort(list.begin(), list.end(),
2356 [](const auto &c1,const auto &c2)
2357 {
2358 QCString n1 = c1->className();
2359 QCString n2 = c2->className();
2360 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2361 });
2362 }
2363
2364 // generate table
2365 if (!classesByLetter.empty())
2366 {
2367 ol.writeString("<div class=\"classindex\">\n");
2368 int counter=0;
2369 for (const auto &cl : classesByLetter)
2370 {
2371 QCString parity = (counter++%2)==0 ? "even" : "odd";
2372 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2373
2374 // write character heading
2375 ol.writeString("<dt class=\"alphachar\">");
2376 QCString s = letterToLabel(cl.first);
2377 ol.writeString("<a id=\"letter_");
2378 ol.writeString(s);
2379 ol.writeString("\" name=\"letter_");
2380 ol.writeString(s);
2381 ol.writeString("\">");
2382 ol.writeString(cl.first);
2383 ol.writeString("</a>");
2384 ol.writeString("</dt>\n");
2385
2386 // write class links
2387 for (const auto &cd : cl.second)
2388 {
2389 ol.writeString("<dd>");
2390 QCString namesp,cname;
2391 extractNamespaceName(cd->name(),cname,namesp);
2392 QCString nsDispName;
2393 SrcLangExt lang = cd->getLanguage();
2395 if (sep!="::")
2396 {
2397 nsDispName=substitute(namesp,"::",sep);
2398 cname=substitute(cname,"::",sep);
2399 }
2400 else
2401 {
2402 nsDispName=namesp;
2403 }
2404
2405 ol.writeObjectLink(cd->getReference(),
2406 cd->getOutputFileBase(),cd->anchor(),cname);
2407 if (!namesp.isEmpty())
2408 {
2409 ol.writeString(" (");
2410 NamespaceDef *nd = getResolvedNamespace(namesp);
2411 if (nd && nd->isLinkable())
2412 {
2414 nd->getOutputFileBase(),QCString(),nsDispName);
2415 }
2416 else
2417 {
2418 ol.docify(nsDispName);
2419 }
2420 ol.writeString(")");
2421 }
2422 ol.writeString("</dd>");
2423 }
2424
2425 ol.writeString("</dl>\n");
2426 }
2427 ol.writeString("</div>\n");
2428 }
2429}
virtual bool isLinkable() const =0
virtual QCString getReference() const =0
virtual QCString getOutputFileBase() const =0
An abstract interface of a namespace symbol.
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition outputlist.h:439
void docify(const QCString &s)
Definition outputlist.h:437
const std::string & str() const
Definition qcstring.h:552
static VhdlClasses convert(Protection prot)
Definition vhdldocgen.h:80
std::set< std::string > UsedIndexLetters
Definition index.cpp:2274
NamespaceDef * getResolvedNamespace(const QCString &name)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:482
SrcLangExt
Definition types.h:207
std::string convertUTF8ToUpper(const std::string &input)
Converts the input string into a upper case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:192
std::string getUTF8CharAt(const std::string &input, size_t pos)
Returns the UTF8 character found at byte position pos in the input string.
Definition utf8.cpp:127
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:3627
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5829
int getPrefixIndex(const QCString &name)
Definition util.cpp:3167

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 2520 of file index.cpp.

2521{
2522 if (Index::instance().numAnnotatedExceptions()==0) return;
2523 ol.pushGeneratorState();
2525 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2526 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2527 bool addToIndex = lne==nullptr || lne->visible();
2528
2529 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2530
2531 startTitle(ol,QCString());
2532 ol.parseText(title);
2533 endTitle(ol,QCString(),QCString());
2534
2535 if (addToIndex)
2536 {
2537 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2538 }
2539
2540 ol.startContents();
2541 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2542 endFile(ol); // contains ol.endContents()
2543
2544 ol.popGeneratorState();
2545}
@ Exception
Definition classdef.h:115
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1448
void startContents()
Definition outputlist.h:618
void parseText(const QCString &textStr)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
void startFile(OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2277
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
QCString title() const
Definition layout.h:216
LayoutNavEntry * find(LayoutNavEntry::Kind k, const QCString &file=QCString()) const
Definition layout.cpp:133
bool visible() const
Definition layout.h:222

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 2433 of file index.cpp.

2434{
2435 if (Index::instance().numAnnotatedClasses()==0) return;
2436 ol.pushGeneratorState();
2438 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2439 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2440 bool addToIndex = lne==nullptr || lne->visible();
2441
2442 startFile(ol,"classes",false,QCString(),title,HighlightedItem::Classes);
2443
2444 startTitle(ol,QCString());
2445 ol.parseText(title);
2446 endTitle(ol,QCString(),QCString());
2447
2448 if (addToIndex)
2449 {
2450 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2451 }
2452
2453 ol.startContents();
2454 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2455 endFile(ol); // contains ol.endContents()
2456
2457 ol.popGeneratorState();
2458}

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 2462 of file index.cpp.

2463{
2464 if (Index::instance().numAnnotatedInterfaces()==0) return;
2465 ol.pushGeneratorState();
2467 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2468 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2469 bool addToIndex = lne==nullptr || lne->visible();
2470
2471 startFile(ol,"interfaces",false,QCString(),title,HighlightedItem::Interfaces);
2472
2473 startTitle(ol,QCString());
2474 ol.parseText(title);
2475 endTitle(ol,QCString(),QCString());
2476
2477 if (addToIndex)
2478 {
2479 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2480 }
2481
2482 ol.startContents();
2483 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2484 endFile(ol); // contains ol.endContents()
2485
2486 ol.popGeneratorState();
2487}
@ Interface
Definition classdef.h:112

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 2491 of file index.cpp.

2492{
2493 if (Index::instance().numAnnotatedStructs()==0) return;
2494 ol.pushGeneratorState();
2496 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2497 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2498 bool addToIndex = lne==nullptr || lne->visible();
2499
2500 startFile(ol,"structs",false,QCString(),title,HighlightedItem::Structs);
2501
2502 startTitle(ol,QCString());
2503 ol.parseText(title);
2504 endTitle(ol,QCString(),QCString());
2505
2506 if (addToIndex)
2507 {
2508 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2509 }
2510
2511 ol.startContents();
2512 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2513 endFile(ol); // contains ol.endContents()
2514
2515 ol.popGeneratorState();
2516}

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 2172 of file index.cpp.

2173{
2174 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2175 //bool addToIndex = lne==nullptr || lne->visible();
2176 bool first=TRUE;
2177
2178 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2179
2180 for (const auto &cd : *Doxygen::classLinkedMap)
2181 {
2182 if (cd->getLanguage()==SrcLangExt::VHDL &&
2183 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2185 ) // no architecture
2186 {
2187 continue;
2188 }
2189 if (first)
2190 {
2191 ol.startIndexList();
2192 first=FALSE;
2193 }
2194
2195 if (sliceOpt && cd->compoundType() != ct)
2196 {
2197 continue;
2198 }
2199
2200 ol.pushGeneratorState();
2201 if (cd->isEmbeddedInOuterScope())
2202 {
2206 }
2207 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2208 {
2209 ol.startIndexKey();
2210 if (cd->getLanguage()==SrcLangExt::VHDL)
2211 {
2213 ol.docify(prot);
2214 ol.writeString(" ");
2215 }
2216 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2217 ol.endIndexKey();
2218 bool hasBrief = !cd->briefDescription().isEmpty();
2219 ol.startIndexValue(hasBrief);
2220 if (hasBrief)
2221 {
2222 ol.generateDoc(cd->briefFile(),
2223 cd->briefLine(),
2224 cd.get(),
2225 nullptr,
2226 cd->briefDescription(true),
2227 DocOptions()
2228 .setSingleLine(true)
2229 .setLinkFromIndex(true));
2230 }
2231 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2232
2233 //if (addToIndex)
2234 //{
2235 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2236 //}
2237 }
2238 ol.popGeneratorState();
2239 }
2240 if (!first) ol.endIndexList();
2241}
void endIndexValue(const QCString &name, bool b)
Definition outputlist.h:427
void startIndexKey()
Definition outputlist.h:421
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, const DocOptions &options)
void endIndexKey()
Definition outputlist.h:423
void startIndexValue(bool b)
Definition outputlist.h:425
static QCString getProtectionName(int prot)

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 2691 of file index.cpp.

2692{
2693 const auto &index = Index::instance();
2695 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2696 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2697 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2699 "annotatedexceptions",
2701}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2574
@ AnnotatedExceptions
Definition index.h:76

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2649 of file index.cpp.

2650{
2651 const auto &index = Index::instance();
2653 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2654 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2655 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2657 "annotated",
2659}
@ AnnotatedClasses
Definition index.h:73

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2574 of file index.cpp.

2575{
2576 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2577 // annotatedClasses,annotatedClassesPrinted);
2578 if (ctx.numAnnotated==0) return;
2579
2580 ol.pushGeneratorState();
2582 if (ctx.numPrinted==0)
2583 {
2586 }
2588 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2589 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2590 bool addToIndex = lne==nullptr || lne->visible();
2591
2592 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2593
2594 startTitle(ol,QCString());
2595 ol.parseText(title);
2596 endTitle(ol,QCString(),QCString());
2597
2598 ol.startContents();
2599
2600 ol.startTextBlock();
2601 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2602 ol.endTextBlock();
2603
2604 // ---------------
2605 // Linear class index for Latex/RTF
2606 // ---------------
2607 ol.pushGeneratorState();
2609 Doxygen::indexList->disable();
2610
2612
2613 Doxygen::indexList->enable();
2614 ol.popGeneratorState();
2615
2616 // ---------------
2617 // Hierarchical class index for HTML
2618 // ---------------
2619 ol.pushGeneratorState();
2621
2622 {
2623 if (addToIndex)
2624 {
2625 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2626 Doxygen::indexList->incContentsDepth();
2627 }
2628 FTVHelp ftv(false);
2631 TextStream t;
2632 ftv.generateTreeViewInline(t);
2633 ol.writeString(t.str());
2634 if (addToIndex)
2635 {
2636 Doxygen::indexList->decContentsDepth();
2637 }
2638 }
2639
2640 ol.popGeneratorState();
2641 // ------
2642
2643 endFile(ol); // contains ol.endContents()
2644 ol.popGeneratorState();
2645}
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2172
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2028
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1749
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2566
const ClassDef::CompoundType compoundType
Definition index.cpp:2569
const HighlightedItem hiItem
Definition index.cpp:2571
const QCString fileBaseName
Definition index.cpp:2570
const LayoutNavEntry::Kind listKind
Definition index.cpp:2565
const QCString listDefaultTitleText
Definition index.cpp:2567
const int numAnnotated
Definition index.cpp:2563
const QCString listDefaultIntroText
Definition index.cpp:2568
QCString intro() const
Definition layout.h:217

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 2663 of file index.cpp.

2664{
2665 const auto &index = Index::instance();
2667 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2668 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2669 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2671 "annotatedinterfaces",
2673}
@ AnnotatedInterfaces
Definition index.h:74

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2677 of file index.cpp.

2678{
2679 const auto &index = Index::instance();
2681 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2682 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2683 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2685 "annotatedstructs",
2687}
@ AnnotatedStructs
Definition index.h:75

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 1090 of file index.cpp.

1091{
1092 ClassDefSet visitedClasses;
1093 if (ftv)
1094 {
1095 ol.pushGeneratorState();
1097 }
1098 bool started=FALSE;
1099 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1100 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1101 if (started)
1102 {
1103 endIndexHierarchy(ol,0);
1104 if (addToIndex)
1105 {
1106 Doxygen::indexList->decContentsDepth();
1107 }
1108 }
1109 if (ftv)
1110 {
1111 ol.popGeneratorState();
1112 }
1113}
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:323
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:984

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 2704 of file index.cpp.

2706{
2707 const ClassDef *cd=md->getClassDef();
2708 if ( cd && prevClassName!=cd->displayName())
2709 {
2710 ol.writeString(separator);
2712 cd->displayName());
2713 prevClassName = cd->displayName();
2714 }
2715}
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual QCString anchor() const =0
virtual QCString displayName(bool includeScope=TRUE) const =0
virtual const ClassDef * getClassDef() const =0

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 3258 of file index.cpp.

3259{
3260 const auto &index = Index::instance();
3261 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3262 bool addToIndex = lne==nullptr || lne->visible();
3263
3264 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3265 {
3266 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3267 Doxygen::indexList->incContentsDepth();
3268 }
3278 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3279 {
3280 Doxygen::indexList->decContentsDepth();
3281 }
3282
3283}
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3129

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 3129 of file index.cpp.

3130{
3131 const auto &index = Index::instance();
3132 if (index.numDocumentedClassMembers(hl)==0) return;
3133
3134 bool disableIndex = Config_getBool(DISABLE_INDEX);
3135 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3136 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3137 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3138 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3139
3140 bool multiPageIndex=FALSE;
3141 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3142 {
3143 multiPageIndex=TRUE;
3144 }
3145
3146 ol.pushGeneratorState();
3148
3150 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3151 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3152 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3153 bool addToIndex = lne==nullptr || lne->visible();
3154
3155 if (addToIndex)
3156 {
3157 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3158 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3159 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3160 }
3161
3162 bool first=TRUE;
3163 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3164 {
3165 QCString fileName = getCmhlInfo(hl)->fname;
3166 if (multiPageIndex)
3167 {
3168 QCString cs(letter);
3169 if (!first)
3170 {
3171 fileName+="_"+letterToLabel(cs);
3172 }
3173 if (addToIndex)
3174 {
3175 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3176 }
3177 }
3178
3179 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3180
3181 auto writeQuickLinks = [&,cap_letter=letter]()
3182 {
3184 if (!dynamicMenus)
3185 {
3187
3188 // index item for global member list
3191 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3193
3194 // index items per category member lists
3195 for (int i=1;i<ClassMemberHighlight::Total;i++)
3196 {
3197 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3198 {
3200 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3201 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3202 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3204 }
3205 }
3206
3208
3209 // quick alphabetical index
3210 if (quickIndex)
3211 {
3212 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3213 getCmhlInfo(hl)->fname,multiPageIndex);
3214 }
3215
3216 ol.writeString("</div><!-- main-nav -->\n");
3217 }
3218 };
3219
3220 ol.startFile(fileName+extension,false,QCString(),title);
3221 ol.startQuickIndices();
3222 if (!disableIndex && !quickLinksAfterSplitbar)
3223 {
3224 writeQuickLinks();
3225 }
3226 ol.endQuickIndices();
3227 ol.writeSplitBar(fileName,QCString());
3228 if (quickLinksAfterSplitbar)
3229 {
3230 writeQuickLinks();
3231 if (!dynamicMenus)
3232 {
3233 ol.writeString("<div id=\"container\">\n");
3234 ol.writeString("<div id=\"doc-content\">\n");
3235 }
3236 }
3237 ol.writeSearchInfo();
3238
3239 ol.startContents();
3240
3241 ol.startTextBlock();
3242 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3243 ol.endTextBlock();
3244
3245 writeMemberList(ol,quickIndex,
3246 multiPageIndex ? letter : std::string(),
3247 index.isClassIndexLetterUsed(hl),
3249 endFile(ol);
3250 first=FALSE;
3251 }
3252
3253 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3254
3255 ol.popGeneratorState();
3256}
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:358
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool, bool &first)
Definition index.cpp:364
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:377
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition index.cpp:3071
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2758
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition index.cpp:345
QCString title
Definition index.cpp:3104
const char * fname
Definition index.cpp:3103
QCString fixSpaces(const QCString &s)
Definition util.h:470

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 1749 of file index.cpp.

1750{
1751 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1752 for (const auto &cdi : cl)
1753 {
1754 const ClassDef *cd = get_pointer(cdi);
1755 if (cd->getLanguage()==SrcLangExt::VHDL)
1756 {
1759 )// no architecture
1760 {
1761 continue;
1762 }
1763 }
1764
1765 if (sliceOpt && cd->compoundType() != ct)
1766 {
1767 continue;
1768 }
1769
1770 if (!globalOnly ||
1771 cd->getOuterScope()==nullptr ||
1773 )
1774 {
1775 int count=0;
1776 for (const auto &ccd : cd->getClasses())
1777 {
1778 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1779 {
1780 count++;
1781 }
1782 }
1784 {
1785 if (ftv)
1786 {
1787 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1788 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1789 }
1790 if (addToIndex &&
1791 (cd->getOuterScope()==nullptr ||
1793 )
1794 )
1795 {
1796 addMembersToIndex(cd,LayoutDocManager::Class,
1797 cd->displayName(FALSE),
1798 cd->anchor(),
1799 cd->partOfGroups().empty() && !cd->isSimple());
1800 }
1801 if (count>0)
1802 {
1803 if (ftv) ftv->incContentsDepth();
1804 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1805 if (ftv) ftv->decContentsDepth();
1806 }
1807 }
1808 }
1809 }
1810}
virtual bool isSimple() const =0
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual bool isImplicitTemplateInstance() const =0
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual DefType definitionType() const =0
virtual const GroupList & partOfGroups() const =0
virtual Definition * getOuterScope() const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
void decContentsDepth()
Definition ftvhelp.cpp:154
void incContentsDepth()
Definition ftvhelp.cpp:143
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const QCString &nameAsHtml=QCString())
Definition ftvhelp.cpp:186
bool classVisibleInIndex(const ClassDef *cd)
const ClassDef * get_pointer(const Ptr &p)

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 984 of file index.cpp.

986{
987 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
988 for (const auto &cd : cl)
989 {
990 //printf("class %s classHasVisibleRoot=%d isVisibleInHierarchy=%d\n",
991 // qPrint(cd->name()),
992 // classHasVisibleRoot(cd->baseClasses()),
993 // cd->isVisibleInHierarchy()
994 // );
995 bool b = false;
996 if (cd->getLanguage()==SrcLangExt::VHDL)
997 {
998 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
999 {
1000 continue;
1001 }
1002 b=!classHasVisibleRoot(cd->subClasses());
1003 }
1004 else if (sliceOpt && cd->compoundType() != ct)
1005 {
1006 continue;
1007 }
1008 else
1009 {
1010 b=!classHasVisibleRoot(cd->baseClasses());
1011 }
1012
1013 if (b) //filter on root classes
1014 {
1015 if (cd->isVisibleInHierarchy()) // should it be visible
1016 {
1017 if (!started)
1018 {
1019 startIndexHierarchy(ol,0);
1020 if (addToIndex)
1021 {
1022 Doxygen::indexList->incContentsDepth();
1023 }
1024 started=TRUE;
1025 }
1026 ol.startIndexListItem();
1027 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1028 classHasVisibleChildren(cd.get());
1029 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1030 if (cd->isLinkable())
1031 {
1032 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1033 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1034 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1035 ol.generateDoc(cd->getDefFileName(),
1036 cd->getDefLine(),
1037 cd.get(),
1038 nullptr,
1039 cd->displayName(),
1040 DocOptions()
1041 .setSingleLine(true)
1042 .setAutolinkSupport(false));
1043 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1044 if (cd->isReference())
1045 {
1046 ol.startTypewriter();
1047 ol.docify(" [external]");
1048 ol.endTypewriter();
1049 }
1050 if (addToIndex)
1051 {
1052 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1053 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
1054 }
1055 if (ftv)
1056 {
1057 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
1058 }
1059 }
1060 else
1061 {
1063 ol.parseText(cd->displayName());
1065 if (addToIndex)
1066 {
1067 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
1068 }
1069 if (ftv)
1070 {
1071 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
1072 }
1073 }
1074 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1075 {
1076 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1077 visitedClasses.insert(cd.get());
1078 }
1079 else if (hasChildren)
1080 {
1081 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1082 visitedClasses.insert(cd.get());
1083 }
1084 ol.endIndexListItem();
1085 }
1086 }
1087 }
1088}
void startIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:433
void endIndexItem(const QCString &ref, const QCString &file)
Definition outputlist.h:435
void startTypewriter()
Definition outputlist.h:449
void endIndexListItem()
Definition outputlist.h:415
void endTypewriter()
Definition outputlist.h:451
void startIndexListItem()
Definition outputlist.h:413
bool classHasVisibleChildren(const ClassDef *cd)
static void writeClassTreeToOutput(OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
Definition index.cpp:619
static void startIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:307

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

Referenced by writeClassHierarchy().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 2037 of file index.cpp.

2039{
2040 for (const auto &nd : nsLinkedMap)
2041 {
2042 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2043 }
2044}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1956

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2028 of file index.cpp.

2030{
2031 for (const auto &nd : nsLinkedMap)
2032 {
2033 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2034 }
2035}

References writeClassTreeInsideNamespaceElement().

Referenced by writeAnnotatedIndexGeneric(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespaceElement()

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

Definition at line 1956 of file index.cpp.

1958{
1959 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1960 if (!nd->isAnonymous() &&
1961 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1962 {
1963 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1964 bool isLinkable = nd->isLinkableInProject();
1965
1966 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1967
1968 QCString ref;
1969 QCString file;
1970 if (isLinkable)
1971 {
1972 ref = nd->getReference();
1973 file = nd->getOutputFileBase();
1974 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1975 {
1976 file=file.replace(0,qstrlen("namespace"),"class");
1977 }
1978 }
1979
1980 if (isDir)
1981 {
1982 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1983
1984 if (addToIndex)
1985 {
1986 // the namespace entry is already shown under the namespace list so don't
1987 // add it to the nav index and don't create a separate index file for it otherwise
1988 // it will overwrite the one written for the namespace list.
1989 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1990 false, // separateIndex
1991 false // addToNavIndex
1992 );
1993 }
1994 if (addToIndex)
1995 {
1996 Doxygen::indexList->incContentsDepth();
1997 }
1998
1999 ftv->incContentsDepth();
2000 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
2001 ClassLinkedRefMap d = nd->getClasses();
2002 if (sliceOpt)
2003 {
2004 if (ct == ClassDef::Interface)
2005 {
2006 d = nd->getInterfaces();
2007 }
2008 else if (ct == ClassDef::Struct)
2009 {
2010 d = nd->getStructs();
2011 }
2012 else if (ct == ClassDef::Exception)
2013 {
2014 d = nd->getExceptions();
2015 }
2016 }
2017 writeClassTree(d,ftv,addToIndex,FALSE,ct);
2018 ftv->decContentsDepth();
2019
2020 if (addToIndex)
2021 {
2022 Doxygen::indexList->decContentsDepth();
2023 }
2024 }
2025 }
2026}
virtual const QCString & localName() const =0
virtual bool isLinkableInProject() const =0
virtual bool isAnonymous() const =0
virtual ClassLinkedRefMap getStructs() const =0
virtual ClassLinkedRefMap getExceptions() const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual ClassLinkedRefMap getInterfaces() const =0
QCString & replace(size_t index, size_t len, const char *s)
Definition qcstring.cpp:217
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58

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 619 of file index.cpp.

620{
621 if (bcl.empty()) return;
622 bool started=FALSE;
623 for (const auto &bcd : bcl)
624 {
625 ClassDef *cd=bcd.classDef;
626 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
627 {
628 continue;
629 }
630
631 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
632
633 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
634 {
635 if (!started)
636 {
637 startIndexHierarchy(ol,level);
638 if (addToIndex)
639 {
640 Doxygen::indexList->incContentsDepth();
641 }
642 if (ftv)
643 {
644 ftv->incContentsDepth();
645 }
646 started=TRUE;
647 }
649 //printf("Passed...\n");
650 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
652 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
653 if (cd->isLinkable())
654 {
655 //printf("Writing class %s\n",qPrint(cd->displayName()));
656 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
657 ol.generateDoc(cd->getDefFileName(),
658 cd->getDefLine(),
659 cd,
660 nullptr,
661 cd->displayName(),
662 DocOptions()
663 .setSingleLine(true)
664 .setAutolinkSupport(false));
665 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
666 if (cd->isReference())
667 {
668 ol.startTypewriter();
669 ol.docify(" [external]");
670 ol.endTypewriter();
671 }
672 if (addToIndex)
673 {
674 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
675 }
676 if (ftv)
677 {
678 if (cd->getLanguage()==SrcLangExt::VHDL)
679 {
680 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
681 }
682 else
683 {
684 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
685 }
686 }
687 }
688 else
689 {
691 ol.parseText(cd->name());
693 if (addToIndex)
694 {
695 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
696 }
697 if (ftv)
698 {
699 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
700 }
701 }
702 if (hasChildren)
703 {
704 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
705 visitedClasses.insert(cd);
706 if (cd->getLanguage()==SrcLangExt::VHDL)
707 {
708 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
709 }
710 else
711 {
712 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
713 }
714 }
715 ol.endIndexListItem();
716 }
717 }
718 if (started)
719 {
720 endIndexHierarchy(ol,level);
721 if (addToIndex)
722 {
723 Doxygen::indexList->decContentsDepth();
724 }
725 if (ftv)
726 {
727 ftv->decContentsDepth();
728 }
729 }
730}
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual const QCString & name() const =0

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, OutputList::generateDoc(), Definition::getDefFileName(), Definition::getDefLine(), 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 4701 of file index.cpp.

4702{
4703 if (Index::instance().numDocumentedConcepts()==0) return;
4704 ol.pushGeneratorState();
4705 // 1.{
4708 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4709 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4710 bool addToIndex = lne==nullptr || lne->visible();
4711
4712 startFile(ol,"concepts",false,QCString(),title,HighlightedItem::Concepts);
4713 startTitle(ol,QCString());
4714 ol.parseText(title);
4715 endTitle(ol,QCString(),QCString());
4716 ol.startContents();
4717 ol.startTextBlock();
4718 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4719 ol.endTextBlock();
4720
4721 // ---------------
4722 // Normal group index for Latex/RTF
4723 // ---------------
4724 // 2.{
4725 ol.pushGeneratorState();
4727
4728 bool first=TRUE;
4729 for (const auto &cd : *Doxygen::conceptLinkedMap)
4730 {
4731 if (cd->isLinkableInProject())
4732 {
4733 if (first)
4734 {
4735 ol.startIndexList();
4736 first=FALSE;
4737 }
4738 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4739 ol.startIndexKey();
4740 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4741 ol.endIndexKey();
4742
4743 bool hasBrief = !cd->briefDescription().isEmpty();
4744 ol.startIndexValue(hasBrief);
4745 if (hasBrief)
4746 {
4747 ol.generateDoc(cd->briefFile(),
4748 cd->briefLine(),
4749 cd.get(),
4750 nullptr,
4751 cd->briefDescription(true),
4752 DocOptions()
4753 .setSingleLine(true)
4754 .setLinkFromIndex(true));
4755 }
4756 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4757
4758 }
4759 }
4760 if (!first) ol.endIndexList();
4761
4762 ol.popGeneratorState();
4763 // 2.}
4764
4765 // ---------------
4766 // interactive group index for HTML
4767 // ---------------
4768 // 2.{
4769 ol.pushGeneratorState();
4771
4772 {
4773 if (addToIndex)
4774 {
4775 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4776 Doxygen::indexList->incContentsDepth();
4777 }
4778 FTVHelp ftv(false);
4779 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4780 {
4781 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4782 }
4783 writeConceptRootList(&ftv,addToIndex);
4784 TextStream t;
4785 ftv.generateTreeViewInline(t);
4786 ol.writeString(t.str());
4787 if (addToIndex)
4788 {
4789 Doxygen::indexList->decContentsDepth();
4790 }
4791 }
4792 ol.popGeneratorState();
4793 // 2.}
4794
4795 endFile(ol);
4796 ol.popGeneratorState();
4797 // 1.}
4798}
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4679
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4628

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 4595 of file index.cpp.

4596{
4597 for (const auto &cd : concepts)
4598 {
4599 if (cd->isLinkableInProject())
4600 {
4601 if (ftv)
4602 {
4603 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4604 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4605 }
4606 if (addToIndex)
4607 {
4608 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4609 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4610 }
4611 }
4612 }
4613}

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

Referenced by writeConceptTreeInsideNamespaceElement(), writeModuleTreeNode(), and writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4679 of file index.cpp.

4680{
4681 for (const auto &cd : *Doxygen::conceptLinkedMap)
4682 {
4683 if ((cd->getOuterScope()==nullptr ||
4684 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4685 )
4686 {
4687 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4688 ftv->addContentsItem(
4689 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4690 QCString(),false,cd->partOfGroups().empty(),cd.get());
4691 if (addToIndex)
4692 {
4693 Doxygen::indexList->addContentsItem(
4694 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4695 QCString(),false,cd->partOfGroups().empty(),cd.get());
4696 }
4697 }
4698 }
4699}

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 4618 of file index.cpp.

4620{
4621 for (const auto &nd : nsLinkedMap)
4622 {
4623 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4624 }
4625}

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4628 of file index.cpp.

4630{
4631 if (!nd->isAnonymous() &&
4632 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4633 {
4634 bool isDir = namespaceHasNestedConcept(nd);
4635 bool isLinkable = nd->isLinkableInProject();
4636
4637 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4638
4639 QCString ref;
4640 QCString file;
4641 if (isLinkable)
4642 {
4643 ref = nd->getReference();
4644 file = nd->getOutputFileBase();
4645 }
4646
4647 if (isDir)
4648 {
4649 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4650
4651 if (addToIndex)
4652 {
4653 // the namespace entry is already shown under the namespace list so don't
4654 // add it to the nav index and don't create a separate index file for it otherwise
4655 // it will overwrite the one written for the namespace list.
4656 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4657 false, // separateIndex
4658 false // addToNavIndex
4659 );
4660 }
4661 if (addToIndex)
4662 {
4663 Doxygen::indexList->incContentsDepth();
4664 }
4665
4666 ftv->incContentsDepth();
4668 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4669 ftv->decContentsDepth();
4670
4671 if (addToIndex)
4672 {
4673 Doxygen::indexList->decContentsDepth();
4674 }
4675 }
4676 }
4677}
virtual ConceptLinkedRefMap getConcepts() const =0
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4618
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4595
bool namespaceHasNestedConcept(const NamespaceDef *nd)

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 920 of file index.cpp.

921{
922 if (ftv)
923 {
926 }
928 for (const auto &dd : *Doxygen::dirLinkedMap)
929 {
930 if (dd->getOuterScope()==Doxygen::globalScope)
931 {
932 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
933 }
934 }
935 if (ftv)
936 {
937 for (const auto &fn : *Doxygen::inputNameLinkedMap)
938 {
939 for (const auto &fd : *fn)
940 {
941 if (fd->getDirDef()==nullptr) // top level file
942 {
943 bool src = false;
944 bool doc = fileVisibleInIndex(fd.get(),src);
945 QCString reference, outputBase;
946 if (doc)
947 {
948 reference = fd->getReference();
949 outputBase = fd->getOutputFileBase();
950 }
951 if (doc || src)
952 {
953 ftv->addContentsItem(FALSE,fd->displayName(),
954 reference, outputBase, QCString(),
955 FALSE,FALSE,fd.get());
956 }
957 if (addToIndex)
958 {
959 if (doc)
960 {
961 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
962 }
963 else if (src)
964 {
965 Doxygen::indexList->addContentsItem(
966 FALSE, fd->displayName(), QCString(),
967 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
968 }
969 }
970 }
971 }
972 }
973 }
974 endIndexHierarchy(ol,0);
975 if (ftv)
976 {
978 }
979}
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:762

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().

◆ writeDirIndex()

void writeDirIndex ( OutputList & ol)
static

Definition at line 1564 of file index.cpp.

1565{
1566 if (Index::instance().numDocumentedDirs()==0) return;
1567 ol.pushGeneratorState();
1569
1570 QCString title = theTranslator->trDirectories();
1571 startFile(ol,"dirs",false,QCString(),title,HighlightedItem::Files);
1572 startTitle(ol,title);
1573 ol.parseText(title);
1574 endTitle(ol,QCString(),QCString());
1575
1576 ol.startIndexList();
1577 for (const auto &dir : *Doxygen::dirLinkedMap)
1578 {
1579 if (dir->hasDocumentation())
1580 {
1581 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1582 }
1583 }
1584
1585 ol.endIndexList();
1586
1587 endFile(ol);
1588 ol.popGeneratorState();
1589}

References Doxygen::dirLinkedMap, OutputList::disable(), endFile(), OutputList::endIndexList(), endTitle(), Files, Html, Index::instance(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startFile(), OutputList::startIndexList(), startTitle(), theTranslator, and writeDirTreeNode().

Referenced by writeIndexHierarchyEntries().

◆ writeDirTreeNode()

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

Definition at line 762 of file index.cpp.

763{
764 if (level>20)
765 {
766 warn(dd->getDefFileName(),dd->getDefLine(),
767 "maximum nesting level exceeded for directory {}: "
768 "check for possible recursive directory relation!",dd->name());
769 return;
770 }
771
772 if (!dirHasVisibleChildren(dd))
773 {
774 return;
775 }
776
777 bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
778 bool isDir = !dd->subDirs().empty() || // there are subdirs
779 (tocExpand && // or toc expand and
780 !dd->getFiles().empty() // there are files
781 );
782 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
783 if (addToIndex)
784 {
785 Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
786 Doxygen::indexList->incContentsDepth();
787 }
788 if (ftv)
789 {
790 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
792 ftv->incContentsDepth();
793 }
794
798 dd->getDefLine(),
799 dd,
800 nullptr,
801 dd->shortName(),
802 DocOptions()
803 .setSingleLine(true)
804 .setAutolinkSupport(false));
806 if (dd->isReference())
807 {
808 ol.startTypewriter();
809 ol.docify(" [external]");
810 ol.endTypewriter();
811 }
812
813 // write sub directories
814 if (dd->subDirs().size()>0)
815 {
816 startIndexHierarchy(ol,level+1);
817 for(const auto &subdd : dd->subDirs())
818 {
819 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
820 }
821 endIndexHierarchy(ol,level+1);
822 }
823
824 int fileCount=0;
825 if (!dd->getFiles().empty())
826 {
827 for (const auto &fd : dd->getFiles())
828 {
829 //bool allExternals = Config_getBool(ALLEXTERNALS);
830 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
831 //{
832 // fileCount++;
833 //}
834 bool genSourceFile = false;
835 if (fileVisibleInIndex(fd,genSourceFile))
836 {
837 fileCount++;
838 }
839 else if (genSourceFile)
840 {
841 fileCount++;
842 }
843 }
844 if (fileCount>0)
845 {
846 startIndexHierarchy(ol,level+1);
847 for (const auto &fd : dd->getFiles())
848 {
849 bool src = false;
850 bool doc = fileVisibleInIndex(fd,src);
851 QCString reference;
852 QCString outputBase;
853 if (doc)
854 {
855 reference = fd->getReference();
856 outputBase = fd->getOutputFileBase();
857 }
858 if (doc || src)
859 {
861 ol.startIndexItem(reference,outputBase);
862 ol.generateDoc(fd->getDefFileName(),
863 fd->getDefLine(),
864 fd,
865 nullptr,
866 fd->displayName(),
867 DocOptions()
868 .setSingleLine(true)
869 .setAutolinkSupport(false));
870 ol.endIndexItem(reference,outputBase);
871 ol.endIndexListItem();
872 if (ftv && (src || doc))
873 {
875 fd->displayName(),
876 reference,outputBase,
877 QCString(),FALSE,FALSE,fd);
878 }
879 }
880 }
881 endIndexHierarchy(ol,level+1);
882 }
883 }
884
885 if (tocExpand && addToIndex)
886 {
887 // write files of this directory
888 if (fileCount>0)
889 {
890 for (const auto &fd : dd->getFiles())
891 {
892 bool src = false;
893 bool doc = fileVisibleInIndex(fd,src);
894 if (doc)
895 {
896 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
897 !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
898 }
899 else if (src)
900 {
901 Doxygen::indexList->addContentsItem(
902 FALSE, fd->name(), QCString(),
903 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
904 }
905 }
906 }
907 }
908 ol.endIndexListItem();
909
910 if (addToIndex)
911 {
912 Doxygen::indexList->decContentsDepth();
913 }
914 if (ftv)
915 {
916 ftv->decContentsDepth();
917 }
918}
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual bool isReference() const =0
virtual const QCString shortName() const =0
#define warn(file, line, fmt,...)
Definition message.h:97

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

Referenced by writeDirHierarchy(), writeDirIndex(), and writeDirTreeNode().

◆ writeExampleIndex()

void writeExampleIndex ( OutputList & ol)
static

Definition at line 3831 of file index.cpp.

3832{
3833 if (Doxygen::exampleLinkedMap->empty()) return;
3834 ol.pushGeneratorState();
3837 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3838 QCString title = lne ? lne->title() : theTranslator->trExamples();
3839 bool addToIndex = lne==nullptr || lne->visible();
3840
3841 startFile(ol,"examples",false,QCString(),title,HighlightedItem::Examples);
3842
3843 startTitle(ol,QCString());
3844 ol.parseText(title);
3845 endTitle(ol,QCString(),QCString());
3846
3847 ol.startContents();
3848
3849 if (addToIndex)
3850 {
3851 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3852 Doxygen::indexList->incContentsDepth();
3853 }
3854
3855 ol.startTextBlock();
3856 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3857 ol.endTextBlock();
3858
3859 ol.startItemList();
3860 for (const auto &pd : *Doxygen::exampleLinkedMap)
3861 {
3862 ol.startItemListItem();
3863 QCString n=pd->getOutputFileBase();
3864 if (!pd->title().isEmpty())
3865 {
3866 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3867 if (addToIndex)
3868 {
3869 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3870 }
3871 }
3872 else
3873 {
3874 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3875 if (addToIndex)
3876 {
3877 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3878 }
3879 }
3880 ol.endItemListItem();
3881 //ol.writeString("\n");
3882 }
3883 ol.endItemList();
3884
3885 if (addToIndex)
3886 {
3887 Doxygen::indexList->decContentsDepth();
3888 }
3889 endFile(ol);
3890 ol.popGeneratorState();
3891}
void startItemListItem()
Definition outputlist.h:457
void endItemListItem()
Definition outputlist.h:459

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 1593 of file index.cpp.

1594{
1595 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1596
1597 ol.pushGeneratorState();
1600
1601 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1602 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1603 QCString title = lne ? lne->title() : theTranslator->trFileList();
1604 bool addToIndex = lne==nullptr || lne->visible();
1605
1606 startFile(ol,"files",false,QCString(),title,HighlightedItem::Files);
1607 startTitle(ol,QCString());
1608 //if (!Config_getString(PROJECT_NAME).isEmpty())
1609 //{
1610 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1611 //}
1612 ol.parseText(title);
1613 endTitle(ol,QCString(),QCString());
1614 ol.startContents();
1615 ol.startTextBlock();
1616
1617 if (addToIndex)
1618 {
1619 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
1620 Doxygen::indexList->incContentsDepth();
1621 }
1622
1623 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1624 ol.endTextBlock();
1625
1626 // ---------------
1627 // Flat file index
1628 // ---------------
1629
1630 // 1. {
1631 ol.pushGeneratorState();
1633
1634 ol.startIndexList();
1635 if (Config_getBool(FULL_PATH_NAMES))
1636 {
1637 std::unordered_map<std::string,size_t> pathMap;
1638 std::vector<FilesInDir> outputFiles;
1639
1640 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1641 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1642 {
1643 for (const auto &fd : *fn)
1644 {
1645 QCString path=fd->getPath();
1646 if (path.isEmpty()) path="[external]";
1647 auto it = pathMap.find(path.str());
1648 if (it!=pathMap.end()) // existing path -> append
1649 {
1650 outputFiles.at(it->second).files.push_back(fd.get());
1651 }
1652 else // new path -> create path entry + append
1653 {
1654 pathMap.emplace(path.str(),outputFiles.size());
1655 outputFiles.emplace_back(path);
1656 outputFiles.back().files.push_back(fd.get());
1657 }
1658 }
1659 }
1660
1661 // sort the files by path
1662 std::stable_sort(outputFiles.begin(),
1663 outputFiles.end(),
1664 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1665 // sort the files inside the directory by name
1666 for (auto &fp : outputFiles)
1667 {
1668 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1669 }
1670 // write the results
1671 for (const auto &fp : outputFiles)
1672 {
1673 for (const auto &fd : fp.files)
1674 {
1675 writeSingleFileIndex(ol,fd);
1676 }
1677 }
1678 }
1679 else
1680 {
1681 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1682 {
1683 for (const auto &fd : *fn)
1684 {
1685 writeSingleFileIndex(ol,fd.get());
1686 }
1687 }
1688 }
1689 ol.endIndexList();
1690
1691 // 1. }
1692 ol.popGeneratorState();
1693
1694 // ---------------
1695 // Hierarchical file index for HTML
1696 // ---------------
1697 ol.pushGeneratorState();
1699
1700 {
1701 FTVHelp ftv(false);
1702 writeDirHierarchy(ol,&ftv,addToIndex);
1703 TextStream t;
1704 ftv.generateTreeViewInline(t);
1705 ol.writeString(t.str());
1706 }
1707
1708 ol.popGeneratorState();
1709 // ------
1710
1711 if (addToIndex)
1712 {
1713 Doxygen::indexList->decContentsDepth();
1714 }
1715
1716 endFile(ol);
1717 ol.popGeneratorState();
1718}
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
bool compareFileDefs(const FileDef *fd1, const FileDef *fd2)
Definition filedef.cpp:1949
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition index.cpp:1490
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:920

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 2717 of file index.cpp.

2719{
2720 const FileDef *fd=md->getFileDef();
2721 if (fd && prevFileName!=fd->name())
2722 {
2723 ol.writeString(separator);
2725 fd->name());
2726 prevFileName = fd->name();
2727 }
2728}
A model of a file symbol.
Definition filedef.h:99
virtual const FileDef * getFileDef() const =0

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 3442 of file index.cpp.

3443{
3444 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3445 bool addToIndex = lne==nullptr || lne->visible();
3446 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3447 {
3448 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3449 Doxygen::indexList->incContentsDepth();
3450 }
3460 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3461 {
3462 Doxygen::indexList->decContentsDepth();
3463 }
3464
3465}
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3318

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 3318 of file index.cpp.

3319{
3320 const auto &index = Index::instance();
3321 if (index.numDocumentedFileMembers(hl)==0) return;
3322
3323 bool disableIndex = Config_getBool(DISABLE_INDEX);
3324 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3325 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3326 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3327 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3328
3329 bool multiPageIndex=FALSE;
3330 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3331 {
3332 multiPageIndex=TRUE;
3333 }
3334
3335 ol.pushGeneratorState();
3337
3339 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3340 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3341 bool addToIndex = lne==nullptr || lne->visible();
3342
3343 if (addToIndex)
3344 {
3345 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3346 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3347 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3348 }
3349
3350 bool first=TRUE;
3351 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3352 {
3353 QCString fileName = getFmhlInfo(hl)->fname;
3354 if (multiPageIndex)
3355 {
3356 QCString cs(letter);
3357 if (!first)
3358 {
3359 fileName+="_"+letterToLabel(cs);
3360 }
3361 if (addToIndex)
3362 {
3363 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3364 }
3365 }
3366
3367 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3368
3369 auto writeQuickLinks = [&,cap_letter=letter]()
3370 {
3372 if (!dynamicMenus)
3373 {
3375
3376 // index item for all file member lists
3379 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3381
3382 // index items for per category member lists
3383 for (int i=1;i<FileMemberHighlight::Total;i++)
3384 {
3385 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3386 {
3388 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3389 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3391 }
3392 }
3393
3395
3396 if (quickIndex)
3397 {
3398 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3399 getFmhlInfo(hl)->fname,multiPageIndex);
3400 }
3401
3402 ol.writeString("</div><!-- main-nav -->\n");
3403 }
3404 };
3405
3406 ol.startFile(fileName+extension,false,QCString(),title);
3407 ol.startQuickIndices();
3408 if (!disableIndex && !quickLinksAfterSplitbar)
3409 {
3410 writeQuickLinks();
3411 }
3412 ol.endQuickIndices();
3413 ol.writeSplitBar(fileName,QCString());
3414 if (quickLinksAfterSplitbar)
3415 {
3416 writeQuickLinks();
3417 if (!dynamicMenus)
3418 {
3419 ol.writeString("<div id=\"container\">\n");
3420 ol.writeString("<div id=\"doc-content\">\n");
3421 }
3422 }
3423 ol.writeSearchInfo();
3424
3425 ol.startContents();
3426
3427 ol.startTextBlock();
3428 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3429 ol.endTextBlock();
3430
3431 writeMemberList(ol,quickIndex,
3432 multiPageIndex ? letter : std::string(),
3433 index.isFileIndexLetterUsed(hl),
3435 endFile(ol);
3436 first=FALSE;
3437 }
3438 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3439 ol.popGeneratorState();
3440}
const char * fname
Definition index.cpp:3291

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 1232 of file index.cpp.

1233{
1234 if (Index::instance().numHierarchyClasses()==0) return;
1236 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1237 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1238 startFile(ol,"inherits",false,QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1239 startTitle(ol,QCString());
1240 ol.parseText(title);
1241 endTitle(ol,QCString(),QCString());
1242 ol.startContents();
1243 ol.startTextBlock();
1244 ol.startParagraph();
1245 ol.startTextLink("hierarchy",QCString());
1246 ol.parseText(theTranslator->trGotoTextualHierarchy());
1247 ol.endTextLink();
1248 ol.endParagraph();
1249 ol.endTextBlock();
1252 endFile(ol);
1253 ol.enableAll();
1254}
Represents a graphical class hierarchy.
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:668
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void endParagraph()
Definition outputlist.h:409
void endTextLink()
Definition outputlist.h:444
void enableAll()
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442

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 1442 of file index.cpp.

1443{
1444 if (Index::instance().numHierarchyExceptions()==0) return;
1446 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1447 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1448 startFile(ol,"exceptioninherits",false,QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1449 startTitle(ol,QCString());
1450 ol.parseText(title);
1451 endTitle(ol,QCString(),QCString());
1452 ol.startContents();
1453 ol.startTextBlock();
1454 ol.startParagraph();
1455 ol.startTextLink("exceptionhierarchy",QCString());
1456 ol.parseText(theTranslator->trGotoTextualHierarchy());
1457 ol.endTextLink();
1458 ol.endParagraph();
1459 ol.endTextBlock();
1462 endFile(ol);
1463 ol.enableAll();
1464}
@ ExceptionHierarchy
Definition index.h:67

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 1337 of file index.cpp.

1338{
1339 if (Index::instance().numHierarchyInterfaces()==0) return;
1341 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1342 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1343 startFile(ol,"interfaceinherits",false,QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1344 startTitle(ol,QCString());
1345 ol.parseText(title);
1346 endTitle(ol,QCString(),QCString());
1347 ol.startContents();
1348 ol.startTextBlock();
1349 ol.startParagraph();
1350 ol.startTextLink("interfacehierarchy",QCString());
1351 ol.parseText(theTranslator->trGotoTextualHierarchy());
1352 ol.endTextLink();
1353 ol.endParagraph();
1354 ol.endTextBlock();
1357 endFile(ol);
1358 ol.enableAll();
1359}
@ InterfaceHierarchy
Definition index.h:66

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 4060 of file index.cpp.

4061{
4062 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4063 ol.pushGeneratorState();
4065
4066 DotLegendGraph gd;
4067 gd.writeGraph(Config_getString(HTML_OUTPUT));
4068
4069 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4070 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4071 // temporarily disable the stripping of comments for our own code example!
4072 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4073 // temporarily disable create subdirs for linking to our example
4074 Config_updateBool(CREATE_SUBDIRS,FALSE);
4075
4076 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4077 startTitle(ol,QCString());
4078 ol.parseText(theTranslator->trLegendTitle());
4079 endTitle(ol,QCString(),QCString());
4080 ol.startContents();
4081 QCString legendDocs = theTranslator->trLegendDocs();
4082 int s = legendDocs.find("<center>");
4083 int e = legendDocs.find("</center>");
4084 QCString imgExt = getDotImageExtension();
4085 if (imgExt=="svg" && s!=-1 && e!=-1)
4086 {
4087 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4088 //printf("legendDocs=%s\n",qPrint(legendDocs));
4089 }
4090
4091 {
4092 auto fd = createFileDef("","graph_legend.dox");
4093 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4094 }
4095
4096 // restore config settings
4097 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4098 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4099
4100 endFile(ol);
4101 ol.popGeneratorState();
4102}
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const QCString &path)
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
QCString left(size_t len) const
Definition qcstring.h:229
#define Config_updateBool(name, value)
Definition config.h:40
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
QCString getDotImageExtension()
Definition util.cpp:6219

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 4356 of file index.cpp.

4357{
4358 if (ftv)
4359 {
4360 ol.pushGeneratorState();
4362 }
4363 startIndexHierarchy(ol,0);
4364 for (const auto &gd : *Doxygen::groupLinkedMap)
4365 {
4366 if (gd->isVisibleInHierarchy())
4367 {
4368 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4369 }
4370 }
4371 endIndexHierarchy(ol,0);
4372 if (ftv)
4373 {
4374 ol.popGeneratorState();
4375 }
4376}
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4110

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 4110 of file index.cpp.

4111{
4112 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4113 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4114 if (level>20)
4115 {
4116 warn(gd->getDefFileName(),gd->getDefLine(),
4117 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4118 return;
4119 }
4120
4121 /* Some groups should appear twice under different parent-groups.
4122 * That is why we should not check if it was visited
4123 */
4124 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4125 {
4126 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4127 // write group info
4128 bool hasSubGroups = !gd->getSubGroups().empty();
4129 bool hasSubPages = !gd->getPages().empty();
4130 size_t numSubItems = 0;
4131 for (const auto &ml : gd->getMemberLists())
4132 {
4133 if (ml->listType().isDocumentation())
4134 {
4135 numSubItems += ml->size();
4136 }
4137 }
4138 numSubItems += gd->getNamespaces().size();
4139 numSubItems += gd->getClasses().size();
4140 numSubItems += gd->getFiles().size();
4141 numSubItems += gd->getConcepts().size();
4142 numSubItems += gd->getDirs().size();
4143 numSubItems += gd->getPages().size();
4144
4145 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4146 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4147 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4148
4149 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4150 if (addToIndex)
4151 {
4152 Doxygen::indexList->addContentsItem(isDir,title,
4154 isDir,TRUE,nullptr,titleAsHtml);
4155 Doxygen::indexList->incContentsDepth();
4156 }
4157 if (ftv)
4158 {
4159 ftv->addContentsItem(hasSubGroups,title,
4161 FALSE,FALSE,gd,titleAsHtml);
4162 ftv->incContentsDepth();
4163 }
4164
4165 ol.startIndexListItem();
4167 ol.generateDoc(gd->getDefFileName(),
4168 gd->getDefLine(),
4169 gd,
4170 nullptr,
4171 gd->groupTitle(),
4172 DocOptions()
4173 .setSingleLine(true)
4174 .setAutolinkSupport(false));
4176
4177 if (gd->isReference())
4178 {
4179 ol.startTypewriter();
4180 ol.docify(" [external]");
4181 ol.endTypewriter();
4182 }
4183
4184 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4185 {
4186 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4187 {
4188 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4189 if (lmd)
4190 {
4191 MemberList *ml = gd->getMemberList(lmd->type);
4192 if (ml)
4193 {
4194 for (const auto &md : *ml)
4195 {
4196 const MemberVector &enumList = md->enumFieldList();
4197 isDir = !enumList.empty() && md->isEnumerate();
4198 if (md->isVisible() && !md->isAnonymous())
4199 {
4200 Doxygen::indexList->addContentsItem(isDir,
4201 md->qualifiedName(),md->getReference(),
4202 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4203 }
4204 if (isDir)
4205 {
4206 Doxygen::indexList->incContentsDepth();
4207 for (const auto &emd : enumList)
4208 {
4209 if (emd->isVisible())
4210 {
4211 Doxygen::indexList->addContentsItem(FALSE,
4212 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4213 emd->anchor(),FALSE,addToIndex);
4214 }
4215 }
4216 Doxygen::indexList->decContentsDepth();
4217 }
4218 }
4219 }
4220 }
4221 }
4222 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4223 {
4224 for (const auto &cd : gd->getClasses())
4225 {
4226 //bool nestedClassInSameGroup =
4227 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4228 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4229 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4230 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4231 {
4233 LayoutDocManager::Class,
4234 cd->displayName(),
4235 cd->anchor(),
4236 addToIndex,
4237 TRUE);
4238 }
4239 }
4240 }
4241 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4242 {
4243 for (const auto &nd : gd->getNamespaces())
4244 {
4245 if (nd->isVisible())
4246 {
4247 Doxygen::indexList->addContentsItem(FALSE,
4248 nd->displayName(),nd->getReference(),
4249 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4250 }
4251 }
4252 }
4253 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4254 {
4255 for (const auto &cd : gd->getConcepts())
4256 {
4257 if (cd->isVisible())
4258 {
4259 Doxygen::indexList->addContentsItem(FALSE,
4260 cd->displayName(),cd->getReference(),
4261 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4262 }
4263 }
4264 }
4265 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4266 {
4267 for (const auto &fd : gd->getFiles())
4268 {
4269 if (fd->isVisible())
4270 {
4271 Doxygen::indexList->addContentsItem(FALSE,
4272 fd->displayName(),fd->getReference(),
4273 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4274 }
4275 }
4276 }
4277 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4278 {
4279 for (const auto &dd : gd->getDirs())
4280 {
4281 if (dd->isVisible())
4282 {
4283 Doxygen::indexList->addContentsItem(FALSE,
4284 dd->shortName(),dd->getReference(),
4285 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4286 }
4287 }
4288 }
4289 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4290 {
4291 for (const auto &pd : gd->getPages())
4292 {
4293 const SectionInfo *si=nullptr;
4294 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4295 hasSubPages = pd->hasSubPages();
4296 bool hasSections = pd->hasSections();
4297 QCString pageTitle;
4298 if (pd->title().isEmpty())
4299 pageTitle=pd->name();
4300 else
4301 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4302 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4303 Doxygen::indexList->addContentsItem(
4304 hasSubPages || hasSections,
4305 pageTitle,
4306 gd->getReference(),
4307 gd->getOutputFileBase(),
4308 si ? si->label() : QCString(),
4309 hasSubPages || hasSections,
4310 TRUE,
4311 nullptr,
4312 pageTitleAsHtml); // addToNavIndex
4313 if (hasSections || hasSubPages)
4314 {
4315 Doxygen::indexList->incContentsDepth();
4316 }
4317 if (hasSections)
4318 {
4319 pd->addSectionsToIndex();
4320 }
4321 writePages(pd,nullptr);
4322 if (hasSections || hasSubPages)
4323 {
4324 Doxygen::indexList->decContentsDepth();
4325 }
4326 }
4327 }
4328 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4329 {
4330 if (!gd->getSubGroups().empty())
4331 {
4332 startIndexHierarchy(ol,level+1);
4333 for (const auto &subgd : gd->getSubGroups())
4334 {
4335 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4336 }
4337 endIndexHierarchy(ol,level+1);
4338 }
4339 }
4340 }
4341
4342 ol.endIndexListItem();
4343
4344 if (addToIndex)
4345 {
4346 Doxygen::indexList->decContentsDepth();
4347 }
4348 if (ftv)
4349 {
4350 ftv->decContentsDepth();
4351 }
4352 //gd->visited=TRUE;
4353 }
4354}
virtual bool isVisible() const =0
virtual const DirList & getDirs() const =0
virtual const GroupList & getSubGroups() const =0
virtual QCString groupTitle() const =0
virtual const FileList & getFiles() const =0
virtual const MemberLists & getMemberLists() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual bool isASubGroup() const =0
virtual bool isVisibleInHierarchy() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
const T * find(const std::string &key) const
Definition linkedmap.h:47
size_t size() const
Definition linkedmap.h:375
bool empty() const
Definition linkedmap.h:374
A vector of MemberDef object.
Definition memberlist.h:35
bool empty() const noexcept
Definition memberlist.h:60
class that provide information about a section.
Definition section.h:57
QCString label() const
Definition section.h:68
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:178
static void writePages(PageDef *pd, FTVHelp *ftv)
Definition index.cpp:3925
QCString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5341
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5285

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(), OutputList::generateDoc(), 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(), 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 1363 of file index.cpp.

1364{
1365 if (Index::instance().numHierarchyExceptions()==0) return;
1366 ol.pushGeneratorState();
1367 //1.{
1369
1370 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1371 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1372 bool addToIndex = lne==nullptr || lne->visible();
1373
1374 startFile(ol,"exceptionhierarchy",false,QCString(), title, HighlightedItem::ExceptionHierarchy);
1375 startTitle(ol,QCString());
1376 ol.parseText(title);
1377 endTitle(ol,QCString(),QCString());
1378 ol.startContents();
1379 ol.startTextBlock();
1380
1381 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1382 {
1385 ol.startParagraph();
1386 ol.startTextLink("exceptioninherits",QCString());
1387 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1388 ol.endTextLink();
1389 ol.endParagraph();
1392 }
1393 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1394 ol.endTextBlock();
1395
1396 // ---------------
1397 // Static exception hierarchy for Latex/RTF
1398 // ---------------
1399 ol.pushGeneratorState();
1400 //2.{
1402 Doxygen::indexList->disable();
1403
1404 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1405
1406 Doxygen::indexList->enable();
1407 ol.popGeneratorState();
1408 //2.}
1409
1410 // ---------------
1411 // Dynamic exception hierarchical index for HTML
1412 // ---------------
1413 ol.pushGeneratorState();
1414 //2.{
1416
1417 {
1418 if (addToIndex)
1419 {
1420 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1421 }
1422 FTVHelp ftv(false);
1423 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1424 TextStream t;
1425 ftv.generateTreeViewInline(t);
1426 ol.pushGeneratorState();
1428 ol.writeString(t.str());
1429 ol.popGeneratorState();
1430 }
1431 ol.popGeneratorState();
1432 //2.}
1433 // ------
1434
1435 endFile(ol);
1436 ol.popGeneratorState();
1437 //1.}
1438}
void enable(OutputType o)
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1090

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 1151 of file index.cpp.

1152{
1153 if (Index::instance().numHierarchyClasses()==0) return;
1154 ol.pushGeneratorState();
1155 //1.{
1158
1159 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1160 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1161 bool addToIndex = lne==nullptr || lne->visible();
1162
1163 startFile(ol,"hierarchy",false,QCString(), title, HighlightedItem::ClassHierarchy);
1164 startTitle(ol,QCString());
1165 ol.parseText(title);
1166 endTitle(ol,QCString(),QCString());
1167 ol.startContents();
1168 ol.startTextBlock();
1169
1170 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1171 {
1172 ol.pushGeneratorState();
1176 ol.startParagraph();
1177 ol.startTextLink("inherits",QCString());
1178 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1179 ol.endTextLink();
1180 ol.endParagraph();
1181 ol.popGeneratorState();
1182 }
1183 ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription());
1184 ol.endTextBlock();
1185
1186 // ---------------
1187 // Static class hierarchy for Latex/RTF
1188 // ---------------
1189 ol.pushGeneratorState();
1190 //2.{
1192 Doxygen::indexList->disable();
1193
1194 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1195
1196 Doxygen::indexList->enable();
1197 ol.popGeneratorState();
1198 //2.}
1199
1200 // ---------------
1201 // Dynamic class hierarchical index for HTML
1202 // ---------------
1203 ol.pushGeneratorState();
1204 //2.{
1206
1207 {
1208 if (addToIndex)
1209 {
1210 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
1211 }
1212 FTVHelp ftv(false);
1213 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1214 TextStream t;
1215 ftv.generateTreeViewInline(t);
1216 ol.pushGeneratorState();
1218 ol.writeString(t.str());
1219 ol.popGeneratorState();
1220 }
1221 ol.popGeneratorState();
1222 //2.}
1223 // ------
1224
1225 endFile(ol);
1226 ol.popGeneratorState();
1227 //1.}
1228}

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 1258 of file index.cpp.

1259{
1260 if (Index::instance().numHierarchyInterfaces()==0) return;
1261 ol.pushGeneratorState();
1262 //1.{
1264
1265 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1266 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1267 bool addToIndex = lne==nullptr || lne->visible();
1268
1269 startFile(ol,"interfacehierarchy",false,QCString(), title, HighlightedItem::InterfaceHierarchy);
1270 startTitle(ol,QCString());
1271 ol.parseText(title);
1272 endTitle(ol,QCString(),QCString());
1273 ol.startContents();
1274 ol.startTextBlock();
1275
1276 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1277 {
1280 ol.startParagraph();
1281 ol.startTextLink("interfaceinherits",QCString());
1282 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1283 ol.endTextLink();
1284 ol.endParagraph();
1287 }
1288 ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription());
1289 ol.endTextBlock();
1290
1291 // ---------------
1292 // Static interface hierarchy for Latex/RTF
1293 // ---------------
1294 ol.pushGeneratorState();
1295 //2.{
1297 Doxygen::indexList->disable();
1298
1299 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1300
1301 Doxygen::indexList->enable();
1302 ol.popGeneratorState();
1303 //2.}
1304
1305 // ---------------
1306 // Dynamic interface hierarchical index for HTML
1307 // ---------------
1308 ol.pushGeneratorState();
1309 //2.{
1311
1312 {
1313 if (addToIndex)
1314 {
1315 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1316 }
1317 FTVHelp ftv(false);
1318 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1319 TextStream t;
1320 ftv.generateTreeViewInline(t);
1321 ol.pushGeneratorState();
1323 ol.writeString(t.str());
1324 ol.popGeneratorState();
1325 }
1326 ol.popGeneratorState();
1327 //2.}
1328 // ------
1329
1330 endFile(ol);
1331 ol.popGeneratorState();
1332 //1.}
1333}

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 4839 of file index.cpp.

4840{
4841 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4842 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4843 bool disableIndex = Config_getBool(DISABLE_INDEX);
4844 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4845 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4846 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4847 QCString projectName = Config_getString(PROJECT_NAME);
4848 // save old generator state
4849 ol.pushGeneratorState();
4850
4851 QCString projPrefix;
4852 if (!projectName.isEmpty())
4853 {
4854 projPrefix=projectName+" ";
4855 }
4856
4857 //--------------------------------------------------------------------
4858 // write HTML index
4859 //--------------------------------------------------------------------
4861
4862 QCString defFileName =
4863 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4864 int defLine =
4865 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4866
4867 QCString title, titleAsHtml;
4868 if (!mainPageHasTitle())
4869 {
4870 title = theTranslator->trMainPage();
4871 }
4872 else if (Doxygen::mainPage)
4873 {
4874 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4875 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4876 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4877 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4878 }
4879
4880 QCString indexName="index";
4881 ol.startFile(indexName,false,QCString(),title);
4882
4884 {
4885 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4886 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4887 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4888 if (hasTitle) // to avoid duplicate entries in the treeview
4889 {
4890 Doxygen::indexList->addContentsItem(hasSubs,
4891 title,
4892 QCString(),
4893 indexName,
4894 QCString(),
4895 hasSubs,
4896 TRUE,
4897 nullptr,
4898 titleAsHtml);
4899 }
4900 if (hasSubs)
4901 {
4902 writePages(Doxygen::mainPage.get(),nullptr);
4903 }
4904 }
4905
4906 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4907 ol.startQuickIndices();
4908 if (!disableIndex && !quickLinksAfterSplitbar)
4909 {
4911 }
4912 ol.endQuickIndices();
4913 ol.writeSplitBar(indexName,QCString());
4914 if (quickLinksAfterSplitbar)
4915 {
4917 }
4918 ol.writeSearchInfo();
4919 bool headerWritten=FALSE;
4921 {
4922 if (!Doxygen::mainPage->title().isEmpty())
4923 {
4924 if (Doxygen::mainPage->title().lower() != "notitle")
4925 ol.startPageDoc(Doxygen::mainPage->title());
4926 else
4927 ol.startPageDoc("");
4928 }
4929 else
4930 ol.startPageDoc(projectName);
4931 }
4932 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4933 {
4934 if (Doxygen::mainPage->title().lower()!="notitle")
4935 {
4936 ol.startHeaderSection();
4938 ol.generateDoc(Doxygen::mainPage->docFile(),
4939 Doxygen::mainPage->getStartBodyLine(),
4940 Doxygen::mainPage.get(),
4941 nullptr,
4942 Doxygen::mainPage->title(),
4943 DocOptions()
4944 .setSingleLine(true));
4945 headerWritten = TRUE;
4946 }
4947 }
4948 else
4949 {
4950 if (!projectName.isEmpty())
4951 {
4952 ol.startHeaderSection();
4954 ol.parseText(theTranslator->trDocumentation(projectName));
4955 headerWritten = TRUE;
4956 }
4957 }
4958 if (headerWritten)
4959 {
4961 ol.endHeaderSection();
4962 }
4963
4964 ol.startContents();
4965 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4966 {
4968 }
4969
4971 {
4972 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4973 {
4974 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4975 }
4976
4977 ol.startTextBlock();
4978 ol.generateDoc(defFileName,
4979 defLine,
4980 Doxygen::mainPage.get(),
4981 nullptr,
4982 Doxygen::mainPage->documentation(),
4983 DocOptions()
4984 .setIndexWords(true));
4985 ol.endTextBlock();
4986 ol.endPageDoc();
4987 }
4988
4991 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4992 Doxygen::indexList->addIndexFile(fn);
4993
4994 if (Doxygen::mainPage &&
4995 generateTreeView &&
4996 pageOutlinePanel &&
4997 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4998 Doxygen::mainPage->hasSections()
4999 )
5000 {
5001 ol.writeString("</div><!-- doc-content -->\n");
5002 ol.endContents();
5003 Doxygen::mainPage->writePageNavigation(ol);
5004 ol.writeString("</div><!-- container -->\n");
5005 endFile(ol,true,true);
5006 }
5007 else
5008 {
5009 endFile(ol);
5010 }
5011
5013
5014 //--------------------------------------------------------------------
5015 // write LaTeX/RTF index
5016 //--------------------------------------------------------------------
5020
5022 {
5023 msg("Generating main page...\n");
5024 Doxygen::mainPage->writeDocumentation(ol);
5025 }
5026
5027 ol.startFile("refman",false,QCString(),QCString());
5031
5032 if (projPrefix.isEmpty())
5033 {
5034 ol.parseText(theTranslator->trReferenceManual());
5035 }
5036 else
5037 {
5038 ol.parseText(projPrefix);
5039 }
5040
5041 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5042 {
5043 ol.startProjectNumber();
5044 ol.generateDoc(defFileName,
5045 defLine,
5046 Doxygen::mainPage.get(),
5047 nullptr,
5048 Config_getString(PROJECT_NUMBER),
5049 DocOptions());
5050 ol.endProjectNumber();
5051 }
5054 ol.parseText(theTranslator->trGeneratedBy());
5058
5059 ol.lastIndexPage();
5061 {
5064 }
5065 const auto &index = Index::instance();
5066 if (index.numDocumentedPages()>0)
5067 {
5070 }
5071
5073 if (!Config_getBool(LATEX_HIDE_INDICES))
5074 {
5075 //if (indexedPages>0)
5076 //{
5077 // ol.startIndexSection(isPageIndex);
5078 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5079 // ol.endIndexSection(isPageIndex);
5080 //}
5081 if (index.numDocumentedModules()>0)
5082 {
5084 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5086 }
5087 if (index.numDocumentedGroups()>0)
5088 {
5090 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5092 }
5093 if (index.numDocumentedDirs()>0)
5094 {
5096 ol.parseText(theTranslator->trDirIndex());
5098 }
5099 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5100 {
5101 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5102 if (lne)
5103 {
5105 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5107 }
5108 }
5109 if (index.numDocumentedConcepts()>0)
5110 {
5112 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5114 }
5115 if (index.numHierarchyInterfaces()>0)
5116 {
5118 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5120 }
5121 if (index.numHierarchyClasses()>0)
5122 {
5123 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5124 if (lne)
5125 {
5127 ol.parseText(/*projPrefix+*/
5128 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5129 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5130 theTranslator->trHierarchicalIndex()
5131 ));
5133 }
5134 }
5135 if (index.numHierarchyExceptions()>0)
5136 {
5138 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5140 }
5141 if (index.numAnnotatedInterfacesPrinted()>0)
5142 {
5144 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5146 }
5147 if (index.numAnnotatedClassesPrinted()>0)
5148 {
5150 ol.parseText(/*projPrefix+*/
5151 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5152 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5153 theTranslator->trCompoundIndex()
5154 ));
5156 }
5157 if (index.numAnnotatedStructsPrinted()>0)
5158 {
5160 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5162 }
5163 if (index.numAnnotatedExceptionsPrinted()>0)
5164 {
5166 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5168 }
5169 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5170 {
5172 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5174 }
5175 }
5177
5178 if (index.numDocumentedModules()>0)
5179 {
5181 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5183 }
5184 if (index.numDocumentedGroups()>0)
5185 {
5187 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5189 }
5190 if (index.numDocumentedDirs()>0)
5191 {
5193 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5195 }
5196 if (index.numDocumentedNamespaces()>0)
5197 {
5199 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5201 }
5202 if (index.numDocumentedConcepts()>0)
5203 {
5205 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5207 }
5208 if (index.numAnnotatedInterfacesPrinted()>0)
5209 {
5211 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5213 }
5214 if (index.numAnnotatedClassesPrinted()>0)
5215 {
5217 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5219 }
5220 if (index.numAnnotatedStructsPrinted()>0)
5221 {
5223 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5225 }
5226 if (index.numAnnotatedExceptionsPrinted()>0)
5227 {
5229 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5231 }
5232 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5233 {
5235 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5237 }
5238 if (!Doxygen::exampleLinkedMap->empty())
5239 {
5241 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5243 }
5245 endFile(ol);
5246
5247 ol.popGeneratorState();
5248}
static const QCString crawlFileName
Definition sitemap.h:75
void endPageDoc()
Definition outputlist.h:624
void endIndexSection(IndexSection is)
Definition outputlist.h:387
void startProjectNumber()
Definition outputlist.h:391
void lastIndexPage()
Definition outputlist.h:674
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:622
void endProjectNumber()
Definition outputlist.h:393
void startIndexSection(IndexSection is)
Definition outputlist.h:385
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ isFileDocumentation
Definition index.h:51
@ isPageDocumentation
Definition index.h:53
@ isDirDocumentation
Definition index.h:47
@ isModuleDocumentation
Definition index.h:45
@ isClassHierarchyIndex
Definition index.h:41
@ isModuleIndex
Definition index.h:36
@ isTopicIndex
Definition index.h:37
@ isConceptIndex
Definition index.h:40
@ isExampleDocumentation
Definition index.h:52
@ isClassDocumentation
Definition index.h:49
@ isCompoundIndex
Definition index.h:42
@ isEndIndex
Definition index.h:55
@ isConceptDocumentation
Definition index.h:50
@ isDirIndex
Definition index.h:38
@ isNamespaceIndex
Definition index.h:39
@ isNamespaceDocumentation
Definition index.h:48
@ isTitlePageStart
Definition index.h:33
@ isTopicDocumentation
Definition index.h:46
#define msg(fmt,...)
Definition message.h:94
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4843

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, isDirDocumentation, isDirIndex, 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)

Definition at line 5774 of file index.cpp.

5775{
5776 writeMenuData();
5778 if (lne)
5779 {
5781 }
5782}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5252
static void writeMenuData()
Definition index.cpp:5758

References LayoutNavEntry::children(), LayoutDocManager::instance(), LayoutDocManager::rootNavEntry(), writeIndexHierarchyEntries(), and writeMenuData().

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5252 of file index.cpp.

5253{
5254 auto isRef = [](const QCString &s)
5255 {
5256 return s.startsWith("@ref") || s.startsWith("\\ref");
5257 };
5258 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5259 const auto &index = Index::instance();
5260 for (const auto &lne : entries)
5261 {
5262 LayoutNavEntry::Kind kind = lne->kind();
5263 size_t idx = static_cast<size_t>(kind);
5264 if (idx>=indexWritten.size())
5265 {
5266 size_t oldSize = indexWritten.size();
5267 size_t newSize = idx+1;
5268 indexWritten.resize(newSize);
5269 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5270 }
5271 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5272 bool addToIndex=lne->visible();
5273 bool needsClosing=FALSE;
5274 if (!indexWritten.at(idx))
5275 {
5276 switch(kind)
5277 {
5278 case LayoutNavEntry::MainPage:
5279 msg("Generating index page...\n");
5280 writeIndex(ol);
5281 break;
5282 case LayoutNavEntry::Pages:
5283 msg("Generating page index...\n");
5284 writePageIndex(ol);
5285 break;
5286 case LayoutNavEntry::Topics:
5287 msg("Generating topic index...\n");
5288 writeTopicIndex(ol);
5289 break;
5290 case LayoutNavEntry::Modules:
5291 {
5292 if (index.numDocumentedModules()>0 && addToIndex)
5293 {
5294 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5295 Doxygen::indexList->incContentsDepth();
5296 needsClosing=TRUE;
5297 }
5298 }
5299 break;
5300 case LayoutNavEntry::ModuleList:
5301 msg("Generating module index...\n");
5302 writeModuleIndex(ol);
5303 break;
5304 case LayoutNavEntry::ModuleMembers:
5305 msg("Generating module member index...\n");
5307 break;
5308 case LayoutNavEntry::Namespaces:
5309 {
5310 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5311 if (showNamespaces)
5312 {
5313 if (index.numDocumentedNamespaces()>0 && addToIndex)
5314 {
5315 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5316 Doxygen::indexList->incContentsDepth();
5317 needsClosing=TRUE;
5318 }
5319 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5320 {
5321 msg("Generating namespace index...\n");
5323 }
5324 }
5325 }
5326 break;
5327 case LayoutNavEntry::NamespaceList:
5328 {
5329 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5330 if (showNamespaces)
5331 {
5332 msg("Generating namespace index...\n");
5334 }
5335 }
5336 break;
5337 case LayoutNavEntry::NamespaceMembers:
5338 msg("Generating namespace member index...\n");
5340 break;
5341 case LayoutNavEntry::Classes:
5342 if (index.numAnnotatedClasses()>0 && addToIndex)
5343 {
5344 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5345 Doxygen::indexList->incContentsDepth();
5346 needsClosing=TRUE;
5347 }
5348 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5349 {
5350 msg("Generating annotated compound index...\n");
5352 }
5353 break;
5354 case LayoutNavEntry::Concepts:
5355 msg("Generating concept index...\n");
5357 break;
5358 case LayoutNavEntry::ClassList:
5359 msg("Generating annotated compound index...\n");
5361 break;
5362 case LayoutNavEntry::ClassIndex:
5363 msg("Generating alphabetical compound index...\n");
5365 break;
5366 case LayoutNavEntry::ClassHierarchy:
5367 msg("Generating hierarchical class index...\n");
5369 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5370 {
5371 msg("Generating graphical class hierarchy...\n");
5373 }
5374 break;
5375 case LayoutNavEntry::ClassMembers:
5376 if (!sliceOpt)
5377 {
5378 msg("Generating member index...\n");
5380 }
5381 break;
5382 case LayoutNavEntry::Interfaces:
5383 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5384 {
5385 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5386 Doxygen::indexList->incContentsDepth();
5387 needsClosing=TRUE;
5388 }
5389 break;
5390 case LayoutNavEntry::InterfaceList:
5391 if (sliceOpt)
5392 {
5393 msg("Generating annotated interface index...\n");
5395 }
5396 break;
5397 case LayoutNavEntry::InterfaceIndex:
5398 if (sliceOpt)
5399 {
5400 msg("Generating alphabetical interface index...\n");
5402 }
5403 break;
5404 case LayoutNavEntry::InterfaceHierarchy:
5405 if (sliceOpt)
5406 {
5407 msg("Generating hierarchical interface index...\n");
5409 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5410 {
5411 msg("Generating graphical interface hierarchy...\n");
5413 }
5414 }
5415 break;
5416 case LayoutNavEntry::Structs:
5417 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5418 {
5419 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5420 Doxygen::indexList->incContentsDepth();
5421 needsClosing=TRUE;
5422 }
5423 break;
5424 case LayoutNavEntry::StructList:
5425 if (sliceOpt)
5426 {
5427 msg("Generating annotated struct index...\n");
5429 }
5430 break;
5431 case LayoutNavEntry::StructIndex:
5432 if (sliceOpt)
5433 {
5434 msg("Generating alphabetical struct index...\n");
5436 }
5437 break;
5438 case LayoutNavEntry::Exceptions:
5439 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5440 {
5441 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5442 Doxygen::indexList->incContentsDepth();
5443 needsClosing=TRUE;
5444 }
5445 break;
5446 case LayoutNavEntry::ExceptionList:
5447 if (sliceOpt)
5448 {
5449 msg("Generating annotated exception index...\n");
5451 }
5452 break;
5453 case LayoutNavEntry::ExceptionIndex:
5454 if (sliceOpt)
5455 {
5456 msg("Generating alphabetical exception index...\n");
5458 }
5459 break;
5460 case LayoutNavEntry::ExceptionHierarchy:
5461 if (sliceOpt)
5462 {
5463 msg("Generating hierarchical exception index...\n");
5465 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5466 {
5467 msg("Generating graphical exception hierarchy...\n");
5469 }
5470 }
5471 break;
5472 case LayoutNavEntry::Files:
5473 {
5474 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5475 {
5476 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5477 Doxygen::indexList->incContentsDepth();
5478 needsClosing=TRUE;
5479 }
5480 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5481 {
5482 msg("Generating file index...\n");
5483 writeFileIndex(ol);
5484 }
5485 }
5486 break;
5487 case LayoutNavEntry::FileList:
5488 msg("Generating file index...\n");
5489 writeFileIndex(ol);
5490 break;
5491 case LayoutNavEntry::FileGlobals:
5492 msg("Generating file member index...\n");
5494 break;
5495 case LayoutNavEntry::Examples:
5496 msg("Generating example index...\n");
5498 break;
5499 case LayoutNavEntry::User:
5500 if (addToIndex)
5501 {
5502 // prepend a ! or ^ marker to the URL to avoid tampering with it
5503 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5504 bool isRelative=url.at(0)=='!';
5505 if (!url.isEmpty() && !isRelative) // absolute URL
5506 {
5507 url.prepend("^"); // prepend ^ to absolute URL
5508 }
5509 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5510 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5511 }
5512 break;
5513 case LayoutNavEntry::UserGroup:
5514 if (addToIndex)
5515 {
5516 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5517 if (!url.isEmpty())
5518 {
5519 if (url=="!") // result of a "[none]" url
5520 {
5521 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5522 }
5523 else
5524 {
5525 bool isRelative=url.at(0)=='!';
5526 if (!isRelative) // absolute URL
5527 {
5528 url.prepend("^"); // prepend ^ to absolute URL
5529 }
5530 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5531 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5532 }
5533 }
5534 else
5535 {
5536 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5537 }
5538 Doxygen::indexList->incContentsDepth();
5539 needsClosing=TRUE;
5540 }
5541 writeUserGroupStubPage(ol,lne.get());
5542 break;
5543 case LayoutNavEntry::None:
5544 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5545 break;
5546 }
5547 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5548 {
5549 indexWritten.at(idx)=TRUE;
5550 }
5551 }
5552 writeIndexHierarchyEntries(ol,lne->children());
5553 if (needsClosing)
5554 {
5555 switch(kind)
5556 {
5557 case LayoutNavEntry::Modules:
5558 case LayoutNavEntry::Namespaces:
5559 case LayoutNavEntry::Classes:
5560 case LayoutNavEntry::Files:
5561 case LayoutNavEntry::UserGroup:
5562 Doxygen::indexList->decContentsDepth();
5563 break;
5564 default:
5565 break;
5566 }
5567 }
5568 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5569 }
5570
5571 // always write the directory index as it is used for non-HTML output only
5572 writeDirIndex(ol);
5573}
QCString & prepend(const char *s)
Definition qcstring.h:422
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1232
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2677
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2520
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1564
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3258
static std::vector< bool > indexWritten
Definition index.cpp:5250
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2649
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1593
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1337
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2433
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2663
static void writePageIndex(OutputList &ol)
Definition index.cpp:3986
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2046
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2691
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1258
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4802
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4380
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3806
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1442
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3831
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2462
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2491
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4701
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4527
static void writeIndex(OutputList &ol)
Definition index.cpp:4839
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1363
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3626
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1151
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3442
Kind
Definition layout.h:193
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5857

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(), writeDirIndex(), 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 2758 of file index.cpp.

2761{
2762 int index = static_cast<int>(type);
2763 const int numIndices = 4;
2764 ASSERT(index<numIndices);
2765
2766 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2767 QCString &prevNamespaceName);
2768
2769 // each index tab has its own write function
2770 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2771 {
2776 };
2777 QCString prevName;
2778 QCString prevDefName;
2779 bool first=TRUE;
2780 bool firstSection=TRUE;
2781 bool firstItem=TRUE;
2782 const Index::MemberIndexList *mil = nullptr;
2783 std::string letter;
2784 for (const auto &kv : memberIndexMap)
2785 {
2786 if (!page.empty()) // specific page mode
2787 {
2788 auto it = memberIndexMap.find(page);
2789 if (it != memberIndexMap.end())
2790 {
2791 mil = &it->second;
2792 letter = page;
2793 }
2794 }
2795 else // do all pages
2796 {
2797 mil = &kv.second;
2798 letter = kv.first;
2799 }
2800 if (mil==nullptr || mil->empty()) continue;
2801 for (const auto &md : *mil)
2802 {
2803 const char *sep = nullptr;
2804 bool isFunc=!md->isObjCMethod() &&
2805 (md->isFunction() || md->isSlot() || md->isSignal());
2806 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2807 int startIndex = getPrefixIndex(name);
2808 if (name.data()+startIndex!=prevName) // new entry
2809 {
2810 if ((prevName.isEmpty() ||
2811 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2812 useSections) // new section
2813 {
2814 if (!firstItem) ol.endItemListItem();
2815 if (!firstSection) ol.endItemList();
2816 QCString cs = letterToLabel(letter);
2817 QCString anchor = "index_"+convertToId(cs);
2818 QCString title = "- "+letter+" -";
2819 ol.startSection(anchor,title,SectionType::Subsection);
2820 ol.docify(title);
2821 ol.endSection(anchor,SectionType::Subsection);
2822 ol.startItemList();
2823 firstSection=FALSE;
2824 firstItem=TRUE;
2825 }
2826 else if (!useSections && first)
2827 {
2828 ol.startItemList();
2829 first=FALSE;
2830 }
2831
2832 // member name
2833 if (!firstItem) ol.endItemListItem();
2834 ol.startItemListItem();
2835 firstItem=FALSE;
2836 ol.docify(name);
2837 if (isFunc) ol.docify("()");
2838 //ol.writeString("\n");
2839
2840 // link to class
2841 prevDefName="";
2842 sep = "&#160;:&#160;";
2843 prevName = name.data()+startIndex;
2844 }
2845 else // same entry
2846 {
2847 sep = ", ";
2848 // link to class for other members with the same name
2849 }
2850 if (index<numIndices)
2851 {
2852 // write the link for the specific list type
2853 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2854 }
2855 }
2856 if (!page.empty())
2857 {
2858 break;
2859 }
2860 }
2861 if (!firstItem) ol.endItemListItem();
2862 ol.endItemList();
2863}
std::vector< const MemberDef * > MemberIndexList
Definition index.h:167
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
static constexpr int Subsection
Definition section.h:34
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition index.cpp:2717
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2730
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2704
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2743
#define ASSERT(x)
Definition qcstring.h:39

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.

469{
470 bool isAnonymous = md->isAnonymous();
471 const MemberVector &enumList = md->enumFieldList();
472 bool isDir = md->isEnumerate() && std::any_of(enumList.begin(),enumList.end(),[](const auto &emd) { return emd->hasDocumentation(); });
473 auto defType = def->definitionType();
474 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
475 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
476 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
477 md->qualifiedName() : md->name();
478 if (md->getOuterScope()==def ||
479 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
481 {
482 Doxygen::indexList->addContentsItem(isDir,
483 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
484 }
485 else // inherited member
486 {
487 Doxygen::indexList->addContentsItem(isDir,
488 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
489 }
490 if (isDir)
491 {
492 if (!isAnonymous)
493 {
494 Doxygen::indexList->incContentsDepth();
495 }
496 for (const auto &emd : enumList)
497 {
498 if (emd->hasDocumentation())
499 {
500 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
501 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
502 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
503 emd->qualifiedName() : emd->name();
504 if (emd->getOuterScope()==def ||
505 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
506 emd->getOuterScope()==Doxygen::globalScope)
507 {
508 Doxygen::indexList->addContentsItem(FALSE,
509 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
510 }
511 else // inherited member
512 {
513 Doxygen::indexList->addContentsItem(FALSE,
514 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
515 }
516 }
517 }
518 if (!isAnonymous)
519 {
520 Doxygen::indexList->decContentsDepth();
521 }
522 }
523}
virtual QCString qualifiedName() const =0
virtual GroupDef * getGroupDef()=0
virtual const MemberVector & enumFieldList() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0
iterator end() noexcept
Definition memberlist.h:56
iterator begin() noexcept
Definition memberlist.h:54

References Definition::anchor(), MemberVector::begin(), Definition::definitionType(), MemberVector::end(), 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 5758 of file index.cpp.

5759{
5760 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5761 QCString outputDir = Config_getBool(HTML_OUTPUT);
5763 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5764 if (t.is_open())
5765 {
5767 t << "var menudata={";
5768 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5769 if (hasChildren) t << "]";
5770 t << "}\n";
5771 }
5772}
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649

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 4527 of file index.cpp.

4528{
4529 if (ModuleManager::instance().numDocumentedModules()==0) return;
4530 ol.pushGeneratorState();
4531 // 1.{
4532
4535 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4536 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4537 QCString title = lne ? lne->title() : theTranslator->trModules();
4538 bool addToIndex = lne==nullptr || lne->visible();
4539
4540 startFile(ol,"modules",false,QCString(),title,HighlightedItem::Modules);
4541 startTitle(ol,QCString());
4542 ol.parseText(title);
4543 endTitle(ol,QCString(),QCString());
4544 ol.startContents();
4545 ol.startTextBlock();
4546 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4547 ol.endTextBlock();
4548
4549 // ---------------
4550 // Normal group index for Latex/RTF
4551 // ---------------
4552 // 2.{
4553 ol.pushGeneratorState();
4555 Doxygen::indexList->disable();
4556
4557 writeModuleList(ol,nullptr,FALSE);
4558
4559 Doxygen::indexList->enable();
4560 ol.popGeneratorState();
4561 // 2.}
4562
4563 // ---------------
4564 // interactive group index for HTML
4565 // ---------------
4566 // 2.{
4567 ol.pushGeneratorState();
4569
4570 {
4571 if (addToIndex)
4572 {
4573 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4574 Doxygen::indexList->incContentsDepth();
4575 }
4576 FTVHelp ftv(false);
4577 writeModuleList(ol,&ftv,addToIndex);
4578 TextStream t;
4579 ftv.generateTreeViewInline(t);
4580 ol.writeString(t.str());
4581 if (addToIndex)
4582 {
4583 Doxygen::indexList->decContentsDepth();
4584 }
4585 }
4586 ol.popGeneratorState();
4587 // 2.}
4588 endFile(ol);
4589 ol.popGeneratorState();
4590 // 1.}
4591}
static ModuleManager & instance()
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4503

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 2743 of file index.cpp.

2745{
2746 const ModuleDef *mod=md->getModuleDef();
2747 if (mod && prevModuleName!=mod->displayName())
2748 {
2749 ol.writeString(separator);
2750 // link to the member declaration in the module page
2751 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2752 mod->displayName());
2753 prevModuleName = mod->displayName();
2754 }
2755}
virtual const ModuleDef * getModuleDef() const =0

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 4503 of file index.cpp.

4504{
4505 if (ftv)
4506 {
4507 ol.pushGeneratorState();
4509 }
4510 startIndexHierarchy(ol,0);
4511 for (const auto &mod : ModuleManager::instance().modules())
4512 {
4513 if (mod->isPrimaryInterface())
4514 {
4515 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4516 }
4517 }
4518 endIndexHierarchy(ol,0);
4519 if (ftv)
4520 {
4521 ol.popGeneratorState();
4522 }
4523}
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4449

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 3806 of file index.cpp.

3807{
3808 const auto &index = Index::instance();
3809 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3810 bool addToIndex = lne==nullptr || lne->visible();
3811 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3812 {
3813 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3814 Doxygen::indexList->incContentsDepth();
3815 }
3816 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3823 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3824 {
3825 Doxygen::indexList->decContentsDepth();
3826 }
3827}
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3678

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 3678 of file index.cpp.

3680{
3681 const auto &index = Index::instance();
3682 if (index.numDocumentedModuleMembers(hl)==0) return;
3683
3684 bool disableIndex = Config_getBool(DISABLE_INDEX);
3685 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3686 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3687 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3688 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3689
3690 bool multiPageIndex=FALSE;
3691 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3692 {
3693 multiPageIndex=TRUE;
3694 }
3695
3696 ol.pushGeneratorState();
3698
3700 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3701 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3702 bool addToIndex = lne==nullptr || lne->visible();
3703
3704 if (addToIndex)
3705 {
3706 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3707 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3708 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3709 }
3710
3711 bool first=TRUE;
3712 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3713 {
3714 QCString fileName = getMmhlInfo(hl)->fname;
3715 if (multiPageIndex)
3716 {
3717 QCString cs(letter);
3718 if (!first)
3719 {
3720 fileName+="_"+letterToLabel(cs);
3721 }
3722 if (addToIndex)
3723 {
3724 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3725 }
3726 }
3727
3728 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3729
3730 auto writeQuickLinks = [&,cap_letter=letter]()
3731 {
3733 if (!dynamicMenus)
3734 {
3736
3737 // index item for all namespace member lists
3740 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3742
3743 // index items per category member lists
3744 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3745 {
3746 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3747 {
3749 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3750 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3752 }
3753 }
3754
3756
3757 if (quickIndex)
3758 {
3759 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3760 getMmhlInfo(hl)->fname,multiPageIndex);
3761 }
3762
3763 ol.writeString("</div><!-- main-nav -->\n");
3764 }
3765 };
3766
3767 ol.startFile(fileName+extension,false,QCString(),title);
3768 ol.startQuickIndices();
3769 if (!disableIndex && !quickLinksAfterSplitbar)
3770 {
3771 writeQuickLinks();
3772 }
3773 ol.endQuickIndices();
3774 ol.writeSplitBar(fileName,QCString());
3775 if (quickLinksAfterSplitbar)
3776 {
3777 writeQuickLinks();
3778 if (!dynamicMenus)
3779 {
3780 ol.writeString("<div id=\"container\">\n");
3781 ol.writeString("<div id=\"doc-content\">\n");
3782 }
3783 }
3784 ol.writeSearchInfo();
3785
3786 ol.startContents();
3787
3788 ol.startTextBlock();
3789 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3790 ol.endTextBlock();
3791
3792 writeMemberList(ol,quickIndex,
3793 multiPageIndex ? letter : std::string(),
3794 index.isModuleIndexLetterUsed(hl),
3796 endFile(ol);
3797 first=FALSE;
3798 }
3799 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3800 ol.popGeneratorState();
3801}
const char * fname
Definition index.cpp:3658

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 1838 of file index.cpp.

1839{
1840 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1841 {
1842 if (lde->kind()==LayoutDocEntry::MemberDecl)
1843 {
1844 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1845 if (lmd)
1846 {
1847 MemberList *ml = mod->getMemberList(lmd->type);
1848 if (ml)
1849 {
1850 for (const auto &md : *ml)
1851 {
1852 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1853 if (md->visibleInIndex())
1854 {
1855 writeMemberToIndex(mod,md,addToIndex);
1856 }
1857 }
1858 }
1859 }
1860 }
1861 }
1862}
virtual MemberList * getMemberList(MemberListType lt) const =0
Represents of a member declaration list with configurable title and subtitle.
Definition layout.h:112
MemberListType type
Definition layout.h:118

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 4449 of file index.cpp.

4451{
4452 int visibleMembers = mod->countVisibleMembers();
4453 bool isDir=visibleMembers>0;
4454 if (addToIndex)
4455 {
4456 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4457 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4458 }
4459 if (ftv)
4460 {
4461 ftv->addContentsItem(false,mod->name(),
4462 mod->getReference(),mod->getOutputFileBase(),QCString(),
4463 false,false,mod);
4464 }
4465 ol.startIndexListItem();
4467 ol.generateDoc(mod->getDefFileName(),
4468 mod->getDefLine(),
4469 mod,
4470 nullptr,
4471 mod->qualifiedName(),
4472 DocOptions()
4473 .setSingleLine(true)
4474 .setAutolinkSupport(false));
4476 if (mod->isReference())
4477 {
4478 ol.startTypewriter();
4479 ol.docify(" [external]");
4480 ol.endTypewriter();
4481 }
4482 if (addToIndex && isDir)
4483 {
4484 Doxygen::indexList->incContentsDepth();
4485 }
4486 if (isDir)
4487 {
4488 //ftv->incContentsDepth();
4489 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4490 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4491 writeModuleMembers(mod,addToIndex);
4492 //ftv->decContentsDepth();
4493 }
4494 if (addToIndex && isDir)
4495 {
4496 Doxygen::indexList->decContentsDepth();
4497 }
4498 ol.endIndexListItem();
4499}
virtual int countVisibleMembers() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1838

References FTVHelp::addContentsItem(), ClassDef::Class, ModuleDef::countVisibleMembers(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), FALSE, OutputList::generateDoc(), ModuleDef::getClasses(), ModuleDef::getConcepts(), Definition::getDefFileName(), Definition::getDefLine(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::indexList, Definition::isReference(), Definition::name(), 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 2046 of file index.cpp.

2047{
2048 if (Index::instance().numDocumentedNamespaces()==0) return;
2049 ol.pushGeneratorState();
2052 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2053 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2054 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2055 bool addToIndex = lne==nullptr || lne->visible();
2056 startFile(ol,"namespaces",false,QCString(),title,HighlightedItem::Namespaces);
2057 startTitle(ol,QCString());
2058 ol.parseText(title);
2059 endTitle(ol,QCString(),QCString());
2060 ol.startContents();
2061 ol.startTextBlock();
2062 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2063 ol.endTextBlock();
2064
2065 bool first=TRUE;
2066
2067 // ---------------
2068 // Linear namespace index for Latex/RTF
2069 // ---------------
2070 ol.pushGeneratorState();
2072
2073 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2074 {
2075 if (nd->isLinkableInProject())
2076 {
2077 if (first)
2078 {
2079 ol.startIndexList();
2080 first=FALSE;
2081 }
2082 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2083 ol.startIndexKey();
2084 if (nd->getLanguage()==SrcLangExt::VHDL)
2085 {
2086 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2087 }
2088 else
2089 {
2090 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2091 }
2092 ol.endIndexKey();
2093
2094 bool hasBrief = !nd->briefDescription().isEmpty();
2095 ol.startIndexValue(hasBrief);
2096 if (hasBrief)
2097 {
2098 ol.generateDoc(nd->briefFile(),
2099 nd->briefLine(),
2100 nd.get(),
2101 nullptr,
2102 nd->briefDescription(true),
2103 DocOptions()
2104 .setSingleLine(true)
2105 .setLinkFromIndex(true));
2106 }
2107 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2108
2109 }
2110 }
2111 if (!first) ol.endIndexList();
2112
2113 ol.popGeneratorState();
2114
2115 // ---------------
2116 // Hierarchical namespace index for HTML
2117 // ---------------
2118 ol.pushGeneratorState();
2120
2121 {
2122 if (addToIndex)
2123 {
2124 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2125 Doxygen::indexList->incContentsDepth();
2126 }
2127 FTVHelp ftv(false);
2129 TextStream t;
2130 ftv.generateTreeViewInline(t);
2131 ol.writeString(t.str());
2132 if (addToIndex)
2133 {
2134 Doxygen::indexList->decContentsDepth();
2135 }
2136 }
2137
2138 ol.popGeneratorState();
2139 // ------
2140
2141 endFile(ol);
2142 ol.popGeneratorState();
2143}
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1929

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 2730 of file index.cpp.

2732{
2733 const NamespaceDef *nd=md->getNamespaceDef();
2734 if (nd && prevNamespaceName!=nd->displayName())
2735 {
2736 ol.writeString(separator);
2738 nd->displayName());
2739 prevNamespaceName = nd->displayName();
2740 }
2741}

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 3626 of file index.cpp.

3627{
3628 const auto &index = Index::instance();
3629 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3630 bool addToIndex = lne==nullptr || lne->visible();
3631 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3632 {
3633 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3634 Doxygen::indexList->incContentsDepth();
3635 }
3636 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3645 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3646 {
3647 Doxygen::indexList->decContentsDepth();
3648 }
3649
3650}
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3501

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 3501 of file index.cpp.

3503{
3504 const auto &index = Index::instance();
3505 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3506
3507 bool disableIndex = Config_getBool(DISABLE_INDEX);
3508 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3509 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3510 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3511 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3512
3513 bool multiPageIndex=FALSE;
3514 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3515 {
3516 multiPageIndex=TRUE;
3517 }
3518
3519 ol.pushGeneratorState();
3521
3523 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3524 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3525 bool addToIndex = lne==nullptr || lne->visible();
3526
3527 if (addToIndex)
3528 {
3529 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3530 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3531 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3532 }
3533
3534 bool first=TRUE;
3535 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3536 {
3537 QCString fileName = getNmhlInfo(hl)->fname;
3538 if (multiPageIndex)
3539 {
3540 QCString cs(letter);
3541 if (!first)
3542 {
3543 fileName+="_"+letterToLabel(cs);
3544 }
3545 if (addToIndex)
3546 {
3547 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3548 }
3549 }
3550
3551 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3552
3553 auto writeQuickLinks = [&,cap_letter=letter]()
3554 {
3556 if (!dynamicMenus)
3557 {
3559
3560 // index item for all namespace member lists
3563 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3565
3566 // index items per category member lists
3567 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3568 {
3569 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3570 {
3572 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3573 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3575 }
3576 }
3577
3579
3580 if (quickIndex)
3581 {
3582 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3583 getNmhlInfo(hl)->fname,multiPageIndex);
3584 }
3585
3586 ol.writeString("</div><!-- main-nav -->\n");
3587 }
3588 };
3589
3590 ol.startFile(fileName+extension,false,QCString(),title);
3591 ol.startQuickIndices();
3592 if (!disableIndex && !quickLinksAfterSplitbar)
3593 {
3594 writeQuickLinks();
3595 }
3596 ol.endQuickIndices();
3597 ol.writeSplitBar(fileName,QCString());
3598 if (quickLinksAfterSplitbar)
3599 {
3600 writeQuickLinks();
3601 if (!dynamicMenus)
3602 {
3603 ol.writeString("<div id=\"container\">\n");
3604 ol.writeString("<div id=\"doc-content\">\n");
3605 }
3606 }
3607 ol.writeSearchInfo();
3608
3609 ol.startContents();
3610
3611 ol.startTextBlock();
3612 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3613 ol.endTextBlock();
3614
3615 writeMemberList(ol,quickIndex,
3616 multiPageIndex ? letter : std::string(),
3617 index.isNamespaceIndexLetterUsed(hl),
3619 endFile(ol);
3620 first=FALSE;
3621 }
3622 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3623 ol.popGeneratorState();
3624}
@ NamespaceMembers
Definition index.h:78
const char * fname
Definition index.cpp:3473

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 1812 of file index.cpp.

1813{
1814 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1815 {
1816 if (lde->kind()==LayoutDocEntry::MemberDef)
1817 {
1818 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1819 if (lmd)
1820 {
1821 MemberList *ml = nd->getMemberList(lmd->type);
1822 if (ml)
1823 {
1824 for (const auto &md : *ml)
1825 {
1826 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1827 if (md->visibleInIndex())
1828 {
1829 writeMemberToIndex(nd,md,addToIndex);
1830 }
1831 }
1832 }
1833 }
1834 }
1835 }
1836}
virtual MemberList * getMemberList(MemberListType lt) const =0

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

Referenced by writeNamespaceTreeElement().

◆ writeNamespaceTree() [1/2]

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

Definition at line 1941 of file index.cpp.

1943{
1944 for (const auto &nd : nsLinkedMap)
1945 {
1946 if (nd->isVisibleInHierarchy())
1947 {
1948 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1949 }
1950 }
1951}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1869

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1929 of file index.cpp.

1931{
1932 for (const auto &nd : nsLinkedMap)
1933 {
1934 if (nd->isVisibleInHierarchy())
1935 {
1936 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1937 }
1938 }
1939}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1869 of file index.cpp.

1871{
1872 if (!nd->isAnonymous() &&
1873 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1874 {
1875
1876 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1877 bool hasChildren = hasNestedNamespace ||
1880 bool isLinkable = nd->isLinkable();
1881 int visibleMembers = nd->countVisibleMembers();
1882
1883 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1884
1885 QCString ref;
1886 QCString file;
1887 if (isLinkable)
1888 {
1889 ref = nd->getReference();
1890 file = nd->getOutputFileBase();
1891 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1892 {
1893 file=file.replace(0,qstrlen("namespace"),"class");
1894 }
1895 }
1896
1897 bool isDir = hasChildren || visibleMembers>0;
1898 if (isLinkable || isDir)
1899 {
1900 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1901
1902 if (addToIndex)
1903 {
1904 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1905 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1906 }
1907 if (addToIndex && isDir)
1908 {
1909 Doxygen::indexList->incContentsDepth();
1910 }
1911
1912 if (isDir)
1913 {
1914 ftv->incContentsDepth();
1915 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1916 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1917 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1918 writeNamespaceMembers(nd,addToIndex);
1919 ftv->decContentsDepth();
1920 }
1921 if (addToIndex && isDir)
1922 {
1923 Doxygen::indexList->decContentsDepth();
1924 }
1925 }
1926 }
1927}
virtual int countVisibleMembers() const =0
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1812
bool namespaceHasNestedNamespace(const NamespaceDef *nd)

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 3986 of file index.cpp.

3987{
3988 if (Index::instance().numIndexedPages()==0) return;
3989 ol.pushGeneratorState();
3991 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3992 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3993 startFile(ol,"pages",false,QCString(),title,HighlightedItem::Pages);
3994 startTitle(ol,QCString());
3995 ol.parseText(title);
3996 endTitle(ol,QCString(),QCString());
3997 ol.startContents();
3998 ol.startTextBlock();
3999 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
4000 ol.endTextBlock();
4001
4002 {
4003 FTVHelp ftv(false);
4004 for (const auto &pd : *Doxygen::pageLinkedMap)
4005 {
4006 if ((pd->getOuterScope()==nullptr ||
4007 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4008 pd->visibleInIndex()
4009 )
4010 {
4011 writePages(pd.get(),&ftv);
4012 }
4013 }
4014 TextStream t;
4015 ftv.generateTreeViewInline(t);
4016 ol.writeString(t.str());
4017 }
4018
4019// ol.popGeneratorState();
4020 // ------
4021
4022 endFile(ol);
4023 ol.popGeneratorState();
4024}

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 3925 of file index.cpp.

3926{
3927 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3928 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3929 bool addToIndex = lne==nullptr || lne->visible();
3930 if (!addToIndex) return;
3931
3932 bool hasSubPages = pd->hasSubPages();
3933 bool hasSections = pd->hasSections();
3934
3935 if (pd->visibleInIndex())
3936 {
3937 QCString pageTitle, pageTitleAsHtml;
3938
3939 if (pd->title().isEmpty())
3940 pageTitle=pd->name();
3941 else
3942 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3943 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3944
3945 if (ftv)
3946 {
3947 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3948 ftv->addContentsItem(
3949 hasSubPages,pageTitle,
3950 pd->getReference(),pd->getOutputFileBase(),
3951 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3952 }
3953 if (addToIndex && pd!=Doxygen::mainPage.get())
3954 {
3955 Doxygen::indexList->addContentsItem(
3956 hasSubPages || hasSections,pageTitle,
3957 pd->getReference(),pd->getOutputFileBase(),
3958 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3959 }
3960 }
3961 if (hasSubPages && ftv) ftv->incContentsDepth();
3962 bool doIndent = (hasSections || hasSubPages) &&
3963 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3964 if (doIndent)
3965 {
3966 Doxygen::indexList->incContentsDepth();
3967 }
3968 if (hasSections)
3969 {
3970 pd->addSectionsToIndex();
3971 }
3972 for (const auto &subPage : pd->getSubPages())
3973 {
3974 writePages(subPage,ftv);
3975 }
3976 if (hasSubPages && ftv) ftv->decContentsDepth();
3977 if (doIndent)
3978 {
3979 Doxygen::indexList->decContentsDepth();
3980 }
3981 //printf("end writePages()=%s\n",qPrint(pd->title()));
3982}
virtual bool hasSections() const =0
virtual void addSectionsToIndex()=0
virtual bool visibleInIndex() const =0
virtual const PageLinkedRefMap & getSubPages() const =0
virtual bool hasSubPages() const =0
virtual QCString title() const =0
static bool mainPageHasOwnTitle()
Definition index.cpp:3914

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 3071 of file index.cpp.

3074{
3075 bool first=TRUE;
3077 for (const auto &[letter,list] : map)
3078 {
3079 QCString ci(letter);
3080 QCString is = letterToLabel(ci);
3081 QCString anchor;
3083 if (!multiPage)
3084 anchor="#index_";
3085 else if (first)
3086 anchor=fullName+extension+"#index_";
3087 else
3088 anchor=fullName+"_"+is+extension+"#index_";
3089 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3090 ol.writeString(ci);
3092 first=FALSE;
3093 }
3095}

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 1490 of file index.cpp.

1491{
1492 //printf("Found filedef %s\n",qPrint(fd->name()));
1493 bool doc = fd->isLinkableInProject();
1494 bool src = fd->generateSourceFile();
1495 bool nameOk = !fd->isDocumentationFile();
1496 if (nameOk && (doc || src) && !fd->isReference())
1497 {
1498 QCString path;
1499 if (Config_getBool(FULL_PATH_NAMES))
1500 {
1501 path=stripFromPath(fd->getPath());
1502 }
1503 QCString fullName=fd->name();
1504 if (!path.isEmpty())
1505 {
1506 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1507 fullName.prepend(path);
1508 }
1509
1510 ol.startIndexKey();
1511 ol.docify(path);
1512 if (doc)
1513 {
1515 //if (addToIndex)
1516 //{
1517 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1518 //}
1519 }
1520 else if (src)
1521 {
1523 }
1524 if (doc && src)
1525 {
1526 ol.pushGeneratorState();
1528 ol.docify(" ");
1530 ol.docify("[");
1531 ol.parseText(theTranslator->trCode());
1532 ol.docify("]");
1533 ol.endTextLink();
1534 ol.popGeneratorState();
1535 }
1536 ol.endIndexKey();
1537 bool hasBrief = !fd->briefDescription().isEmpty();
1538 ol.startIndexValue(hasBrief);
1539 if (hasBrief)
1540 {
1541 ol.generateDoc(fd->briefFile(),
1542 fd->briefLine(),
1543 fd,
1544 nullptr,
1545 fd->briefDescription(true),
1546 DocOptions()
1547 .setSingleLine(true)
1548 .setLinkFromIndex(true));
1549 }
1550 if (doc)
1551 {
1552 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1553 }
1554 else // src
1555 {
1556 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1557 }
1558 //ol.popGeneratorState();
1559 // --------------------------------------------------------
1560 }
1561}
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getSourceFileBase() const =0
virtual QCString briefFile() const =0
virtual QCString includeName() const =0
virtual QCString getPath() const =0
virtual bool generateSourceFile() const =0
virtual bool isDocumentationFile() const =0
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:300

References QCString::at(), Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disableAllBut(), OutputList::docify(), OutputList::endIndexKey(), OutputList::endIndexValue(), OutputList::endTextLink(), 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, and OutputList::writeObjectLink().

Referenced by writeFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4380 of file index.cpp.

4381{
4382 if (Index::instance().numDocumentedGroups()==0) return;
4383 ol.pushGeneratorState();
4384 // 1.{
4387 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4388 QCString title = lne ? lne->title() : theTranslator->trTopics();
4389 bool addToIndex = lne==nullptr || lne->visible();
4390
4391 startFile(ol,"topics",false,QCString(),title,HighlightedItem::Topics);
4392 startTitle(ol,QCString());
4393 ol.parseText(title);
4394 endTitle(ol,QCString(),QCString());
4395 ol.startContents();
4396 ol.startTextBlock();
4397 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4398 ol.endTextBlock();
4399
4400 // ---------------
4401 // Normal group index for Latex/RTF
4402 // ---------------
4403 // 2.{
4404 ol.pushGeneratorState();
4406 Doxygen::indexList->disable();
4407
4408 writeGroupHierarchy(ol,nullptr,FALSE);
4409
4410 Doxygen::indexList->enable();
4411 ol.popGeneratorState();
4412 // 2.}
4413
4414 // ---------------
4415 // interactive group index for HTML
4416 // ---------------
4417 // 2.{
4418 ol.pushGeneratorState();
4420
4421 {
4422 if (addToIndex)
4423 {
4424 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4425 Doxygen::indexList->incContentsDepth();
4426 }
4427 FTVHelp ftv(false);
4428 writeGroupHierarchy(ol,&ftv,addToIndex);
4429 TextStream t;
4430 ftv.generateTreeViewInline(t);
4432 ol.writeString(t.str());
4433 if (addToIndex)
4434 {
4435 Doxygen::indexList->decContentsDepth();
4436 }
4437 }
4438 ol.popGeneratorState();
4439 // 2.}
4440
4441 endFile(ol);
4442 ol.popGeneratorState();
4443 // 1.}
4444}
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4356

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 4802 of file index.cpp.

4803{
4804 if (lne->baseFile().startsWith("usergroup"))
4805 {
4806 ol.pushGeneratorState();
4809 startTitle(ol,QCString());
4810 ol.parseText(lne->title());
4811 endTitle(ol,QCString(),QCString());
4812 ol.startContents();
4813 int count=0;
4814 for (const auto &entry: lne->children())
4815 {
4816 if (entry->visible()) count++;
4817 }
4818 if (count>0)
4819 {
4820 ol.writeString("<ul>\n");
4821 for (const auto &entry: lne->children())
4822 {
4823 if (entry->visible())
4824 {
4825 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4826 fixSpaces(entry->title())+"</span></a></li>\n");
4827 }
4828 }
4829 ol.writeString("</ul>\n");
4830 }
4831 endFile(ol);
4832 ol.popGeneratorState();
4833 }
4834}
bool startsWith(const char *s) const
Definition qcstring.h:507
QCString baseFile() const
Definition layout.h:214

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().

Variable Documentation

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5250 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex