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 void writeMemberIndex (OutputList &ol, const Index::MemberIndexMap &map, 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 void writePages (PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
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

constexpr auto alphaSepar = "<div class=\"alphasepar\"></div>"
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

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200

Definition at line 55 of file index.cpp.

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

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

References addMembersToIndex(), Config_getBool, convertToHtml(), 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 2155 of file index.cpp.

2156{
2157 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2158 int count=0;
2159 int countPrinted=0;
2160 for (const auto &cd : *Doxygen::classLinkedMap)
2161 {
2162 if (sliceOpt && cd->compoundType() != ct)
2163 {
2164 continue;
2165 }
2166 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2167 {
2168 if (!cd->isEmbeddedInOuterScope())
2169 {
2170 countPrinted++;
2171 }
2172 count++;
2173 }
2174 }
2175 *cp = countPrinted;
2176 return count;
2177}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:95

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1124 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1148 of file index.cpp.

1149{
1150 int count=0;
1153 return count;
1154}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1124

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1739 of file index.cpp.

1740{
1741 int count=0;
1742 for (const auto &cd : *Doxygen::conceptLinkedMap)
1743 {
1744 if (cd->isLinkableInProject()) count++;
1745 }
1746 return count;
1747}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:97

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4088 of file index.cpp.

4098{
4099 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1475 of file index.cpp.

1476{
1477 allFiles=0;
1478 docFiles=0;
1479 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1480 {
1481 for (const auto &fd: *fn)
1482 {
1483 bool src = false;
1484 bool doc = fileVisibleInIndex(fd.get(),src);
1485 if (doc || src)
1486 {
1487 allFiles++;
1488 }
1489 if (doc)
1490 {
1491 docFiles++;
1492 }
1493 }
1494 }
1495}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:104
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6107

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4072 of file index.cpp.

4074 {
4075 if ((pd->getOuterScope()==nullptr ||
4076 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4077 pd->visibleInIndex()
4078 )
4079 {
4080 writePages(pd.get(),&ftv);
4081 }
4082 }
4083 TextStream t;
4084 ftv.generateTreeViewInline(t);
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:99
Text streaming class that buffers data.
Definition textstream.h:36
static void writePages(PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
Definition index.cpp:3970

References Doxygen::pageLinkedMap, and Definition::TypePage.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1728 of file index.cpp.

1729{
1730 int count=0;
1731 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1732 {
1733 if (nd->isLinkableInProject()) count++;
1734 }
1735 return count;
1736}
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 3952 of file index.cpp.

3954 {
3955 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3956 if (addToIndex)
3957 {
3958 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3959 }
3960 }
3961 ol.endItemListItem();
3962 //ol.writeString("\n");
3963 }
3964 ol.endItemList();
3965
3966 if (addToIndex)
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 738 of file index.cpp.

739{
740 if (dd->hasDocumentation()) return TRUE;
741
742 for (const auto &fd : dd->getFiles())
743 {
744 bool genSourceFile = false;
745 if (fileVisibleInIndex(fd,genSourceFile))
746 {
747 return TRUE;
748 }
749 if (genSourceFile)
750 {
751 return TRUE;
752 }
753 }
754
755 for(const auto &subdd : dd->subDirs())
756 {
757 if (dirHasVisibleChildren(subdd))
758 {
759 return TRUE;
760 }
761 }
762 return FALSE;
763}
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:738

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

431{
432 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
435 if (!skipNavIndex)
436 {
437 if (!skipEndContents) ol.endContents();
438 if (generateTreeView)
439 {
440 ol.writeString("</div><!-- doc-content -->\n");
441 ol.writeString("</div><!-- container -->\n");
442 }
443 }
444
445 ol.writeFooter(navPath); // write the footer
447 ol.endFile();
448}
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(), writeDirIndex(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), and writeNamespaceIndex().

◆ endFileWithNavPath()

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

Definition at line 450 of file index.cpp.

451{
452 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
453 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
454 QCString navPath;
455 if (generateTreeview)
456 {
459 ol.writeString("</div><!-- doc-content -->\n");
460 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
461 ol.writeString("</div><!-- container -->\n");
463 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
464 }
465 endFile(ol,generateTreeview,TRUE,navPath);
466}
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:429

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

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

◆ endIndexHierarchy()

◆ endQuickIndexItem()

void endQuickIndexItem ( OutputList & ol)
static

Definition at line 379 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 360 of file index.cpp.

361{
362 ol.writeString(" </ul>\n");
363 ol.writeString(" </div>\n");
364}

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1752 of file index.cpp.

1752{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1753 of file index.cpp.

1753{ 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 3151 of file index.cpp.

3170{
3171 CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a class member in the navigation menu.
Definition index.cpp:3145

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3343 of file index.cpp.

3352 {
3353 Doxygen::indexList->decContentsDepth();
3354 }
3355
3356}
3357
3358//----------------------------------------------------------------------------
3359
3360/** Helper class representing a file member in the navigation menu. */
3361struct FmhlInfo
3362{
3363 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3364 const char *fname;
Helper class representing a file member in the navigation menu.
Definition index.cpp:3337
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3338
const char * fname
Definition index.cpp:3339
QCString title
Definition index.cpp:3340

References ClassMemberHighlight::All, ClassMemberHighlight::Enums, ClassMemberHighlight::EnumValues, ClassMemberHighlight::Events, ClassMemberHighlight::Functions, Doxygen::indexList, ClassMemberHighlight::Properties, ClassMemberHighlight::Related, ClassMemberHighlight::Typedefs, and ClassMemberHighlight::Variables.

◆ getMmhlInfo()

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3529 of file index.cpp.

3538 {
3539 Doxygen::indexList->decContentsDepth();
3540 }
3541
3542}
3543
3544//----------------------------------------------------------------------------
3545
3546/** Helper class representing a namespace member in the navigation menu. */
3547struct NmhlInfo
3548{
3549 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3523
const char * fname
Definition index.cpp:3525
QCString title
Definition index.cpp:3526
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3524

References FileMemberHighlight::All, FileMemberHighlight::Defines, FileMemberHighlight::Dictionaries, FileMemberHighlight::Enums, FileMemberHighlight::EnumValues, FileMemberHighlight::Functions, Doxygen::indexList, Index::instance(), FileMemberHighlight::Sequences, FileMemberHighlight::Typedefs, and FileMemberHighlight::Variables.

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2251 of file index.cpp.

2252{
2253 return (c<127 && c>31); // printable ASCII character
2254}

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2256 of file index.cpp.

2257{
2258 if (startLetter.isEmpty()) return startLetter;
2259 const char *p = startLetter.data();
2260 char c = *p;
2261 QCString result;
2262 if (isId1(c))
2263 {
2264 result+=c;
2265 }
2266 else
2267 {
2268 result="0x";
2269 const char hex[]="0123456789abcdef";
2270 while ((c=*p++))
2271 {
2272 result+=hex[static_cast<unsigned char>(c)>>4];
2273 result+=hex[static_cast<unsigned char>(c)&0xf];
2274 }
2275 }
2276 return result;
2277}
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:2251

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

Referenced by writeAlphabeticalClassList(), writeMemberList(), and writeQuickMemberIndex().

◆ MemberIndexMap_add()

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

Definition at line 182 of file index.cpp.

183{
184 auto it = map.find(letter);
185 if (it!=map.end())
186 {
187 it->second.push_back(md);
188 }
189 else
190 {
191 map.emplace(letter,std::vector<const MemberDef*>({md}));
192 }
193}

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5619 of file index.cpp.

5623 {
5624 switch(kind)
5625 {
5626 case LayoutNavEntry::Modules:
5627 case LayoutNavEntry::Namespaces:
5628 case LayoutNavEntry::Classes:
5629 case LayoutNavEntry::Files:
5630 case LayoutNavEntry::UserGroup:
5631 Doxygen::indexList->decContentsDepth();
5632 break;
5633 default:
5634 break;
5635 }
5636 }
5637 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5638 }
5639
5640 // always write the directory index as it is used for non-HTML output only
5641 writeDirIndex(ol);
5642}
5643
5644static bool quickLinkVisible(LayoutNavEntry::Kind kind)
5645{
5646 const auto &index = Index::instance();
5647 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5648 bool showFiles = Config_getBool(SHOW_FILES);
5649 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5650 switch (kind)
5651 {
5652 case LayoutNavEntry::MainPage: return TRUE;
5653 case LayoutNavEntry::User: return TRUE;
5654 case LayoutNavEntry::UserGroup: return TRUE;
5655 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5656 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5657 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5658 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5659 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5660 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5661 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5662 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5663 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5664 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
static Index & instance()
Definition index.cpp:108
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1571
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition index.cpp:5619
Kind
Definition layout.h:193

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

5667 : return index.numHierarchyClasses()>0;
5668 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5669 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5670 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5671 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5672 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5673 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5674 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5675 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5676 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5677 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5678 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5679 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5680 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5681 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5682 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5683 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5684 case LayoutNavEntry::None: // should never happen, means not properly initialized
5685 assert(kind != LayoutNavEntry::None);
5686 return FALSE;
5687 }
5688 return FALSE;
5689}
5690
5691template<class T>
5692void renderMemberIndicesAsJs(std::ostream &t,
5693 std::function<std::size_t(std::size_t)> numDocumented,
5694 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5695 const T *(*getInfo)(size_t hl),
5696 std::size_t total)
5697{
5698 // index items per category member lists
5699 bool firstMember=TRUE;
5700 for (std::size_t i=0;i<total;i++)
5701 {
5702 if (numDocumented(i)>0)
5703 {
5704 t << ",";
5705 if (firstMember)
5706 {
5707 t << "children:[";
5708 firstMember=FALSE;
5709 }
5710 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5711 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5712
5713 // Check if we have many members, then add sub entries per letter...
5714 // quick alphabetical index
5715 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5716 if (quickIndex)
5717 {
5718 bool multiPageIndex=FALSE;
5719 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5720 {
5721 multiPageIndex=TRUE;
5722 }
5723 t << ",children:[\n";
5724 bool firstLetter=TRUE;
5725 for (const auto &[letter,list] : getMemberList(i))
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:98
static QCString htmlFileExtension
Definition doxygen.h:122
std::map< std::string, MemberIndexList > MemberIndexMap
Definition index.h:168
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
Definition index.cpp:55
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:5667
const int maxItemsBeforeQuickIndex
Definition index.cpp:343
QCString convertToJSString(const QCString &s, bool keepEntities, bool singleQuotes)
Definition util.cpp:4044

References ClassMemberHighlight::All, FileMemberHighlight::All, Doxygen::exampleLinkedMap, and FALSE.

◆ renderQuickLinksAsJs()

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

Definition at line 5727 of file index.cpp.

5737 {text:\"" << convertToJSString(ci) << "\",url:\""
5738 << convertToJSString(anchor+convertToId(is)) << "\"}";
5739 firstLetter=FALSE;
5740 }
5741 t << "]";
5742 }
5743 t << "}";
5744 }
5745 }
5746 if (!firstMember)
5747 {
5748 t << "]";
5749 }
5750}
5751
5752static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5753{
5754 int count=0;
5755 for (const auto &entry : root->children())
5756 {
5757 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5758 }
5759 if (count>0) // at least one item is visible
5760 {
5761 bool firstChild = TRUE;
5762 if (!first) t << ",";
5763 t << "children:[\n";
5764 for (const auto &entry : root->children())
5765 {
5766 if (entry->visible() && quickLinkVisible(entry->kind()))
5767 {
5768 if (!firstChild) t << ",\n";
5769 firstChild=FALSE;
5770 QCString url = entry->url();
5771 if (isURL(url)) url = "^" + url;
5772 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5773 << convertToJSString(url) << "\"";
5774 bool hasChildren=FALSE;
5775 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5776 {
5777 auto numDoc = [](std::size_t i) {
5779 };
5780 auto memList = [](std::size_t i) {
5782 };
5783 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5784 }
5785 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5786 {
5787 auto numDoc = [](std::size_t i) {
5789 };
5790 auto memList = [](std::size_t i) {
5792 };
5793 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5794 }
5795 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5796 {
5797 auto numDoc = [](std::size_t i) {
5799 };
5800 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:136
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:135
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:153
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:148
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2848
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5727
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3714
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3529
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
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:5931
QCString convertToId(const QCString &s)
Definition util.cpp:3893

References FALSE, and Doxygen::htmlFileExtension.

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

406{
407 bool disableIndex = Config_getBool(DISABLE_INDEX);
408 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
409 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
410 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
411 ol.startFile(name,isSource,manName,title,hierarchyLevel);
413 if (!disableIndex && !quickLinksAfterSplitbar)
414 {
415 ol.writeQuickLinks(hli,name);
416 }
417 if (!additionalIndices)
418 {
419 ol.endQuickIndices();
420 }
421 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
422 if (quickLinksAfterSplitbar)
423 {
424 ol.writeQuickLinks(hli,name);
425 }
426 ol.writeSearchInfo();
427}
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(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), DirRelation::writeDocumentation(), FileDefImpl::writeDocumentation(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeNamespaceIndex(), and FileDefImpl::writeSourceHeader().

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 366 of file index.cpp.

368{
369 first=FALSE;
370 ol.writeString(" <li");
371 if (hl) ol.writeString(" class=\"current\"");
372 ol.writeString("><a ");
373 ol.writeString("href=\"");
374 ol.writeString(l);
375 ol.writeString("\">");
376 ol.writeString("<span>");
377}

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 347 of file index.cpp.

348{
349 if (letterTabs)
350 {
351 ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
352 }
353 else
354 {
355 ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
356 }
357 ol.writeString(" <ul class=\"tablist\">\n");
358}

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 386 of file index.cpp.

387{
388 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
390 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
391 ol.startTitleHead(fileName);
394}
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(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), FileDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeNamespaceIndex(), and FileDefImpl::writeSourceHeader().

◆ writeAlphabeticalClassList()

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

Definition at line 2285 of file index.cpp.

2286{
2287 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2288
2289 // What starting letters are used
2290 UsedIndexLetters indexLettersUsed;
2291
2292 // first count the number of headers
2293 for (const auto &cd : *Doxygen::classLinkedMap)
2294 {
2295 if (sliceOpt && cd->compoundType() != ct)
2296 continue;
2297 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2298 {
2299 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2300 continue;
2301
2302 // get the first UTF8 character (after the part that should be ignored)
2303 int index = getPrefixIndex(cd->className());
2304 std::string letter = getUTF8CharAt(cd->className().str(),index);
2305 if (!letter.empty())
2306 {
2307 indexLettersUsed.insert(convertUTF8ToUpper(letter));
2308 }
2309 }
2310 }
2311
2312 // write quick link index (row of letters)
2313 QCString alphaLinks = "<div class=\"qindex\">";
2314 bool first=true;
2315 for (const auto &letter : indexLettersUsed)
2316 {
2317 if (!first) alphaLinks += alphaSepar;
2318 first=false;
2319 QCString li = letterToLabel(letter);
2320 alphaLinks += "<a class=\"qindex\" href=\"#letter_" +
2321 li + "\">" +
2322 letter + "</a>";
2323 }
2324 alphaLinks += "</div>\n";
2325 ol.writeString(alphaLinks);
2326
2327 std::map<std::string, std::vector<const ClassDef*> > classesByLetter;
2328
2329 // fill the columns with the class list (row elements in each column,
2330 // expect for the columns with number >= itemsInLastRow, which get one
2331 // item less.
2332 for (const auto &cd : *Doxygen::classLinkedMap)
2333 {
2334 if (sliceOpt && cd->compoundType() != ct)
2335 continue;
2336 if (cd->getLanguage()==SrcLangExt::VHDL && !(VhdlDocGen::convert(cd->protection())==VhdlDocGen::ENTITYCLASS ))// no architecture
2337 continue;
2338
2339 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2340 {
2341 QCString className = cd->className();
2342 int index = getPrefixIndex(className);
2343 std::string letter = getUTF8CharAt(className.str(),index);
2344 if (!letter.empty())
2345 {
2346 letter = convertUTF8ToUpper(letter);
2347 auto it = classesByLetter.find(letter);
2348 if (it!=classesByLetter.end()) // add class to the existing list
2349 {
2350 it->second.push_back(cd.get());
2351 }
2352 else // new entry
2353 {
2354 classesByLetter.emplace(letter, std::vector<const ClassDef*>({ cd.get() }));
2355 }
2356 }
2357 }
2358 }
2359
2360 // sort the class lists per letter while ignoring the prefix
2361 for (auto &[letter,list] : classesByLetter)
2362 {
2363 std::stable_sort(list.begin(), list.end(),
2364 [](const auto &c1,const auto &c2)
2365 {
2366 QCString n1 = c1->className();
2367 QCString n2 = c2->className();
2368 return qstricmp_sort(n1.data()+getPrefixIndex(n1), n2.data()+getPrefixIndex(n2))<0;
2369 });
2370 }
2371
2372 // generate table
2373 if (!classesByLetter.empty())
2374 {
2375 ol.writeString("<div class=\"classindex\">\n");
2376 int counter=0;
2377 for (const auto &cl : classesByLetter)
2378 {
2379 QCString parity = (counter++%2)==0 ? "even" : "odd";
2380 ol.writeString("<dl class=\"classindex " + parity + "\">\n");
2381
2382 // write character heading
2383 ol.writeString("<dt class=\"alphachar\">");
2384 QCString s = letterToLabel(cl.first);
2385 ol.writeString("<a id=\"letter_");
2386 ol.writeString(s);
2387 ol.writeString("\" name=\"letter_");
2388 ol.writeString(s);
2389 ol.writeString("\">");
2390 ol.writeString(cl.first);
2391 ol.writeString("</a>");
2392 ol.writeString("</dt>\n");
2393
2394 // write class links
2395 for (const auto &cd : cl.second)
2396 {
2397 ol.writeString("<dd>");
2398 QCString namesp,cname;
2399 extractNamespaceName(cd->name(),cname,namesp);
2400 QCString nsDispName;
2401 SrcLangExt lang = cd->getLanguage();
2403 if (sep!="::")
2404 {
2405 nsDispName=substitute(namesp,"::",sep);
2406 cname=substitute(cname,"::",sep);
2407 }
2408 else
2409 {
2410 nsDispName=namesp;
2411 }
2412
2413 ol.writeObjectLink(cd->getReference(),
2414 cd->getOutputFileBase(),cd->anchor(),cname);
2415 if (!namesp.isEmpty())
2416 {
2417 ol.writeString(" (");
2418 NamespaceDef *nd = getResolvedNamespace(namesp);
2419 if (nd && nd->isLinkable())
2420 {
2422 nd->getOutputFileBase(),QCString(),nsDispName);
2423 }
2424 else
2425 {
2426 ol.docify(nsDispName);
2427 }
2428 ol.writeString(")");
2429 }
2430 ol.writeString("</dd>");
2431 }
2432
2433 ol.writeString("</dl>\n");
2434 }
2435 ol.writeString("</div>\n");
2436 }
2437}
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
constexpr auto alphaSepar
Definition index.cpp:58
std::set< std::string > UsedIndexLetters
Definition index.cpp:2282
static QCString letterToLabel(const QCString &startLetter)
Definition index.cpp:2256
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:571
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:3718
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:5915
int getPrefixIndex(const QCString &name)
Definition util.cpp:3252

References alphaSepar, 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 2528 of file index.cpp.

2529{
2530 if (Index::instance().numAnnotatedExceptions()==0) return;
2531 ol.pushGeneratorState();
2533 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2534 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2535 bool addToIndex = lne==nullptr || lne->visible();
2536
2537 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2538
2539 startTitle(ol,QCString());
2540 ol.parseText(title);
2541 endTitle(ol,QCString(),QCString());
2542
2543 if (addToIndex)
2544 {
2545 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2546 }
2547
2548 ol.startContents();
2549 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2550 endFile(ol); // contains ol.endContents()
2551
2552 ol.popGeneratorState();
2553}
@ 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:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:396
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:403
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2285
Translator * theTranslator
Definition language.cpp:71
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().

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2441 of file index.cpp.

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

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

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2470 of file index.cpp.

2471{
2472 if (Index::instance().numAnnotatedInterfaces()==0) return;
2473 ol.pushGeneratorState();
2475 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2476 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2477 bool addToIndex = lne==nullptr || lne->visible();
2478
2479 startFile(ol,"interfaces",false,QCString(),title,HighlightedItem::Interfaces);
2480
2481 startTitle(ol,QCString());
2482 ol.parseText(title);
2483 endTitle(ol,QCString(),QCString());
2484
2485 if (addToIndex)
2486 {
2487 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2488 }
2489
2490 ol.startContents();
2491 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2492 endFile(ol); // contains ol.endContents()
2493
2494 ol.popGeneratorState();
2495}
@ 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().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2499 of file index.cpp.

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

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

◆ writeAnnotatedClassList()

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

Definition at line 2180 of file index.cpp.

2181{
2182 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2183 //bool addToIndex = lne==nullptr || lne->visible();
2184 bool first=TRUE;
2185
2186 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2187
2188 for (const auto &cd : *Doxygen::classLinkedMap)
2189 {
2190 if (cd->getLanguage()==SrcLangExt::VHDL &&
2191 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2193 ) // no architecture
2194 {
2195 continue;
2196 }
2197 if (first)
2198 {
2199 ol.startIndexList();
2200 first=FALSE;
2201 }
2202
2203 if (sliceOpt && cd->compoundType() != ct)
2204 {
2205 continue;
2206 }
2207
2208 ol.pushGeneratorState();
2209 if (cd->isEmbeddedInOuterScope())
2210 {
2214 }
2215 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2216 {
2217 ol.startIndexKey();
2218 if (cd->getLanguage()==SrcLangExt::VHDL)
2219 {
2221 ol.docify(prot);
2222 ol.writeString(" ");
2223 }
2224 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2225 ol.endIndexKey();
2226 bool hasBrief = !cd->briefDescription().isEmpty();
2227 ol.startIndexValue(hasBrief);
2228 if (hasBrief)
2229 {
2230 ol.generateDoc(cd->briefFile(),
2231 cd->briefLine(),
2232 cd.get(),
2233 nullptr,
2234 cd->briefDescription(true),
2235 DocOptions()
2236 .setSingleLine(true)
2237 .setLinkFromIndex(true));
2238 }
2239 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2240
2241 //if (addToIndex)
2242 //{
2243 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2244 //}
2245 }
2246 ol.popGeneratorState();
2247 }
2248 if (!first) ol.endIndexList();
2249}
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 2699 of file index.cpp.

2700{
2701 const auto &index = Index::instance();
2703 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2704 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2705 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2707 "annotatedexceptions",
2709}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2582
@ AnnotatedExceptions
Definition index.h:76

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

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2657 of file index.cpp.

2658{
2659 const auto &index = Index::instance();
2661 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2662 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2663 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2665 "annotated",
2667}
@ AnnotatedClasses
Definition index.h:73

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

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2582 of file index.cpp.

2583{
2584 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2585 // annotatedClasses,annotatedClassesPrinted);
2586 if (ctx.numAnnotated==0) return;
2587
2588 ol.pushGeneratorState();
2590 if (ctx.numPrinted==0)
2591 {
2594 }
2596 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2597 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2598 bool addToIndex = lne==nullptr || lne->visible();
2599
2600 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2601
2602 startTitle(ol,QCString());
2603 ol.parseText(title);
2604 endTitle(ol,QCString(),QCString());
2605
2606 ol.startContents();
2607
2608 ol.startTextBlock();
2609 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2610 ol.endTextBlock();
2611
2612 // ---------------
2613 // Linear class index for Latex/RTF
2614 // ---------------
2615 ol.pushGeneratorState();
2617 Doxygen::indexList->disable();
2618
2620
2621 Doxygen::indexList->enable();
2622 ol.popGeneratorState();
2623
2624 // ---------------
2625 // Hierarchical class index for HTML
2626 // ---------------
2627 ol.pushGeneratorState();
2629
2630 {
2631 if (addToIndex)
2632 {
2633 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2634 Doxygen::indexList->incContentsDepth();
2635 }
2636 FTVHelp ftv(false);
2639 TextStream t;
2640 ftv.generateTreeViewInline(t);
2641 ol.writeString(t.str());
2642 if (addToIndex)
2643 {
2644 Doxygen::indexList->decContentsDepth();
2645 }
2646 }
2647
2648 ol.popGeneratorState();
2649 // ------
2650
2651 endFile(ol); // contains ol.endContents()
2652 ol.popGeneratorState();
2653}
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
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:216
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2180
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2036
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1756
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2574
const ClassDef::CompoundType compoundType
Definition index.cpp:2577
const HighlightedItem hiItem
Definition index.cpp:2579
const QCString fileBaseName
Definition index.cpp:2578
const LayoutNavEntry::Kind listKind
Definition index.cpp:2573
const QCString listDefaultTitleText
Definition index.cpp:2575
const int numAnnotated
Definition index.cpp:2571
const QCString listDefaultIntroText
Definition index.cpp:2576
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 2671 of file index.cpp.

2672{
2673 const auto &index = Index::instance();
2675 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2676 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2677 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2679 "annotatedinterfaces",
2681}
@ AnnotatedInterfaces
Definition index.h:74

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

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2685 of file index.cpp.

2686{
2687 const auto &index = Index::instance();
2689 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2690 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2691 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2693 "annotatedstructs",
2695}
@ AnnotatedStructs
Definition index.h:75

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

◆ writeClassHierarchy()

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

Definition at line 1097 of file index.cpp.

1098{
1099 ClassDefSet visitedClasses;
1100 if (ftv)
1101 {
1102 ol.pushGeneratorState();
1104 }
1105 bool started=FALSE;
1106 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1107 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1108 if (started)
1109 {
1110 endIndexHierarchy(ol,0);
1111 if (addToIndex)
1112 {
1113 Doxygen::indexList->decContentsDepth();
1114 }
1115 }
1116 if (ftv)
1117 {
1118 ol.popGeneratorState();
1119 }
1120}
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:325
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:988

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

2714{
2715 const ClassDef *cd=md->getClassDef();
2716 if ( cd && prevClassName!=cd->displayName())
2717 {
2718 ol.writeString(separator);
2720 cd->displayName());
2721 prevClassName = cd->displayName();
2722 }
2723}
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 3306 of file index.cpp.

3311 : theTranslator->trCompoundMembersDescriptionTotal(hl));
3312 ol.endTextBlock();
3313 if (dynamicMenus || disableIndex)
3314 {
3315 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3316 }
3317
3318 writeMemberList(ol,quickIndex,
3319 multiPageIndex ? letter : std::string(),
3320 index.isClassIndexLetterUsed(hl),
3322 endFile(ol);
3323 first=FALSE;
3324 }
3325
3326 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3327
3328 ol.popGeneratorState();
3329}
3330
3331static void writeClassMemberIndex(OutputList &ol)
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3306
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, QCString fullName, bool multiPage)
Definition index.cpp:3106
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3151
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2766

References ClassMemberHighlight::All, getCmhlInfo(), theTranslator, and writeMemberIndex().

◆ writeClassMemberIndexFiltered()

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

Definition at line 3173 of file index.cpp.

3177{
3178 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3179 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3180 static CmhlInfo cmhlInfo[] =
3181 {
3182 CmhlInfo("functions", theTranslator->trAll()),
3183 CmhlInfo("functions_func",
3184 fortranOpt ? theTranslator->trSubprograms() :
3185 vhdlOpt ? theTranslator->trFunctionAndProc() :
3186 theTranslator->trFunctions()),
3187 CmhlInfo("functions_vars",theTranslator->trVariables()),
3188 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3189 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3190 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3191 CmhlInfo("functions_prop",theTranslator->trProperties()),
3192 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3193 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3194 };
3195 return &cmhlInfo[hl];
3196}
3197
3199{
3200 const auto &index = Index::instance();
3201 if (index.numDocumentedClassMembers(hl)==0) return;
3202
3203 bool disableIndex = Config_getBool(DISABLE_INDEX);
3204 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3205 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3206 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3207 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3208
3209 bool multiPageIndex=FALSE;
3210 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3211 {
3212 multiPageIndex=TRUE;
3213 }
3214
3215 ol.pushGeneratorState();
3217
3219 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3220 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3221 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3222 bool addToIndex = lne==nullptr || lne->visible();
3223
3224 if (addToIndex)
3225 {
3226 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3227 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3228 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3229 }
3230
3231 bool first=TRUE;
3232 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3233 {
3234 QCString fileName = getCmhlInfo(hl)->fname;
3235 if (multiPageIndex)
3236 {
3237 QCString cs(letter);
3238 if (!first)
3239 {
3240 fileName+="_"+letterToLabel(cs);
3241 }
3242 if (addToIndex)
3243 {
3244 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3245 }
3246 }
3247
3248 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3249
3250 auto writeQuickLinks = [&,cap_letter=letter]()
3251 {
3253 if (!dynamicMenus)
3254 {
3256
3257 // index item for global member list
3260 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3262
3263 // index items per category member lists
3264 for (int i=1;i<ClassMemberHighlight::Total;i++)
3265 {
3266 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3267 {
3269 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3270 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3271 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3273 }
3274 }
3275
3277
3278 // quick alphabetical index
3279 if (quickIndex)
3280 {
3281 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3282 getCmhlInfo(hl)->fname,multiPageIndex);
3283 }
3284
3285 ol.writeString("</div><!-- main-nav -->\n");
3286 }
3287 };
3288
3289 ol.startFile(fileName+extension,false,QCString(),title);
3290 ol.startQuickIndices();
3291 if (!disableIndex && !quickLinksAfterSplitbar)
3292 {
3293 writeQuickLinks();
3294 }
3295 ol.endQuickIndices();
3296 ol.writeSplitBar(fileName,QCString());
3297 if (quickLinksAfterSplitbar)
3298 {
3299 writeQuickLinks();
3300 if (!dynamicMenus)
3301 {
3302 ol.writeString("<div id=\"container\">\n");
3303 ol.writeString("<div id=\"doc-content\">\n");
3304 }
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3173
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:360
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool, bool &first)
Definition index.cpp:366
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:379
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition index.cpp:3079
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition index.cpp:347
QCString title
Definition index.cpp:3148
const char * fname
Definition index.cpp:3147
QCString fixSpaces(const QCString &s)
Definition util.h:521

◆ writeClassTree()

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

Definition at line 1756 of file index.cpp.

1757{
1758 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1759 for (const auto &cdi : cl)
1760 {
1761 const ClassDef *cd = get_pointer(cdi);
1762 if (cd->getLanguage()==SrcLangExt::VHDL)
1763 {
1766 )// no architecture
1767 {
1768 continue;
1769 }
1770 }
1771
1772 if (sliceOpt && cd->compoundType() != ct)
1773 {
1774 continue;
1775 }
1776
1777 if (!globalOnly ||
1778 cd->getOuterScope()==nullptr ||
1780 )
1781 {
1782 int count=0;
1783 for (const auto &ccd : cd->getClasses())
1784 {
1785 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1786 {
1787 count++;
1788 }
1789 }
1791 {
1792 QCString displayName = cd->displayName(false);
1793 if (ftv)
1794 {
1795 ftv->addContentsItem(count>0,displayName,cd->getReference(),
1796 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd,convertToHtml(displayName));
1797 }
1798 if (addToIndex &&
1799 (cd->getOuterScope()==nullptr ||
1801 )
1802 )
1803 {
1804 addMembersToIndex(cd,LayoutDocManager::Class,
1805 displayName,
1806 cd->anchor(),
1807 cd->partOfGroups().empty() && !cd->isSimple());
1808 }
1809 if (count>0)
1810 {
1811 if (ftv) ftv->incContentsDepth();
1812 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1813 if (ftv) ftv->decContentsDepth();
1814 }
1815 }
1816 }
1817 }
1818}
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(), convertToHtml(), 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(), 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 988 of file index.cpp.

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

References FTVHelp::addContentsItem(), classHasVisibleChildren(), classHasVisibleRoot(), Config_getBool, VhdlDocGen::convert(), convertToHtml(), 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 2045 of file index.cpp.

2047{
2048 for (const auto &nd : nsLinkedMap)
2049 {
2050 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2051 }
2052}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1964

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2036 of file index.cpp.

2038{
2039 for (const auto &nd : nsLinkedMap)
2040 {
2041 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2042 }
2043}

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

1966{
1967 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1968 if (!nd->isAnonymous() &&
1969 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1970 {
1971 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1972 bool isLinkable = nd->isLinkableInProject();
1973
1974 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1975
1976 QCString ref;
1977 QCString file;
1978 if (isLinkable)
1979 {
1980 ref = nd->getReference();
1981 file = nd->getOutputFileBase();
1982 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1983 {
1984 file=file.replace(0,qstrlen("namespace"),"class");
1985 }
1986 }
1987
1988 if (isDir)
1989 {
1990 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1991
1992 if (addToIndex)
1993 {
1994 // the namespace entry is already shown under the namespace list so don't
1995 // add it to the nav index and don't create a separate index file for it otherwise
1996 // it will overwrite the one written for the namespace list.
1997 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1998 false, // separateIndex
1999 false // addToNavIndex
2000 );
2001 }
2002 if (addToIndex)
2003 {
2004 Doxygen::indexList->incContentsDepth();
2005 }
2006
2007 ftv->incContentsDepth();
2008 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
2009 ClassLinkedRefMap d = nd->getClasses();
2010 if (sliceOpt)
2011 {
2012 if (ct == ClassDef::Interface)
2013 {
2014 d = nd->getInterfaces();
2015 }
2016 else if (ct == ClassDef::Struct)
2017 {
2018 d = nd->getStructs();
2019 }
2020 else if (ct == ClassDef::Exception)
2021 {
2022 d = nd->getExceptions();
2023 }
2024 }
2025 writeClassTree(d,ftv,addToIndex,FALSE,ct);
2026 ftv->decContentsDepth();
2027
2028 if (addToIndex)
2029 {
2030 Doxygen::indexList->decContentsDepth();
2031 }
2032 }
2033 }
2034}
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 622 of file index.cpp.

623{
624 if (bcl.empty()) return;
625 bool started=FALSE;
626 for (const auto &bcd : bcl)
627 {
628 ClassDef *cd=bcd.classDef;
629 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
630 {
631 continue;
632 }
633
634 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
635
636 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
637 {
638 if (!started)
639 {
640 startIndexHierarchy(ol,level);
641 if (addToIndex)
642 {
643 Doxygen::indexList->incContentsDepth();
644 }
645 if (ftv)
646 {
647 ftv->incContentsDepth();
648 }
649 started=TRUE;
650 }
652 //printf("Passed...\n");
653 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
655 QCString escapedName = convertToHtml(cd->displayName()); // avoid objective-C '<Protocol>' to be interpreted as XML/HTML tag
656 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
657 if (cd->isLinkable())
658 {
659 //printf("Writing class %s\n",qPrint(cd->displayName()));
662 cd->getDefLine(),
663 cd,
664 nullptr,
665 escapedName,
666 DocOptions()
667 .setSingleLine(true)
668 .setAutolinkSupport(false));
670 if (cd->isReference())
671 {
672 ol.startTypewriter();
673 ol.docify(" [external]");
674 ol.endTypewriter();
675 }
676 if (addToIndex)
677 {
678 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
679 }
680 if (ftv)
681 {
682 if (cd->getLanguage()==SrcLangExt::VHDL)
683 {
684 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
685 }
686 else
687 {
688 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd,escapedName);
689 }
690 }
691 }
692 else
693 {
695 ol.parseText(cd->name());
697 if (addToIndex)
698 {
699 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
700 }
701 if (ftv)
702 {
703 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd,escapedName);
704 }
705 }
706 if (hasChildren)
707 {
708 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
709 visitedClasses.insert(cd);
710 if (cd->getLanguage()==SrcLangExt::VHDL)
711 {
712 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
713 }
714 else
715 {
716 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
717 }
718 }
719 ol.endIndexListItem();
720 }
721 }
722 if (started)
723 {
724 endIndexHierarchy(ol,level);
725 if (addToIndex)
726 {
727 Doxygen::indexList->decContentsDepth();
728 }
729 if (ftv)
730 {
731 ftv->decContentsDepth();
732 }
733 }
734}
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 QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0

References FTVHelp::addContentsItem(), Definition::anchor(), ClassDef::baseClasses(), classHasVisibleChildren(), classHasVisibleRoot(), VhdlDocGen::convert(), convertToHtml(), 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 4745 of file index.cpp.

4749{
4750 for (const auto &cd : *Doxygen::conceptLinkedMap)
4751 {
4752 if ((cd->getOuterScope()==nullptr ||
4753 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4754 )
4755 {
4756 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4757 ftv->addContentsItem(
4758 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4759 QCString(),false,cd->partOfGroups().empty(),cd.get());
4760 if (addToIndex)
4761 {
4762 Doxygen::indexList->addContentsItem(
4763 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4764 QCString(),false,cd->partOfGroups().empty(),cd.get());
4765 }
4766 }
4767 }
4768}
4769
4770static void writeConceptIndex(OutputList &ol)
4771{
4772 if (Index::instance().numDocumentedConcepts()==0) return;
4773 ol.pushGeneratorState();
4774 // 1.{
4777 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4778 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4779 bool addToIndex = lne==nullptr || lne->visible();
4780
4781 startFile(ol,"concepts",false,QCString(),title,HighlightedItem::Concepts);
4782 startTitle(ol,QCString());
4783 ol.parseText(title);
4784 endTitle(ol,QCString(),QCString());
4785 ol.startContents();
4786 ol.startTextBlock();
4787 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4788 ol.endTextBlock();
4789
4790 // ---------------
4791 // Normal group index for Latex/RTF
4792 // ---------------
4793 // 2.{
4794 ol.pushGeneratorState();
4796
4797 bool first=TRUE;
4798 for (const auto &cd : *Doxygen::conceptLinkedMap)
4799 {
4800 if (cd->isLinkableInProject())
4801 {
4802 if (first)
4803 {
4804 ol.startIndexList();
4805 first=FALSE;
4806 }
4807 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4808 ol.startIndexKey();
4809 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4810 ol.endIndexKey();
4811
4812 bool hasBrief = !cd->briefDescription().isEmpty();
4813 ol.startIndexValue(hasBrief);
4814 if (hasBrief)
4815 {
4816 ol.generateDoc(cd->briefFile(),
4817 cd->briefLine(),
4818 cd.get(),
4819 nullptr,
4820 cd->briefDescription(true),
4821 DocOptions()
4822 .setSingleLine(true)
4823 .setLinkFromIndex(true));
4824 }
4825 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4826
4827 }
4828 }
4829 if (!first) ol.endIndexList();
4830
4831 ol.popGeneratorState();
4832 // 2.}
4833
4834 // ---------------
4835 // interactive group index for HTML
4836 // ---------------
4837 // 2.{
4838 ol.pushGeneratorState();
4840
4841 {
4842 if (addToIndex)
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4745

◆ writeConceptList()

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

Definition at line 4639 of file index.cpp.

4639 {
4640 if (addToIndex)
4641 {
4642 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4643 Doxygen::indexList->incContentsDepth();
4644 }
4645 FTVHelp ftv(false);
4646 writeModuleList(ol,&ftv,addToIndex);
4647 TextStream t;
4649 ol.writeString(t.str());
4650 if (addToIndex)
4651 {
4652 Doxygen::indexList->decContentsDepth();
4653 }
4654 }
4655 ol.popGeneratorState();
4656 // 2.}
4657 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:880
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4547

References FTVHelp::generateTreeViewInline(), Doxygen::indexList, TextStream::str(), TRUE, writeModuleList(), and OutputList::writeString().

Referenced by writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4723 of file index.cpp.

4731 {
4732 Doxygen::indexList->incContentsDepth();
4733 }
4734
4735 ftv->incContentsDepth();
4736 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex);
4737 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4738 ftv->decContentsDepth();
4739
4740 if (addToIndex)
4741 {
4742 Doxygen::indexList->decContentsDepth();
4743 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4662
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4639

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4662 of file index.cpp.

4665{
4666 for (const auto &cd : concepts)
4667 {
4668 if (cd->isLinkableInProject())
4669 {

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4672 of file index.cpp.

4676 {
4677 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4678 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4679 }
4680 }
4681 }
4682}
4683
4685 bool rootOnly, bool addToIndex);
4686
4687static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
4688 bool rootOnly, bool addToIndex)
4689{
4690 for (const auto &nd : nsLinkedMap)
4691 {
4692 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4693 }
4694}
4695
4696
4698 bool rootOnly, bool addToIndex)
4699{
4700 if (!nd->isAnonymous() &&
4701 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4702 {
4703 bool isDir = namespaceHasNestedConcept(nd);
4704 bool isLinkable = nd->isLinkableInProject();
4705
4706 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4707
4708 QCString ref;
4709 QCString file;
4710 if (isLinkable)
4711 {
4712 ref = nd->getReference();
4713 file = nd->getOutputFileBase();
4714 }
4715
4716 if (isDir)
4717 {
4718 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4719
4720 if (addToIndex)
4721 {
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4672
bool namespaceHasNestedConcept(const NamespaceDef *nd)

References FALSE.

◆ writeDirHierarchy()

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

Definition at line 924 of file index.cpp.

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

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

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

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

◆ writeDirTreeNode()

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

Definition at line 766 of file index.cpp.

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

3888{
3889 const auto &index = Index::instance();
3890 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3891 bool addToIndex = lne==nullptr || lne->visible();
3892 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3893 {
3894 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3895 Doxygen::indexList->incContentsDepth();
3896 }
3897 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3904 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3905 {
3906 Doxygen::indexList->decContentsDepth();
3907 }
3908}
3909
3910//----------------------------------------------------------------------------
3911
3912static void writeExampleIndex(OutputList &ol)
3913{
3914 if (Doxygen::exampleLinkedMap->empty()) return;
3915 ol.pushGeneratorState();
3918 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3919 QCString title = lne ? lne->title() : theTranslator->trExamples();
3920 bool addToIndex = lne==nullptr || lne->visible();
3921
3922 startFile(ol,"examples",false,QCString(),title,HighlightedItem::Examples);
3923
3924 startTitle(ol,QCString());
3925 ol.parseText(title);
3926 endTitle(ol,QCString(),QCString());
3927
3928 ol.startContents();
3929
3930 if (addToIndex)
3931 {
3932 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3933 Doxygen::indexList->incContentsDepth();
3934 }
3935
3936 ol.startTextBlock();
3937 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3938 ol.endTextBlock();
3939
3940 ol.startItemList();
3941 for (const auto &pd : *Doxygen::exampleLinkedMap)
3942 {
3943 ol.startItemListItem();
3944 QCString n=pd->getOutputFileBase();
3945 if (!pd->title().isEmpty())
3946 {
3947 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
void startItemListItem()
Definition outputlist.h:457
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3887
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3730

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

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1600 of file index.cpp.

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

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

◆ writeFileLinkForMember()

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

Definition at line 2725 of file index.cpp.

2727{
2728 const FileDef *fd=md->getFileDef();
2729 if (fd && prevFileName!=fd->name())
2730 {
2731 ol.writeString(separator);
2733 fd->name());
2734 prevFileName = fd->name();
2735 }
2736}
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 3494 of file index.cpp.

3501 : theTranslator->trFileMembersDescriptionTotal(hl));
3502 ol.endTextBlock();
3503 if (dynamicMenus || disableIndex)
3504 {
3505 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3506 }
3507
3508 writeMemberList(ol,quickIndex,
3509 multiPageIndex ? letter : std::string(),
3510 index.isFileIndexLetterUsed(hl),
3512 endFile(ol);
3513 first=FALSE;
3514 }
3515 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3516 ol.popGeneratorState();
3517}
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3343

◆ writeFileMemberIndexFiltered()

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

Definition at line 3366 of file index.cpp.

3369{
3370 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3371 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3372 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3373 static FmhlInfo fmhlInfo[] =
3374 {
3375 FmhlInfo("globals", theTranslator->trAll()),
3376 FmhlInfo("globals_func",
3377 fortranOpt ? theTranslator->trSubprograms() :
3378 vhdlOpt ? theTranslator->trFunctionAndProc() :
3379 theTranslator->trFunctions()),
3380 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3381 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3382 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3383 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3384 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3385 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3386 FmhlInfo("globals_defs",theTranslator->trDefines())
3387 };
3388 return &fmhlInfo[hl];
3389}
3390
3392{
3393 const auto &index = Index::instance();
3394 if (index.numDocumentedFileMembers(hl)==0) return;
3395
3396 bool disableIndex = Config_getBool(DISABLE_INDEX);
3397 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3398 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3399 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3400 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3401
3402 bool multiPageIndex=FALSE;
3403 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3404 {
3405 multiPageIndex=TRUE;
3406 }
3407
3408 ol.pushGeneratorState();
3410
3412 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3413 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3414 bool addToIndex = lne==nullptr || lne->visible();
3415
3416 if (addToIndex)
3417 {
3418 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3419 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3420 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3421 }
3422
3423 bool first=TRUE;
3424 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3425 {
3426 QCString fileName = getFmhlInfo(hl)->fname;
3427 if (multiPageIndex)
3428 {
3429 QCString cs(letter);
3430 if (!first)
3431 {
3432 fileName+="_"+letterToLabel(cs);
3433 }
3434 if (addToIndex)
3435 {
3436 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3437 }
3438 }
3439
3440 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3441
3442 auto writeQuickLinks = [&,cap_letter=letter]()
3443 {
3445 if (!dynamicMenus)
3446 {
3448
3449 // index item for all file member lists
3452 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3454
3455 // index items for per category member lists
3456 for (int i=1;i<FileMemberHighlight::Total;i++)
3457 {
3458 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3459 {
3461 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3462 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3464 }
3465 }
3466
3468
3469 if (quickIndex)
3470 {
3471 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3472 getFmhlInfo(hl)->fname,multiPageIndex);
3473 }
3474
3475 ol.writeString("</div><!-- main-nav -->\n");
3476 }
3477 };
3478
3479 ol.startFile(fileName+extension,false,QCString(),title);
3480 ol.startQuickIndices();
3481 if (!disableIndex && !quickLinksAfterSplitbar)
3482 {
3483 writeQuickLinks();
3484 }
3485 ol.endQuickIndices();
3486 ol.writeSplitBar(fileName,QCString());
3487 if (quickLinksAfterSplitbar)
3488 {
3489 writeQuickLinks();
3490 if (!dynamicMenus)
3491 {
3492 ol.writeString("<div id=\"container\">\n");
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3366

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1239 of file index.cpp.

1240{
1241 if (Index::instance().numHierarchyClasses()==0) return;
1243 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1244 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1245 startFile(ol,"inherits",false,QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1246 startTitle(ol,QCString());
1247 ol.parseText(title);
1248 endTitle(ol,QCString(),QCString());
1249 ol.startContents();
1250 ol.startTextBlock();
1251 ol.startParagraph();
1252 ol.startTextLink("hierarchy",QCString());
1253 ol.parseText(theTranslator->trGotoTextualHierarchy());
1254 ol.endTextLink();
1255 ol.endParagraph();
1256 ol.endTextBlock();
1259 endFile(ol);
1260 ol.enableAll();
1261}
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().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1449 of file index.cpp.

1450{
1451 if (Index::instance().numHierarchyExceptions()==0) return;
1453 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1454 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1455 startFile(ol,"exceptioninherits",false,QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1456 startTitle(ol,QCString());
1457 ol.parseText(title);
1458 endTitle(ol,QCString(),QCString());
1459 ol.startContents();
1460 ol.startTextBlock();
1461 ol.startParagraph();
1462 ol.startTextLink("exceptionhierarchy",QCString());
1463 ol.parseText(theTranslator->trGotoTextualHierarchy());
1464 ol.endTextLink();
1465 ol.endParagraph();
1466 ol.endTextBlock();
1469 endFile(ol);
1470 ol.enableAll();
1471}
@ 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().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1344 of file index.cpp.

1345{
1346 if (Index::instance().numHierarchyInterfaces()==0) return;
1348 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1349 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1350 startFile(ol,"interfaceinherits",false,QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1351 startTitle(ol,QCString());
1352 ol.parseText(title);
1353 endTitle(ol,QCString(),QCString());
1354 ol.startContents();
1355 ol.startTextBlock();
1356 ol.startParagraph();
1357 ol.startTextLink("interfacehierarchy",QCString());
1358 ol.parseText(theTranslator->trGotoTextualHierarchy());
1359 ol.endTextLink();
1360 ol.endParagraph();
1361 ol.endTextBlock();
1364 endFile(ol);
1365 ol.enableAll();
1366}
@ 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().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4104 of file index.cpp.

4114{
4115 int count=0;
4116 for (const auto &dd : *Doxygen::dirLinkedMap)
4117 {
4118 if (dd->isLinkableInProject())
4119 {
4120 count++;
4121 }
4122 }
4123 return count;
4124}
4125
4126
4127//----------------------------------------------------------------------------
4128
4129void writeGraphInfo(OutputList &ol)
4130{
4131 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4132 ol.pushGeneratorState();
4134
4135 DotLegendGraph gd;
4136 gd.writeGraph(Config_getString(HTML_OUTPUT));
4137
4138 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4139 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4140 // temporarily disable the stripping of comments for our own code example!
4141 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4142 // temporarily disable create subdirs for linking to our example
4143 Config_updateBool(CREATE_SUBDIRS,FALSE);
4144
4145 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4146 startTitle(ol,QCString());
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const QCString &path)
#define Config_updateBool(name, value)
Definition config.h:40
#define Config_getString(name)
Definition config.h:32
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4104

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4400 of file index.cpp.

4400 {
4401 startIndexHierarchy(ol,level+1);
4402 for (const auto &subgd : gd->getSubGroups())
4403 {
4404 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4405 }
4406 endIndexHierarchy(ol,level+1);
4407 }
4408 }
4409 }
4410
4411 ol.endIndexListItem();
4412
4413 if (addToIndex)
4414 {
4415 Doxygen::indexList->decContentsDepth();
4416 }
4417 if (ftv)
4418 {
4419 ftv->decContentsDepth();
4420 }
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4154

References endIndexHierarchy(), GroupDef::getSubGroups(), startIndexHierarchy(), and writeGroupTreeNode().

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4154 of file index.cpp.

4155 {
4156 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4157 //printf("legendDocs=%s\n",qPrint(legendDocs));
4158 }
4159
4160 {
4161 auto fd = createFileDef("","graph_legend.dox");
4162 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4163 }
4164
4165 // restore config settings
4166 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4167 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4168
4169 endFile(ol);
4170 ol.popGeneratorState();
4171}
4172
4173
4174
4175//----------------------------------------------------------------------------
4176/*!
4177 * write groups as hierarchical trees
4178 */
4179static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4180{
4181 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4182 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4183 if (level>20)
4184 {
4185 warn(gd->getDefFileName(),gd->getDefLine(),
4186 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4187 return;
4188 }
4189
4190 /* Some groups should appear twice under different parent-groups.
4191 * That is why we should not check if it was visited
4192 */
4193 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4194 {
4195 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4196 // write group info
4197 bool hasSubGroups = !gd->getSubGroups().empty();
4198 bool hasSubPages = !gd->getPages().empty();
4199 size_t numSubItems = 0;
4200 for (const auto &ml : gd->getMemberLists())
4201 {
4202 if (ml->listType().isDocumentation())
4203 {
4204 numSubItems += ml->size();
4205 }
4206 }
4207 numSubItems += gd->getNamespaces().size();
4208 numSubItems += gd->getClasses().size();
4209 numSubItems += gd->getFiles().size();
4210 numSubItems += gd->getConcepts().size();
4211 numSubItems += gd->getDirs().size();
4212 numSubItems += gd->getPages().size();
4213
4214 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4215 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4216 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4217
4218 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4219 if (addToIndex)
4220 {
4221 Doxygen::indexList->addContentsItem(isDir,title,
4223 isDir,TRUE,nullptr,titleAsHtml);
4224 Doxygen::indexList->incContentsDepth();
4225 }
4226 if (ftv)
4227 {
4228 ftv->addContentsItem(hasSubGroups,title,
4230 FALSE,FALSE,gd,titleAsHtml);
4231 ftv->incContentsDepth();
4232 }
4233
4234 ol.startIndexListItem();
4236 ol.generateDoc(gd->getDefFileName(),
4237 gd->getDefLine(),
4238 gd,
4239 nullptr,
4240 gd->groupTitle(),
4241 DocOptions()
4242 .setSingleLine(true)
4243 .setAutolinkSupport(false));
4245
4246 if (gd->isReference())
4247 {
4248 ol.startTypewriter();
4249 ol.docify(" [external]");
4250 ol.endTypewriter();
4251 }
4252
4253 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4254 {
4255 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4256 {
4257 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4258 if (lmd)
4259 {
4260 MemberList *ml = gd->getMemberList(lmd->type);
4261 if (ml)
4262 {
4263 for (const auto &md : *ml)
4264 {
4265 const MemberVector &enumList = md->enumFieldList();
4266 isDir = !enumList.empty() && md->isEnumerate();
4267 if (md->isVisible() && !md->isAnonymous())
4268 {
4269 Doxygen::indexList->addContentsItem(isDir,
4270 md->qualifiedName(),md->getReference(),
4271 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4272 }
4273 if (isDir)
4274 {
4275 Doxygen::indexList->incContentsDepth();
4276 for (const auto &emd : enumList)
4277 {
4278 if (emd->isVisible())
4279 {
4280 Doxygen::indexList->addContentsItem(FALSE,
4281 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4282 emd->anchor(),FALSE,addToIndex);
4283 }
4284 }
4285 Doxygen::indexList->decContentsDepth();
4286 }
4287 }
4288 }
4289 }
4290 }
4291 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4292 {
4293 for (const auto &cd : gd->getClasses())
4294 {
4295 //bool nestedClassInSameGroup =
4296 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4297 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4298 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4299 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4300 {
4302 LayoutDocManager::Class,
4303 cd->displayName(),
4304 cd->anchor(),
4305 addToIndex,
4306 TRUE);
4307 }
4308 }
4309 }
4310 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4311 {
4312 for (const auto &nd : gd->getNamespaces())
4313 {
4314 if (nd->isVisible())
4315 {
4316 Doxygen::indexList->addContentsItem(FALSE,
4317 nd->displayName(),nd->getReference(),
4318 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4319 }
4320 }
4321 }
4322 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4323 {
4324 for (const auto &cd : gd->getConcepts())
4325 {
4326 if (cd->isVisible())
4327 {
4328 Doxygen::indexList->addContentsItem(FALSE,
4329 cd->displayName(),cd->getReference(),
4330 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4331 }
4332 }
4333 }
4334 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4335 {
4336 for (const auto &fd : gd->getFiles())
4337 {
4338 if (fd->isVisible())
4339 {
4340 Doxygen::indexList->addContentsItem(FALSE,
4341 fd->displayName(),fd->getReference(),
4342 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4343 }
4344 }
4345 }
4346 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4347 {
4348 for (const auto &dd : gd->getDirs())
4349 {
4350 if (dd->isVisible())
4351 {
4352 Doxygen::indexList->addContentsItem(FALSE,
4353 dd->shortName(),dd->getReference(),
4354 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4355 }
4356 }
4357 }
4358 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4359 {
4360 for (const auto &pd : gd->getPages())
4361 {
4362 const SectionInfo *si=nullptr;
4363 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4364 hasSubPages = pd->hasSubPages();
4365 bool hasSections = pd->hasSections();
4366 QCString pageTitle;
4367 if (pd->title().isEmpty())
4368 pageTitle=pd->name();
4369 else
4370 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4371 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4372 Doxygen::indexList->addContentsItem(
4373 hasSubPages || hasSections,
4374 pageTitle,
4375 gd->getReference(),
4376 gd->getOutputFileBase(),
4377 si ? si->label() : QCString(),
4378 hasSubPages || hasSections,
4379 TRUE,
4380 nullptr,
4381 pageTitleAsHtml); // addToNavIndex
4382 if (hasSections || hasSubPages)
4383 {
4384 Doxygen::indexList->incContentsDepth();
4385 }
4386 if (hasSections)
4387 {
4388 pd->addSectionsToIndex();
4389 }
4390 writePages(pd,nullptr);
4391 if (hasSections || hasSubPages)
4392 {
4393 Doxygen::indexList->decContentsDepth();
4394 }
4395 }
4396 }
4397 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4398 {
virtual bool isVisible() const =0
A model of a group of symbols.
Definition groupdef.h:52
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:58
QCString label() const
Definition section.h:69
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:179
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
QCString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5445
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5389

References QCString::left(), and QCString::mid().

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1370 of file index.cpp.

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

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

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1158 of file index.cpp.

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

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

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1265 of file index.cpp.

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

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

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4883 of file index.cpp.

4883 : lne->children())
4884 {
4885 if (entry->visible()) count++;
4886 }
4887 if (count>0)
4888 {
4889 ol.writeString("<ul>\n");
4890 for (const auto &entry: lne->children())
4891 {
4892 if (entry->visible())
4893 {
4894 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4895 fixSpaces(entry->title())+"</span></a></li>\n");
4896 }
4897 }
4898 ol.writeString("</ul>\n");
4899 }
4900 endFile(ol);
4901 ol.popGeneratorState();
4902 }
4903}
4904
4905//----------------------------------------------------------------------------
4906
4907
4908static void writeIndex(OutputList &ol)
4909{
4910 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4911 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4912 bool disableIndex = Config_getBool(DISABLE_INDEX);
4913 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4914 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4915 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4916 QCString projectName = Config_getString(PROJECT_NAME);
4917 // save old generator state
4918 ol.pushGeneratorState();
4919
4920 QCString projPrefix;
4921 if (!projectName.isEmpty())
4922 {
4923 projPrefix=projectName+" ";
4924 }
4925
4926 //--------------------------------------------------------------------
4927 // write HTML index
4928 //--------------------------------------------------------------------
4930
4931 QCString defFileName =
4932 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4933 int defLine =
4934 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4935
4936 QCString title, titleAsHtml;
4937 if (!mainPageHasTitle())
4938 {
4939 title = theTranslator->trMainPage();
4940 }
4941 else if (Doxygen::mainPage)
4942 {
4943 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4944 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4945 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4946 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4947 }
4948
4949 QCString indexName="index";
4950 ol.startFile(indexName,false,QCString(),title);
4951
4953 {
4954 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4955 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4956 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4957 if (hasTitle) // to avoid duplicate entries in the treeview
4958 {
4959 Doxygen::indexList->addContentsItem(hasSubs,
4960 title,
4961 QCString(),
4962 indexName,
4963 QCString(),
4964 hasSubs,
4965 TRUE,
4966 nullptr,
4967 titleAsHtml);
4968 }
4969 if (hasSubs)
4970 {
4971 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
4972 }
4973 }
4974
4975 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4976 ol.startQuickIndices();
4977 if (!disableIndex && !quickLinksAfterSplitbar)
4978 {
4980 }
4981 ol.endQuickIndices();
4982 ol.writeSplitBar(indexName,QCString());
4983 if (quickLinksAfterSplitbar)
4984 {
4986 }
4987 ol.writeSearchInfo();
4988 bool headerWritten=FALSE;
4990 {
4991 if (!Doxygen::mainPage->title().isEmpty())
4992 {
4993 if (Doxygen::mainPage->title().lower() != "notitle")
4994 ol.startPageDoc(Doxygen::mainPage->title());
4995 else
4996 ol.startPageDoc("");
4997 }
4998 else
4999 ol.startPageDoc(projectName);
5000 }
5001 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
5002 {
5003 if (Doxygen::mainPage->title().lower()!="notitle")
5004 {
5005 ol.startHeaderSection();
5007 ol.generateDoc(Doxygen::mainPage->docFile(),
5008 Doxygen::mainPage->getStartBodyLine(),
5009 Doxygen::mainPage.get(),
5010 nullptr,
5011 Doxygen::mainPage->title(),
5012 DocOptions()
5013 .setSingleLine(true));
5014 headerWritten = TRUE;
5015 }
5016 }
5017 else
5018 {
5019 if (!projectName.isEmpty())
5020 {
5021 ol.startHeaderSection();
5023 ol.parseText(theTranslator->trDocumentation(projectName));
5024 headerWritten = TRUE;
5025 }
5026 }
5027 if (headerWritten)
5028 {
5030 ol.endHeaderSection();
5031 }
5032
5033 ol.startContents();
5034 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5035 {
5037 }
5038
5040 {
5041 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5042 {
5043 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5044 }
5045
5046 ol.startTextBlock();
5047 ol.generateDoc(defFileName,
5048 defLine,
5049 Doxygen::mainPage.get(),
5050 nullptr,
5051 Doxygen::mainPage->documentation(),
5052 DocOptions()
5053 .setIndexWords(true));
5054 ol.endTextBlock();
5055 ol.endPageDoc();
5056 }
5057
5060 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5061 Doxygen::indexList->addIndexFile(fn);
5062
5063 if (Doxygen::mainPage &&
5064 generateTreeView &&
5065 pageOutlinePanel &&
5066 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5067 Doxygen::mainPage->hasSections()
5068 )
5069 {
5070 ol.writeString("</div><!-- doc-content -->\n");
5071 ol.endContents();
5072 Doxygen::mainPage->writePageNavigation(ol);
5073 ol.writeString("</div><!-- container -->\n");
5074 endFile(ol,true,true);
5075 }
5076 else
5077 {
5078 endFile(ol);
5079 }
5080
5082
5083 //--------------------------------------------------------------------
5084 // write LaTeX/RTF index
5085 //--------------------------------------------------------------------
5089
5091 {
5092 msg("Generating main page...\n");
5093 Doxygen::mainPage->writeDocumentation(ol);
5094 }
5095
5096 ol.startFile("refman",false,QCString(),QCString());
5100
5101 if (projPrefix.isEmpty())
5102 {
5103 ol.parseText(theTranslator->trReferenceManual());
5104 }
5105 else
5106 {
5107 ol.parseText(projPrefix);
5108 }
5109
5110 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5111 {
5112 ol.startProjectNumber();
5113 ol.generateDoc(defFileName,
5114 defLine,
5115 Doxygen::mainPage.get(),
5116 nullptr,
5117 Config_getString(PROJECT_NUMBER),
5118 DocOptions());
5119 ol.endProjectNumber();
5120 }
5123 ol.parseText(theTranslator->trGeneratedBy());
5127
5128 ol.lastIndexPage();
5130 {
5133 }
5134 const auto &index = Index::instance();
5135 if (index.numDocumentedPages()>0)
5136 {
5139 }
5140
5142 if (!Config_getBool(LATEX_HIDE_INDICES))
5143 {
5144 //if (indexedPages>0)
5145 //{
5146 // ol.startIndexSection(isPageIndex);
5147 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5148 // ol.endIndexSection(isPageIndex);
5149 //}
5150 if (index.numDocumentedModules()>0)
5151 {
5153 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5155 }
5156 if (index.numDocumentedGroups()>0)
5157 {
5159 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5161 }
5162 if (index.numDocumentedDirs()>0)
5163 {
5165 ol.parseText(theTranslator->trDirIndex());
5167 }
5168 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5169 {
5170 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5171 if (lne)
5172 {
5174 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5176 }
5177 }
5178 if (index.numDocumentedConcepts()>0)
5179 {
5181 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5183 }
5184 if (index.numHierarchyInterfaces()>0)
5185 {
5187 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5189 }
5190 if (index.numHierarchyClasses()>0)
5191 {
5192 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5193 if (lne)
5194 {
5196 ol.parseText(/*projPrefix+*/
5197 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5198 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5199 theTranslator->trHierarchicalIndex()
5200 ));
5202 }
5203 }
5204 if (index.numHierarchyExceptions()>0)
5205 {
5207 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5209 }
5210 if (index.numAnnotatedInterfacesPrinted()>0)
5211 {
5213 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5215 }
5216 if (index.numAnnotatedClassesPrinted()>0)
5217 {
5219 ol.parseText(/*projPrefix+*/
5220 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5221 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5222 theTranslator->trCompoundIndex()
5223 ));
5225 }
5226 if (index.numAnnotatedStructsPrinted()>0)
5227 {
5229 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5231 }
5232 if (index.numAnnotatedExceptionsPrinted()>0)
5233 {
5235 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5237 }
5238 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5239 {
5241 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5243 }
5244 }
5246
5247 if (index.numDocumentedModules()>0)
5248 {
5250 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5252 }
5253 if (index.numDocumentedGroups()>0)
5254 {
5256 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5258 }
5259 if (index.numDocumentedDirs()>0)
5260 {
5262 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5264 }
5265 if (index.numDocumentedNamespaces()>0)
5266 {
5268 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5270 }
5271 if (index.numDocumentedConcepts()>0)
5272 {
5274 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5276 }
5277 if (index.numAnnotatedInterfacesPrinted()>0)
5278 {
5280 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5282 }
5283 if (index.numAnnotatedClassesPrinted()>0)
5284 {
5286 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5288 }
5289 if (index.numAnnotatedStructsPrinted()>0)
5290 {
5292 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
static const QCString crawlFileName
Definition sitemap.h:75
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:100
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
static void writeIndex(OutputList &ol)
Definition index.cpp:4883
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ 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
@ isClassDocumentation
Definition index.h:49
@ isCompoundIndex
Definition index.h:42
@ 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
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:530
bool mainPageHasTitle()
Definition util.cpp:6302
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4942

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5818 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5296 of file index.cpp.

5296 {
5298 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5300 }
5301 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5302 {
5304 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5306 }
5307 if (!Doxygen::exampleLinkedMap->empty())
5308 {
5310 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5312 }
5314 endFile(ol);
5315
5316 ol.popGeneratorState();
5317}
5318
5319static std::vector<bool> indexWritten;
5320
5321static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5322{
5323 auto isRef = [](const QCString &s)
5324 {
5325 return s.startsWith("@ref") || s.startsWith("\\ref");
5326 };
5327 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5328 const auto &index = Index::instance();
5329 for (const auto &lne : entries)
5330 {
5331 LayoutNavEntry::Kind kind = lne->kind();
5332 size_t idx = static_cast<size_t>(kind);
5333 if (idx>=indexWritten.size())
5334 {
5335 size_t oldSize = indexWritten.size();
5336 size_t newSize = idx+1;
5337 indexWritten.resize(newSize);
5338 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5339 }
5340 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5341 bool addToIndex=lne->visible();
5342 bool needsClosing=FALSE;
5343 if (!indexWritten.at(idx))
5344 {
5345 switch(kind)
5346 {
5347 case LayoutNavEntry::MainPage:
5348 msg("Generating index page...\n");
5349 writeIndex(ol);
5350 break;
5351 case LayoutNavEntry::Pages:
5352 msg("Generating page index...\n");
5353 writePageIndex(ol);
5354 break;
5355 case LayoutNavEntry::Topics:
5356 msg("Generating topic index...\n");
5357 writeTopicIndex(ol);
5358 break;
5359 case LayoutNavEntry::Modules:
5360 {
5361 if (index.numDocumentedModules()>0 && addToIndex)
5362 {
5363 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5364 Doxygen::indexList->incContentsDepth();
5365 needsClosing=TRUE;
5366 }
5367 }
5368 break;
5369 case LayoutNavEntry::ModuleList:
5370 msg("Generating module index...\n");
5371 writeModuleIndex(ol);
5372 break;
5373 case LayoutNavEntry::ModuleMembers:
5374 msg("Generating module member index...\n");
5376 break;
5377 case LayoutNavEntry::Namespaces:
5378 {
5379 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5380 if (showNamespaces)
5381 {
5382 if (index.numDocumentedNamespaces()>0 && addToIndex)
5383 {
5384 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5385 Doxygen::indexList->incContentsDepth();
5386 needsClosing=TRUE;
5387 }
5388 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5389 {
5390 msg("Generating namespace index...\n");
5392 }
5393 }
5394 }
5395 break;
5396 case LayoutNavEntry::NamespaceList:
5397 {
5398 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5399 if (showNamespaces)
5400 {
5401 msg("Generating namespace index...\n");
5403 }
5404 }
5405 break;
5406 case LayoutNavEntry::NamespaceMembers:
5407 msg("Generating namespace member index...\n");
5409 break;
5410 case LayoutNavEntry::Classes:
5411 if (index.numAnnotatedClasses()>0 && addToIndex)
5412 {
5413 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5414 Doxygen::indexList->incContentsDepth();
5415 needsClosing=TRUE;
5416 }
5417 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5418 {
5419 msg("Generating annotated compound index...\n");
5421 }
5422 break;
5423 case LayoutNavEntry::Concepts:
5424 msg("Generating concept index...\n");
5426 break;
5427 case LayoutNavEntry::ClassList:
5428 msg("Generating annotated compound index...\n");
5430 break;
5431 case LayoutNavEntry::ClassIndex:
5432 msg("Generating alphabetical compound index...\n");
5434 break;
5435 case LayoutNavEntry::ClassHierarchy:
5436 msg("Generating hierarchical class index...\n");
5438 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5439 {
5440 msg("Generating graphical class hierarchy...\n");
5442 }
5443 break;
5444 case LayoutNavEntry::ClassMembers:
5445 if (!sliceOpt)
5446 {
5447 msg("Generating member index...\n");
5449 }
5450 break;
5451 case LayoutNavEntry::Interfaces:
5452 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5453 {
5454 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5455 Doxygen::indexList->incContentsDepth();
5456 needsClosing=TRUE;
5457 }
5458 break;
5459 case LayoutNavEntry::InterfaceList:
5460 if (sliceOpt)
5461 {
5462 msg("Generating annotated interface index...\n");
5464 }
5465 break;
5466 case LayoutNavEntry::InterfaceIndex:
5467 if (sliceOpt)
5468 {
5469 msg("Generating alphabetical interface index...\n");
5471 }
5472 break;
5473 case LayoutNavEntry::InterfaceHierarchy:
5474 if (sliceOpt)
5475 {
5476 msg("Generating hierarchical interface index...\n");
5478 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5479 {
5480 msg("Generating graphical interface hierarchy...\n");
5482 }
5483 }
5484 break;
5485 case LayoutNavEntry::Structs:
5486 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5487 {
5488 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5489 Doxygen::indexList->incContentsDepth();
5490 needsClosing=TRUE;
5491 }
5492 break;
5493 case LayoutNavEntry::StructList:
5494 if (sliceOpt)
5495 {
5496 msg("Generating annotated struct index...\n");
5498 }
5499 break;
5500 case LayoutNavEntry::StructIndex:
5501 if (sliceOpt)
5502 {
5503 msg("Generating alphabetical struct index...\n");
5505 }
5506 break;
5507 case LayoutNavEntry::Exceptions:
5508 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5509 {
5510 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5511 Doxygen::indexList->incContentsDepth();
5512 needsClosing=TRUE;
5513 }
5514 break;
5515 case LayoutNavEntry::ExceptionList:
5516 if (sliceOpt)
5517 {
5518 msg("Generating annotated exception index...\n");
5520 }
5521 break;
5522 case LayoutNavEntry::ExceptionIndex:
5523 if (sliceOpt)
5524 {
5525 msg("Generating alphabetical exception index...\n");
5527 }
5528 break;
5529 case LayoutNavEntry::ExceptionHierarchy:
5530 if (sliceOpt)
5531 {
5532 msg("Generating hierarchical exception index...\n");
5534 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5535 {
5536 msg("Generating graphical exception hierarchy...\n");
5538 }
5539 }
5540 break;
5541 case LayoutNavEntry::Files:
5542 {
5543 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5544 {
5545 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5546 Doxygen::indexList->incContentsDepth();
5547 needsClosing=TRUE;
5548 }
5549 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5550 {
5551 msg("Generating file index...\n");
5552 writeFileIndex(ol);
5553 }
5554 }
5555 break;
5556 case LayoutNavEntry::FileList:
5557 msg("Generating file index...\n");
5558 writeFileIndex(ol);
5559 break;
5560 case LayoutNavEntry::FileGlobals:
5561 msg("Generating file member index...\n");
5563 break;
5564 case LayoutNavEntry::Examples:
5565 msg("Generating example index...\n");
5567 break;
5568 case LayoutNavEntry::User:
5569 if (addToIndex)
5570 {
5571 // prepend a ! or ^ marker to the URL to avoid tampering with it
5572 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5573 bool isRelative=url.at(0)=='!';
5574 if (!url.isEmpty() && !isRelative) // absolute URL
5575 {
5576 url.prepend("^"); // prepend ^ to absolute URL
5577 }
5578 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5579 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5580 }
5581 break;
5582 case LayoutNavEntry::UserGroup:
5583 if (addToIndex)
5584 {
5585 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5586 if (!url.isEmpty())
5587 {
5588 if (url=="!") // result of a "[none]" url
5589 {
5590 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5591 }
5592 else
5593 {
5594 bool isRelative=url.at(0)=='!';
5595 if (!isRelative) // absolute URL
5596 {
5597 url.prepend("^"); // prepend ^ to absolute URL
5598 }
5599 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5600 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5601 }
5602 }
5603 else
5604 {
5605 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5606 }
5607 Doxygen::indexList->incContentsDepth();
5608 needsClosing=TRUE;
5609 }
5610 writeUserGroupStubPage(ol,lne.get());
5611 break;
5612 case LayoutNavEntry::None:
5613 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5614 break;
5615 }
5616 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5617 {
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 writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5296
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1239
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2685
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2528
static std::vector< bool > indexWritten
Definition index.cpp:5294
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2657
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1600
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1344
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2441
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2671
static void writePageIndex(OutputList &ol)
Definition index.cpp:4030
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2054
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2699
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1265
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4846
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4424
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3862
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1449
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2470
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2499
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4571
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1370
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3678
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1158
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3494
@ isFileDocumentation
Definition index.h:51
@ isExampleDocumentation
Definition index.h:52
@ isEndIndex
Definition index.h:55
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
Definition layout.h:152
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5943

References OutputList::endIndexSection(), isClassDocumentation, OutputList::parseText(), OutputList::startIndexSection(), and theTranslator.

◆ writeMemberIndex()

void writeMemberIndex ( OutputList & ol,
const Index::MemberIndexMap & map,
QCString fullName,
bool multiPage )
static

Definition at line 3106 of file index.cpp.

3109 {
3110 var item = navItems[i];
3111 var link = item.querySelector('a');
3112 item.classList.remove('current');
3113 if (link && link.getAttribute('href') === currentHash) {
3114 item.classList.add('current');
3115 }
3116 }
3117
3118 if (currentHash) {
3119 var target = document.querySelector(currentHash);
3120 if (target) {
3121 target.scrollIntoView();
3122 }
3123 }
3124}
3125updateNavHighlight();
3126window.addEventListener('hashchange', updateNavHighlight);
3127</script>
3128 )js");
3129}
3130
3131static void writeMemberIndex(OutputList &ol,
3132 const Index::MemberIndexMap &map, QCString fullName,bool multiPage)
3133{
3134 bool first=true;
3135 ol.writeString("<br/>\n");
3136 QCString alphaLinks = "<div class=\"qindex\">";
3137 StringMap usedLetters;
3138 for (const auto &[letter,list] : map)
3139 {
std::map< std::string, std::string > StringMap
Definition containers.h:30

Referenced by writeClassMemberIndex(), and writeModuleMemberIndex().

◆ writeMemberList()

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

Definition at line 2766 of file index.cpp.

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

◆ writeMemberToIndex()

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

Definition at line 470 of file index.cpp.

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

5806 {
5807 auto numDoc = [](std::size_t i) {
5809 };
5810 auto memList = [](std::size_t i) {
5812 };
5813 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5814 }
5815 else // recursive into child list
5816 {
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:134
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:143

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4571 of file index.cpp.

4573{
4574 if (ftv)
4575 {
4576 ol.pushGeneratorState();
4578 }
4579 startIndexHierarchy(ol,0);
4580 for (const auto &mod : ModuleManager::instance().modules())
4581 {
4582 if (mod->isPrimaryInterface())
4583 {
4584 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4585 }
4586 }
4587 endIndexHierarchy(ol,0);
4588 if (ftv)
4589 {
4590 ol.popGeneratorState();
4591 }
4592}
4593
4594//----------------------------------------------------------------------------
4595
4596static void writeModuleIndex(OutputList &ol)
4597{
4598 if (ModuleManager::instance().numDocumentedModules()==0) return;
4599 ol.pushGeneratorState();
4600 // 1.{
4601
4604 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4605 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4606 QCString title = lne ? lne->title() : theTranslator->trModules();
4607 bool addToIndex = lne==nullptr || lne->visible();
4608
4609 startFile(ol,"modules",false,QCString(),title,HighlightedItem::Modules);
4610 startTitle(ol,QCString());
4611 ol.parseText(title);
4612 endTitle(ol,QCString(),QCString());
4613 ol.startContents();
4614 ol.startTextBlock();
4615 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4616 ol.endTextBlock();
4617
4618 // ---------------
4619 // Normal group index for Latex/RTF
4620 // ---------------
4621 // 2.{
4622 ol.pushGeneratorState();
4624 Doxygen::indexList->disable();
4625
4626 writeModuleList(ol,nullptr,FALSE);
4627
4628 Doxygen::indexList->enable();
4629 ol.popGeneratorState();
4630 // 2.}
4631
4632 // ---------------
4633 // interactive group index for HTML
4634 // ---------------
4635 // 2.{
static ModuleManager & instance()
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4493

References OutputList::disable(), endIndexHierarchy(), Html, ModuleManager::instance(), ModuleDef::isPrimaryInterface(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startIndexHierarchy(), and writeModuleTreeNode().

◆ writeModuleLinkForMember()

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

Definition at line 2751 of file index.cpp.

2753{
2754 const ModuleDef *mod=md->getModuleDef();
2755 if (mod && prevModuleName!=mod->displayName())
2756 {
2757 ol.writeString(separator);
2758 // link to the member declaration in the module page
2759 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2760 mod->displayName());
2761 prevModuleName = mod->displayName();
2762 }
2763}
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 4547 of file index.cpp.

4552 {
4553 Doxygen::indexList->incContentsDepth();
4554 }
4555 if (isDir)
4556 {
4557 //ftv->incContentsDepth();
4558 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4559 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4560 writeModuleMembers(mod,addToIndex);
4561 //ftv->decContentsDepth();
4562 }
4563 if (addToIndex && isDir)
4564 {
4565 Doxygen::indexList->decContentsDepth();
4566 }
4567 ol.endIndexListItem();
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1846

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3862 of file index.cpp.

3866 : theTranslator->trModuleMembersDescriptionTotal(hl));
3867 ol.endTextBlock();
3868 if (dynamicMenus || disableIndex)
3869 {
3870 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3871 }
3872
3873 writeMemberList(ol,quickIndex,
3874 multiPageIndex ? letter : std::string(),
3875 index.isModuleIndexLetterUsed(hl),
3877 endFile(ol);
3878 first=FALSE;
3879 }
3880 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3881 ol.popGeneratorState();
3882}
3883

References ModuleMemberHighlight::All, getMmhlInfo(), theTranslator, and writeMemberIndex().

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3730 of file index.cpp.

3733{
3734 MmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3735 const char *fname;
3736 QCString title;
3737};
3738
3739static const MmhlInfo *getMmhlInfo(size_t hl)
3740{
3741 static MmhlInfo nmhlInfo[] =
3742 {
3743 MmhlInfo("modulemembers", theTranslator->trAll()),
3744 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3745 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3746 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3747 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3748 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3749 };
3750 return &nmhlInfo[hl];
3751}
3752
3753//----------------------------------------------------------------------------
3754
3757{
3758 const auto &index = Index::instance();
3759 if (index.numDocumentedModuleMembers(hl)==0) return;
3760
3761 bool disableIndex = Config_getBool(DISABLE_INDEX);
3762 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3763 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3764 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3765 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3766
3767 bool multiPageIndex=FALSE;
3768 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3769 {
3770 multiPageIndex=TRUE;
3771 }
3772
3773 ol.pushGeneratorState();
3775
3777 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3778 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3779 bool addToIndex = lne==nullptr || lne->visible();
3780
3781 if (addToIndex)
3782 {
3783 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3784 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3785 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3786 }
3787
3788 bool first=TRUE;
3789 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3790 {
3791 QCString fileName = getMmhlInfo(hl)->fname;
3792 if (multiPageIndex)
3793 {
3794 QCString cs(letter);
3795 if (!first)
3796 {
3797 fileName+="_"+letterToLabel(cs);
3798 }
3799 if (addToIndex)
3800 {
3801 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3802 }
3803 }
3804
3805 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3806
3807 auto writeQuickLinks = [&,cap_letter=letter]()
3808 {
3810 if (!dynamicMenus)
3811 {
3813
3814 // index item for all namespace member lists
3817 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3819
3820 // index items per category member lists
3821 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3822 {
3823 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3824 {
3826 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3827 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3829 }
3830 }
3831
3833
3834 if (quickIndex)
3835 {
3836 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3837 getMmhlInfo(hl)->fname,multiPageIndex);
3838 }
3839
3840 ol.writeString("</div><!-- main-nav -->\n");
3841 }
3842 };
3843
3844 ol.startFile(fileName+extension,false,QCString(),title);
3845 ol.startQuickIndices();
3846 if (!disableIndex && !quickLinksAfterSplitbar)
3847 {
3848 writeQuickLinks();
3849 }
3850 ol.endQuickIndices();
3851 ol.writeSplitBar(fileName,QCString());
3852 if (quickLinksAfterSplitbar)
3853 {
3854 writeQuickLinks();
3855 if (!dynamicMenus)
3856 {
3857 ol.writeString("<div id=\"container\">\n");
Helper class representing a module member in the navigation menu.
Definition index.cpp:3708
const char * fname
Definition index.cpp:3710

References MmhlInfo::fname, MmhlInfo::MmhlInfo(), and MmhlInfo::title.

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1846 of file index.cpp.

1847{
1848 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1849 {
1850 if (lde->kind()==LayoutDocEntry::MemberDecl)
1851 {
1852 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1853 if (lmd)
1854 {
1855 MemberList *ml = mod->getMemberList(lmd->type);
1856 if (ml)
1857 {
1858 for (const auto &md : *ml)
1859 {
1860 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1861 if (md->visibleInIndex())
1862 {
1863 writeMemberToIndex(mod,md,addToIndex);
1864 }
1865 }
1866 }
1867 }
1868 }
1869 }
1870}
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().

◆ writeModuleTreeNode()

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

Definition at line 4493 of file index.cpp.

4503 {
4504 Doxygen::indexList->decContentsDepth();
4505 }
4506 }
4507 ol.popGeneratorState();
4508 // 2.}
4509
4510 endFile(ol);
4511 ol.popGeneratorState();
4512 // 1.}
4513}
4514
4515
4516//----------------------------------------------------------------------------
4517
4518static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4519 FTVHelp* ftv, bool addToIndex)
4520{
4521 int visibleMembers = mod->countVisibleMembers();
4522 bool isDir=visibleMembers>0;
4523 if (addToIndex)
4524 {
4525 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4526 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4527 }
4528 if (ftv)
4529 {
4530 ftv->addContentsItem(false,mod->name(),
4531 mod->getReference(),mod->getOutputFileBase(),QCString(),
4532 false,false,mod);
4533 }
4534 ol.startIndexListItem();
4536 ol.generateDoc(mod->getDefFileName(),
4537 mod->getDefLine(),
4538 mod,
4539 nullptr,
4540 mod->qualifiedName(),
4541 DocOptions()
4542 .setSingleLine(true)
4543 .setAutolinkSupport(false));
virtual int countVisibleMembers() const =0

References Doxygen::indexList, and TRUE.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2054 of file index.cpp.

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

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

◆ writeNamespaceLinkForMember()

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

Definition at line 2738 of file index.cpp.

2740{
2741 const NamespaceDef *nd=md->getNamespaceDef();
2742 if (nd && prevNamespaceName!=nd->displayName())
2743 {
2744 ol.writeString(separator);
2746 nd->displayName());
2747 prevNamespaceName = nd->displayName();
2748 }
2749}

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

3679 {
3680 ol.writeString("<div id=\"container\">\n");
3681 ol.writeString("<div id=\"doc-content\">\n");
3682 }
3683 }
3684 ol.writeSearchInfo();
3685
3686 ol.startContents();
3687
3688 ol.startTextBlock();
3689 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3690 ol.endTextBlock();
3691
3692 writeMemberList(ol,quickIndex,
3693 multiPageIndex ? letter : std::string(),
3694 index.isNamespaceIndexLetterUsed(hl),
3696 endFile(ol);
3697 first=FALSE;
3698 }
3699 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3700 ol.popGeneratorState();
3701}
3702

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3553 of file index.cpp.

3555{
3556 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3557 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3558 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3559 static NmhlInfo nmhlInfo[] =
3560 {
3561 NmhlInfo("namespacemembers", theTranslator->trAll()),
3562 NmhlInfo("namespacemembers_func",
3563 fortranOpt ? theTranslator->trSubprograms() :
3564 vhdlOpt ? theTranslator->trFunctionAndProc() :
3565 theTranslator->trFunctions()),
3566 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3567 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3568 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3569 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3570 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3571 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3572 };
3573 return &nmhlInfo[hl];
3574}
3575
3576//----------------------------------------------------------------------------
3577
3580{
3581 const auto &index = Index::instance();
3582 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3583
3584 bool disableIndex = Config_getBool(DISABLE_INDEX);
3585 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3586 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3587 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3588 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3589
3590 bool multiPageIndex=FALSE;
3591 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3592 {
3593 multiPageIndex=TRUE;
3594 }
3595
3596 ol.pushGeneratorState();
3598
3600 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3601 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3602 bool addToIndex = lne==nullptr || lne->visible();
3603
3604 if (addToIndex)
3605 {
3606 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3607 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3608 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3609 }
3610
3611 bool first=TRUE;
3612 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3613 {
3614 QCString fileName = getNmhlInfo(hl)->fname;
3615 if (multiPageIndex)
3616 {
3617 QCString cs(letter);
3618 if (!first)
3619 {
3620 fileName+="_"+letterToLabel(cs);
3621 }
3622 if (addToIndex)
3623 {
3624 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3625 }
3626 }
3627
3628 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3629
3630 auto writeQuickLinks = [&,cap_letter=letter]()
3631 {
3633 if (!dynamicMenus)
3634 {
3636
3637 // index item for all namespace member lists
3640 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3642
3643 // index items per category member lists
3644 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3645 {
3646 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3647 {
3649 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3650 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3652 }
3653 }
3654
3656
3657 if (quickIndex)
3658 {
3659 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3660 getNmhlInfo(hl)->fname,multiPageIndex);
3661 }
3662
3663 ol.writeString("</div><!-- main-nav -->\n");
3664 }
3665 };
3666
3667 ol.startFile(fileName+extension,false,QCString(),title);
3668 ol.startQuickIndices();
3669 if (!disableIndex && !quickLinksAfterSplitbar)
3670 {
3671 writeQuickLinks();
3672 }
3673 ol.endQuickIndices();
3674 ol.writeSplitBar(fileName,QCString());
3675 if (quickLinksAfterSplitbar)
3676 {
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3553
@ NamespaceMembers
Definition index.h:78

References Config_getBool, and theTranslator.

◆ writeNamespaceMembers()

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

Definition at line 1820 of file index.cpp.

1821{
1822 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1823 {
1824 if (lde->kind()==LayoutDocEntry::MemberDef)
1825 {
1826 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1827 if (lmd)
1828 {
1829 MemberList *ml = nd->getMemberList(lmd->type);
1830 if (ml)
1831 {
1832 for (const auto &md : *ml)
1833 {
1834 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1835 if (md->visibleInIndex())
1836 {
1837 writeMemberToIndex(nd,md,addToIndex);
1838 }
1839 }
1840 }
1841 }
1842 }
1843 }
1844}
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 1949 of file index.cpp.

1951{
1952 for (const auto &nd : nsLinkedMap)
1953 {
1954 if (nd->isVisibleInHierarchy())
1955 {
1956 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1957 }
1958 }
1959}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1877

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1937 of file index.cpp.

1939{
1940 for (const auto &nd : nsLinkedMap)
1941 {
1942 if (nd->isVisibleInHierarchy())
1943 {
1944 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1945 }
1946 }
1947}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1877 of file index.cpp.

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

4034 {
4035 Doxygen::indexList->incContentsDepth();
4036 }
4037 if (hasSections)
4038 {
4039 pd->addSectionsToIndex();
4040 }
4041 for (const auto &subPage : pd->getSubPages())
4042 {
4043 writePages(subPage,ftv);
4044 }
4045 if (hasSubPages && ftv) ftv->decContentsDepth();
4046 if (doIndent)
4047 {
4048 Doxygen::indexList->decContentsDepth();
4049 }
4050 //printf("end writePages()=%s\n",qPrint(pd->title()));
4051}
4052
4053//----------------------------------------------------------------------------
4054
4055static void writePageIndex(OutputList &ol)
4056{
4057 if (Index::instance().numIndexedPages()==0) return;
4058 ol.pushGeneratorState();
4060 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4061 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
4062 startFile(ol,"pages",false,QCString(),title,HighlightedItem::Pages);
4063 startTitle(ol,QCString());
4064 ol.parseText(title);
4065 endTitle(ol,QCString(),QCString());
4066 ol.startContents();
4067 ol.startTextBlock();
4068 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());

◆ writePages()

void writePages ( PageDef * pd,
FTVHelp * ftv,
bool reuseRoot = false )
static

Definition at line 3970 of file index.cpp.

3978{
3979 docPages=indexPages=0;
3980 for (const auto &pd : *Doxygen::pageLinkedMap)
3981 {
3982 if (pd->visibleInIndex() && !pd->hasParentPage())
3983 {
3984 indexPages++;
3985 }
3986 if (pd->documentedPage())
3987 {
3988 docPages++;
3989 }
3990 }
3991}
3992
3993//----------------------------------------------------------------------------
3994
3995static void writePages(PageDef *pd,FTVHelp *ftv,bool reuseRoot = false)
3996{
3997 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3998 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3999 bool addToIndex = lne==nullptr || lne->visible();
4000 if (!addToIndex) return;
4001
4002 bool hasSubPages = pd->hasSubPages();
4003 bool hasSections = pd->hasSections();
4004
4005 if (pd->visibleInIndex())
4006 {
4007 QCString pageTitle, pageTitleAsHtml;
4008
4009 if (pd->title().isEmpty())
4010 pageTitle=pd->name();
4011 else
4012 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4013 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4014
4015 if (ftv)
4016 {
4017 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4018 ftv->addContentsItem(
4019 hasSubPages,pageTitle,
4020 pd->getReference(),pd->getOutputFileBase(),
4021 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
4022 }
4023 if (addToIndex && pd!=Doxygen::mainPage.get())
4024 {
4025 Doxygen::indexList->addContentsItem(
4026 hasSubPages || hasSections,pageTitle,
virtual bool hasSections() const =0
A model of a page symbol.
Definition pagedef.h:26
virtual bool documentedPage() const =0
virtual bool hasParentPage() const =0
virtual bool visibleInIndex() const =0
virtual bool hasSubPages() const =0
virtual QCString title() const =0

◆ writeQuickMemberIndex()

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

Definition at line 3079 of file index.cpp.

3082{
3083 bool first=TRUE;
3085 for (const auto &[letter,list] : map)
3086 {
3087 QCString ci(letter);
3088 QCString is = letterToLabel(ci);
3089 QCString anchor;
3091 if (!multiPage)
3092 anchor="#index_";
3093 else if (first)
3094 anchor=fullName+extension+"#index_";
3095 else
3096 anchor=fullName+"_"+is+extension+"#index_";
3097 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3098 ol.writeString(ci);
3100 first=FALSE;
3101 }
3103 ol.writeString(R"js(
3104<script type="text/javascript">

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

◆ writeSingleFileIndex()

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

Definition at line 1497 of file index.cpp.

1498{
1499 //printf("Found filedef %s\n",qPrint(fd->name()));
1500 bool doc = fd->isLinkableInProject();
1501 bool src = fd->generateSourceFile();
1502 bool nameOk = !fd->isDocumentationFile();
1503 if (nameOk && (doc || src) && !fd->isReference())
1504 {
1505 QCString path;
1506 if (Config_getBool(FULL_PATH_NAMES))
1507 {
1508 path=stripFromPath(fd->getPath());
1509 }
1510 QCString fullName=fd->name();
1511 if (!path.isEmpty())
1512 {
1513 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1514 fullName.prepend(path);
1515 }
1516
1517 ol.startIndexKey();
1518 ol.docify(path);
1519 if (doc)
1520 {
1522 //if (addToIndex)
1523 //{
1524 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1525 //}
1526 }
1527 else if (src)
1528 {
1530 }
1531 if (doc && src)
1532 {
1533 ol.pushGeneratorState();
1535 ol.docify(" ");
1537 ol.docify("[");
1538 ol.parseText(theTranslator->trCode());
1539 ol.docify("]");
1540 ol.endTextLink();
1541 ol.popGeneratorState();
1542 }
1543 ol.endIndexKey();
1544 bool hasBrief = !fd->briefDescription().isEmpty();
1545 ol.startIndexValue(hasBrief);
1546 if (hasBrief)
1547 {
1548 ol.generateDoc(fd->briefFile(),
1549 fd->briefLine(),
1550 fd,
1551 nullptr,
1552 fd->briefDescription(true),
1553 DocOptions()
1554 .setSingleLine(true)
1555 .setLinkFromIndex(true));
1556 }
1557 if (doc)
1558 {
1559 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1560 }
1561 else // src
1562 {
1563 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1564 }
1565 //ol.popGeneratorState();
1566 // --------------------------------------------------------
1567 }
1568}
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:298

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

4426{
4427 if (ftv)
4428 {
4429 ol.pushGeneratorState();
4431 }
4432 startIndexHierarchy(ol,0);
4433 for (const auto &gd : *Doxygen::groupLinkedMap)
4434 {
4435 if (gd->isVisibleInHierarchy())
4436 {
4437 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4438 }
4439 }
4440 endIndexHierarchy(ol,0);
4441 if (ftv)
4442 {
4443 ol.popGeneratorState();
4444 }
4445}
4446
4447//----------------------------------------------------------------------------
4448
4449static void writeTopicIndex(OutputList &ol)
4450{
4451 if (Index::instance().numDocumentedGroups()==0) return;
4452 ol.pushGeneratorState();
4453 // 1.{
4456 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4457 QCString title = lne ? lne->title() : theTranslator->trTopics();
4458 bool addToIndex = lne==nullptr || lne->visible();
4459
4460 startFile(ol,"topics",false,QCString(),title,HighlightedItem::Topics);
4461 startTitle(ol,QCString());
4462 ol.parseText(title);
4463 endTitle(ol,QCString(),QCString());
4464 ol.startContents();
4465 ol.startTextBlock();
4466 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4467 ol.endTextBlock();
4468
4469 // ---------------
4470 // Normal group index for Latex/RTF
4471 // ---------------
4472 // 2.{
4473 ol.pushGeneratorState();
4475 Doxygen::indexList->disable();
4476
4477 writeGroupHierarchy(ol,nullptr,FALSE);
4478
4479 Doxygen::indexList->enable();
4480 ol.popGeneratorState();
4481 // 2.}
4482
4483 // ---------------
4484 // interactive group index for HTML
4485 // ---------------
4486 // 2.{
4487 ol.pushGeneratorState();
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4400

References OutputList::disable(), endIndexHierarchy(), Doxygen::groupLinkedMap, Html, GroupDef::isVisibleInHierarchy(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startIndexHierarchy(), and writeGroupTreeNode().

◆ writeUserGroupStubPage()

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

Definition at line 4846 of file index.cpp.

4849 {
4850 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4851 }
4852 writeConceptRootList(&ftv,addToIndex);
4853 TextStream t;
4854 ftv.generateTreeViewInline(t);
4855 ol.writeString(t.str());
4856 if (addToIndex)
4857 {
4858 Doxygen::indexList->decContentsDepth();
4859 }
4860 }
4861 ol.popGeneratorState();
4862 // 2.}
4863
4864 endFile(ol);
4865 ol.popGeneratorState();
4866 // 1.}
4867}
4868
4869//----------------------------------------------------------------------------
4870
4872{
4873 if (lne->baseFile().startsWith("usergroup"))
4874 {
4875 ol.pushGeneratorState();
4878 startTitle(ol,QCString());
bool startsWith(const char *s) const
Definition qcstring.h:507
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4723
QCString baseFile() const
Definition layout.h:214

Variable Documentation

◆ alphaSepar

auto alphaSepar = "<div class=\"alphasepar\"></div>"
constexpr

Definition at line 58 of file index.cpp.

Referenced by getCmhlInfo(), and writeAlphabeticalClassList().

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5294 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 343 of file index.cpp.