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 bool mainPageHasOwnTitle ()
static void writePages (PageDef *pd, FTVHelp *ftv)
static void writePageIndex (OutputList &ol)
void writeGraphInfo (OutputList &ol)
static void writeGroupTreeNode (OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
static void writeGroupHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeTopicIndex (OutputList &ol)
static void writeModuleTreeNode (OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
static void writeModuleList (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeModuleIndex (OutputList &ol)
static void writeConceptTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptRootList (FTVHelp *ftv, bool addToIndex)
static void writeConceptIndex (OutputList &ol)
static void writeUserGroupStubPage (OutputList &ol, LayoutNavEntry *lne)
static void writeIndex (OutputList &ol)
static void writeIndexHierarchyEntries (OutputList &ol, const LayoutNavEntryList &entries)
static bool quickLinkVisible (LayoutNavEntry::Kind kind)
template<class T>
void renderMemberIndicesAsJs (std::ostream &t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*getInfo)(size_t hl), std::size_t total)
static bool renderQuickLinksAsJs (std::ostream &t, LayoutNavEntry *root, bool first)
static void writeMenuData ()
void writeIndexHierarchy (OutputList &ol)

Variables

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

Detailed Description

This file contains functions for the various index pages.

Definition in file index.cpp.

Macro Definition Documentation

◆ MAX_ITEMS_BEFORE_MULTIPAGE_INDEX

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

Function Documentation

◆ addMembersToIndex()

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

Definition at line 527 of file index.cpp.

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

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

2154{
2155 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2156 int count=0;
2157 int countPrinted=0;
2158 for (const auto &cd : *Doxygen::classLinkedMap)
2159 {
2160 if (sliceOpt && cd->compoundType() != ct)
2161 {
2162 continue;
2163 }
2164 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2165 {
2166 if (!cd->isEmbeddedInOuterScope())
2167 {
2168 countPrinted++;
2169 }
2170 count++;
2171 }
2172 }
2173 *cp = countPrinted;
2174 return count;
2175}
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 1122 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1146 of file index.cpp.

1147{
1148 int count=0;
1151 return count;
1152}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1122

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1737 of file index.cpp.

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

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4093 of file index.cpp.

4103{
4104 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1473 of file index.cpp.

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

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4077 of file index.cpp.

4079 {
4080 if ((pd->getOuterScope()==nullptr ||
4081 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4082 pd->visibleInIndex()
4083 )
4084 {
4085 writePages(pd.get(),&ftv);
4086 }
4087 }
4088 TextStream t;
4089 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)
Definition index.cpp:3974

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

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1726 of file index.cpp.

1727{
1728 int count=0;
1729 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1730 {
1731 if (nd->isLinkableInProject()) count++;
1732 }
1733 return count;
1734}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:114

References Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3945 of file index.cpp.

3947 {
3948 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3949 if (addToIndex)
3950 {
3951 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3952 }
3953 }
3954 ol.endItemListItem();
3955 //ol.writeString("\n");
3956 }
3957 ol.endItemList();
3958
3959 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 736 of file index.cpp.

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

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

Referenced by dirHasVisibleChildren(), and writeDirTreeNode().

◆ endFile()

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

Definition at line 427 of file index.cpp.

429{
430 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
433 if (!skipNavIndex)
434 {
435 if (!skipEndContents) ol.endContents();
436 if (generateTreeView)
437 {
438 ol.writeString("</div><!-- doc-content -->\n");
439 ol.writeString("</div><!-- container -->\n");
440 }
441 }
442
443 ol.writeFooter(navPath); // write the footer
445 ol.endFile();
446}
void writeString(const QCString &text)
Definition outputlist.h:411
void endContents()
Definition outputlist.h:620
void endFile()
Definition outputlist.h:401
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void writeFooter(const QCString &navPath)
Definition outputlist.h:399

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

Referenced by endFileWithNavPath(), generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), 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 448 of file index.cpp.

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

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

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

◆ endIndexHierarchy()

◆ endQuickIndexItem()

void endQuickIndexItem ( OutputList & ol)
static

Definition at line 377 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 358 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1750 of file index.cpp.

1750{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1751 of file index.cpp.

1751{ 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 3144 of file index.cpp.

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

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3336 of file index.cpp.

3345 {
3346 Doxygen::indexList->decContentsDepth();
3347 }
3348
3349}
3350
3351//----------------------------------------------------------------------------
3352
3353/** Helper class representing a file member in the navigation menu. */
3354struct FmhlInfo
3355{
3356 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3357 const char *fname;
Helper class representing a file member in the navigation menu.
Definition index.cpp:3330
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3331
const char * fname
Definition index.cpp:3332
QCString title
Definition index.cpp:3333

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

3531 {
3532 Doxygen::indexList->decContentsDepth();
3533 }
3534
3535}
3536
3537//----------------------------------------------------------------------------
3538
3539/** Helper class representing a namespace member in the navigation menu. */
3540struct NmhlInfo
3541{
3542 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3516
const char * fname
Definition index.cpp:3518
QCString title
Definition index.cpp:3519
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3517

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

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

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2254 of file index.cpp.

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

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

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

◆ mainPageHasOwnTitle()

bool mainPageHasOwnTitle ( )
static

Definition at line 3963 of file index.cpp.

3971{
3972 docPages=indexPages=0;

◆ MemberIndexMap_add()

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

Definition at line 180 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5624 of file index.cpp.

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

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5732 of file index.cpp.

5742 {text:\"" << convertToJSString(ci) << "\",url:\""
5743 << convertToJSString(anchor+convertToId(is)) << "\"}";
5744 firstLetter=FALSE;
5745 }
5746 t << "]";
5747 }
5748 t << "}";
5749 }
5750 }
5751 if (!firstMember)
5752 {
5753 t << "]";
5754 }
5755}
5756
5757static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5758{
5759 int count=0;
5760 for (const auto &entry : root->children())
5761 {
5762 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5763 }
5764 if (count>0) // at least one item is visible
5765 {
5766 bool firstChild = TRUE;
5767 if (!first) t << ",";
5768 t << "children:[\n";
5769 for (const auto &entry : root->children())
5770 {
5771 if (entry->visible() && quickLinkVisible(entry->kind()))
5772 {
5773 if (!firstChild) t << ",\n";
5774 firstChild=FALSE;
5775 QCString url = entry->url();
5776 if (isURL(url)) url = "^" + url;
5777 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5778 << convertToJSString(url) << "\"";
5779 bool hasChildren=FALSE;
5780 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5781 {
5782 auto numDoc = [](std::size_t i) {
5784 };
5785 auto memList = [](std::size_t i) {
5787 };
5788 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5789 }
5790 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5791 {
5792 auto numDoc = [](std::size_t i) {
5794 };
5795 auto memList = [](std::size_t i) {
5797 };
5798 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5799 }
5800 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5801 {
5802 auto numDoc = [](std::size_t i) {
5804 };
5805 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:131
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:134
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:133
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:151
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:146
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2805
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5732
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3707
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3522
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:5915
QCString convertToId(const QCString &s)
Definition util.cpp:3855

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

404{
405 bool disableIndex = Config_getBool(DISABLE_INDEX);
406 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
407 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
408 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
409 ol.startFile(name,isSource,manName,title,hierarchyLevel);
411 if (!disableIndex && !quickLinksAfterSplitbar)
412 {
413 ol.writeQuickLinks(hli,name);
414 }
415 if (!additionalIndices)
416 {
417 ol.endQuickIndices();
418 }
419 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
420 if (quickLinksAfterSplitbar)
421 {
422 ol.writeQuickLinks(hli,name);
423 }
424 ol.writeSearchInfo();
425}
void writeSearchInfo()
Definition outputlist.h:397
void startQuickIndices()
Definition outputlist.h:602
void startFile(const QCString &name, bool isSource, const QCString &manName, const QCString &title, int hierarchyLevel=0)
void endQuickIndices()
Definition outputlist.h:604
void writeSplitBar(const QCString &name, const QCString &allMembersFile)
Definition outputlist.h:606
void writeQuickLinks(HighlightedItem hli, const QCString &file, bool extraTabs=false)
Definition outputlist.h:612

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

Referenced by generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), 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 364 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 345 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 384 of file index.cpp.

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

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

Referenced by generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), 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 2283 of file index.cpp.

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

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

Referenced by writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), and writeAlphabeticalStructIndex().

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2526 of file index.cpp.

2527{
2528 if (Index::instance().numAnnotatedExceptions()==0) return;
2529 ol.pushGeneratorState();
2531 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2532 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2533 bool addToIndex = lne==nullptr || lne->visible();
2534
2535 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2536
2537 startTitle(ol,QCString());
2538 ol.parseText(title);
2539 endTitle(ol,QCString(),QCString());
2540
2541 if (addToIndex)
2542 {
2543 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2544 }
2545
2546 ol.startContents();
2547 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2548 endFile(ol); // contains ol.endContents()
2549
2550 ol.popGeneratorState();
2551}
@ Exception
Definition classdef.h:115
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1448
void startContents()
Definition outputlist.h:618
void parseText(const QCString &textStr)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
void startFile(OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:401
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2283
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 2439 of file index.cpp.

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

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

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

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

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

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

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

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

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2655 of file index.cpp.

2656{
2657 const auto &index = Index::instance();
2659 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2660 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2661 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2663 "annotated",
2665}
@ 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 2580 of file index.cpp.

2581{
2582 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2583 // annotatedClasses,annotatedClassesPrinted);
2584 if (ctx.numAnnotated==0) return;
2585
2586 ol.pushGeneratorState();
2588 if (ctx.numPrinted==0)
2589 {
2592 }
2594 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2595 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2596 bool addToIndex = lne==nullptr || lne->visible();
2597
2598 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2599
2600 startTitle(ol,QCString());
2601 ol.parseText(title);
2602 endTitle(ol,QCString(),QCString());
2603
2604 ol.startContents();
2605
2606 ol.startTextBlock();
2607 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2608 ol.endTextBlock();
2609
2610 // ---------------
2611 // Linear class index for Latex/RTF
2612 // ---------------
2613 ol.pushGeneratorState();
2615 Doxygen::indexList->disable();
2616
2618
2619 Doxygen::indexList->enable();
2620 ol.popGeneratorState();
2621
2622 // ---------------
2623 // Hierarchical class index for HTML
2624 // ---------------
2625 ol.pushGeneratorState();
2627
2628 {
2629 if (addToIndex)
2630 {
2631 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2632 Doxygen::indexList->incContentsDepth();
2633 }
2634 FTVHelp ftv(false);
2637 TextStream t;
2638 ftv.generateTreeViewInline(t);
2639 ol.writeString(t.str());
2640 if (addToIndex)
2641 {
2642 Doxygen::indexList->decContentsDepth();
2643 }
2644 }
2645
2646 ol.popGeneratorState();
2647 // ------
2648
2649 endFile(ol); // contains ol.endContents()
2650 ol.popGeneratorState();
2651}
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:2178
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2034
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1754
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2572
const ClassDef::CompoundType compoundType
Definition index.cpp:2575
const HighlightedItem hiItem
Definition index.cpp:2577
const QCString fileBaseName
Definition index.cpp:2576
const LayoutNavEntry::Kind listKind
Definition index.cpp:2571
const QCString listDefaultTitleText
Definition index.cpp:2573
const int numAnnotated
Definition index.cpp:2569
const QCString listDefaultIntroText
Definition index.cpp:2574
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 2669 of file index.cpp.

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

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

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2683 of file index.cpp.

2684{
2685 const auto &index = Index::instance();
2687 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2688 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2689 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2691 "annotatedstructs",
2693}
@ 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 1095 of file index.cpp.

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

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

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

3304 : theTranslator->trCompoundMembersDescriptionTotal(hl));
3305 ol.endTextBlock();
3306 if (dynamicMenus || disableIndex)
3307 {
3308 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3309 }
3310
3311 writeMemberList(ol,quickIndex,
3312 multiPageIndex ? letter : std::string(),
3313 index.isClassIndexLetterUsed(hl),
3315 endFile(ol);
3316 first=FALSE;
3317 }
3318
3319 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3320
3321 ol.popGeneratorState();
3322}
3323
3324static 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:3299
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, QCString fullName, bool multiPage)
Definition index.cpp:3104
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3144
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2764

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3166 of file index.cpp.

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

◆ writeClassTree()

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

Definition at line 1754 of file index.cpp.

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

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

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

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2034 of file index.cpp.

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

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

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

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

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

◆ writeConceptList()

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

Definition at line 4644 of file index.cpp.

4644 {
4645 if (addToIndex)
4646 {
4647 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4648 Doxygen::indexList->incContentsDepth();
4649 }
4650 FTVHelp ftv(false);
4651 writeModuleList(ol,&ftv,addToIndex);
4652 TextStream t;
4654 ol.writeString(t.str());
4655 if (addToIndex)
4656 {
4657 Doxygen::indexList->decContentsDepth();
4658 }
4659 }
4660 ol.popGeneratorState();
4661 // 2.}
4662 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:881
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4552

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

4736 {
4737 Doxygen::indexList->incContentsDepth();
4738 }
4739
4740 ftv->incContentsDepth();
4741 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex);
4742 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4743 ftv->decContentsDepth();
4744
4745 if (addToIndex)
4746 {
4747 Doxygen::indexList->decContentsDepth();
4748 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4667
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4644

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4667 of file index.cpp.

4670{
4671 for (const auto &cd : concepts)
4672 {
4673 if (cd->isLinkableInProject())
4674 {

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4677 of file index.cpp.

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

References FALSE.

◆ writeDirHierarchy()

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

Definition at line 922 of file index.cpp.

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

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

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

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

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

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

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

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

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

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

3494 : theTranslator->trFileMembersDescriptionTotal(hl));
3495 ol.endTextBlock();
3496 if (dynamicMenus || disableIndex)
3497 {
3498 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3499 }
3500
3501 writeMemberList(ol,quickIndex,
3502 multiPageIndex ? letter : std::string(),
3503 index.isFileIndexLetterUsed(hl),
3505 endFile(ol);
3506 first=FALSE;
3507 }
3508 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3509 ol.popGeneratorState();
3510}
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3336

◆ writeFileMemberIndexFiltered()

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

Definition at line 3359 of file index.cpp.

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

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1237 of file index.cpp.

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

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

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

4119{
4120 int count=0;
4121 for (const auto &dd : *Doxygen::dirLinkedMap)
4122 {
4123 if (dd->isLinkableInProject())
4124 {
4125 count++;
4126 }
4127 }
4128 return count;
4129}
4130
4131
4132//----------------------------------------------------------------------------
4133
4134void writeGraphInfo(OutputList &ol)
4135{
4136 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4137 ol.pushGeneratorState();
4139
4140 DotLegendGraph gd;
4141 gd.writeGraph(Config_getString(HTML_OUTPUT));
4142
4143 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4144 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4145 // temporarily disable the stripping of comments for our own code example!
4146 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4147 // temporarily disable create subdirs for linking to our example
4148 Config_updateBool(CREATE_SUBDIRS,FALSE);
4149
4150 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4151 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:4109

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4405 of file index.cpp.

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

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

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

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

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1368 of file index.cpp.

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

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

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

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

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

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

4888 : lne->children())
4889 {
4890 if (entry->visible()) count++;
4891 }
4892 if (count>0)
4893 {
4894 ol.writeString("<ul>\n");
4895 for (const auto &entry: lne->children())
4896 {
4897 if (entry->visible())
4898 {
4899 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4900 fixSpaces(entry->title())+"</span></a></li>\n");
4901 }
4902 }
4903 ol.writeString("</ul>\n");
4904 }
4905 endFile(ol);
4906 ol.popGeneratorState();
4907 }
4908}
4909
4910//----------------------------------------------------------------------------
4911
4912
4913static void writeIndex(OutputList &ol)
4914{
4915 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4916 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4917 bool disableIndex = Config_getBool(DISABLE_INDEX);
4918 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4919 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4920 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4921 QCString projectName = Config_getString(PROJECT_NAME);
4922 // save old generator state
4923 ol.pushGeneratorState();
4924
4925 QCString projPrefix;
4926 if (!projectName.isEmpty())
4927 {
4928 projPrefix=projectName+" ";
4929 }
4930
4931 //--------------------------------------------------------------------
4932 // write HTML index
4933 //--------------------------------------------------------------------
4935
4936 QCString defFileName =
4937 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4938 int defLine =
4939 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4940
4941 QCString title, titleAsHtml;
4942 if (!mainPageHasTitle())
4943 {
4944 title = theTranslator->trMainPage();
4945 }
4946 else if (Doxygen::mainPage)
4947 {
4948 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4949 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4950 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4951 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4952 }
4953
4954 QCString indexName="index";
4955 ol.startFile(indexName,false,QCString(),title);
4956
4958 {
4959 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4960 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4961 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4962 if (hasTitle) // to avoid duplicate entries in the treeview
4963 {
4964 Doxygen::indexList->addContentsItem(hasSubs,
4965 title,
4966 QCString(),
4967 indexName,
4968 QCString(),
4969 hasSubs,
4970 TRUE,
4971 nullptr,
4972 titleAsHtml);
4973 }
4974 if (hasSubs)
4975 {
4976 writePages(Doxygen::mainPage.get(),nullptr);
4977 }
4978 }
4979
4980 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4981 ol.startQuickIndices();
4982 if (!disableIndex && !quickLinksAfterSplitbar)
4983 {
4985 }
4986 ol.endQuickIndices();
4987 ol.writeSplitBar(indexName,QCString());
4988 if (quickLinksAfterSplitbar)
4989 {
4991 }
4992 ol.writeSearchInfo();
4993 bool headerWritten=FALSE;
4995 {
4996 if (!Doxygen::mainPage->title().isEmpty())
4997 {
4998 if (Doxygen::mainPage->title().lower() != "notitle")
4999 ol.startPageDoc(Doxygen::mainPage->title());
5000 else
5001 ol.startPageDoc("");
5002 }
5003 else
5004 ol.startPageDoc(projectName);
5005 }
5006 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
5007 {
5008 if (Doxygen::mainPage->title().lower()!="notitle")
5009 {
5010 ol.startHeaderSection();
5012 ol.generateDoc(Doxygen::mainPage->docFile(),
5013 Doxygen::mainPage->getStartBodyLine(),
5014 Doxygen::mainPage.get(),
5015 nullptr,
5016 Doxygen::mainPage->title(),
5017 DocOptions()
5018 .setSingleLine(true));
5019 headerWritten = TRUE;
5020 }
5021 }
5022 else
5023 {
5024 if (!projectName.isEmpty())
5025 {
5026 ol.startHeaderSection();
5028 ol.parseText(theTranslator->trDocumentation(projectName));
5029 headerWritten = TRUE;
5030 }
5031 }
5032 if (headerWritten)
5033 {
5035 ol.endHeaderSection();
5036 }
5037
5038 ol.startContents();
5039 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5040 {
5042 }
5043
5045 {
5046 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5047 {
5048 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5049 }
5050
5051 ol.startTextBlock();
5052 ol.generateDoc(defFileName,
5053 defLine,
5054 Doxygen::mainPage.get(),
5055 nullptr,
5056 Doxygen::mainPage->documentation(),
5057 DocOptions()
5058 .setIndexWords(true));
5059 ol.endTextBlock();
5060 ol.endPageDoc();
5061 }
5062
5065 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5066 Doxygen::indexList->addIndexFile(fn);
5067
5068 if (Doxygen::mainPage &&
5069 generateTreeView &&
5070 pageOutlinePanel &&
5071 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5072 Doxygen::mainPage->hasSections()
5073 )
5074 {
5075 ol.writeString("</div><!-- doc-content -->\n");
5076 ol.endContents();
5077 Doxygen::mainPage->writePageNavigation(ol);
5078 ol.writeString("</div><!-- container -->\n");
5079 endFile(ol,true,true);
5080 }
5081 else
5082 {
5083 endFile(ol);
5084 }
5085
5087
5088 //--------------------------------------------------------------------
5089 // write LaTeX/RTF index
5090 //--------------------------------------------------------------------
5094
5096 {
5097 msg("Generating main page...\n");
5098 Doxygen::mainPage->writeDocumentation(ol);
5099 }
5100
5101 ol.startFile("refman",false,QCString(),QCString());
5105
5106 if (projPrefix.isEmpty())
5107 {
5108 ol.parseText(theTranslator->trReferenceManual());
5109 }
5110 else
5111 {
5112 ol.parseText(projPrefix);
5113 }
5114
5115 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5116 {
5117 ol.startProjectNumber();
5118 ol.generateDoc(defFileName,
5119 defLine,
5120 Doxygen::mainPage.get(),
5121 nullptr,
5122 Config_getString(PROJECT_NUMBER),
5123 DocOptions());
5124 ol.endProjectNumber();
5125 }
5128 ol.parseText(theTranslator->trGeneratedBy());
5132
5133 ol.lastIndexPage();
5135 {
5138 }
5139 const auto &index = Index::instance();
5140 if (index.numDocumentedPages()>0)
5141 {
5144 }
5145
5147 if (!Config_getBool(LATEX_HIDE_INDICES))
5148 {
5149 //if (indexedPages>0)
5150 //{
5151 // ol.startIndexSection(isPageIndex);
5152 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5153 // ol.endIndexSection(isPageIndex);
5154 //}
5155 if (index.numDocumentedModules()>0)
5156 {
5158 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5160 }
5161 if (index.numDocumentedGroups()>0)
5162 {
5164 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5166 }
5167 if (index.numDocumentedDirs()>0)
5168 {
5170 ol.parseText(theTranslator->trDirIndex());
5172 }
5173 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5174 {
5175 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5176 if (lne)
5177 {
5179 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5181 }
5182 }
5183 if (index.numDocumentedConcepts()>0)
5184 {
5186 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5188 }
5189 if (index.numHierarchyInterfaces()>0)
5190 {
5192 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5194 }
5195 if (index.numHierarchyClasses()>0)
5196 {
5197 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5198 if (lne)
5199 {
5201 ol.parseText(/*projPrefix+*/
5202 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5203 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5204 theTranslator->trHierarchicalIndex()
5205 ));
5207 }
5208 }
5209 if (index.numHierarchyExceptions()>0)
5210 {
5212 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5214 }
5215 if (index.numAnnotatedInterfacesPrinted()>0)
5216 {
5218 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5220 }
5221 if (index.numAnnotatedClassesPrinted()>0)
5222 {
5224 ol.parseText(/*projPrefix+*/
5225 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5226 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5227 theTranslator->trCompoundIndex()
5228 ));
5230 }
5231 if (index.numAnnotatedStructsPrinted()>0)
5232 {
5234 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5236 }
5237 if (index.numAnnotatedExceptionsPrinted()>0)
5238 {
5240 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5242 }
5243 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5244 {
5246 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5248 }
5249 }
5251
5252 if (index.numDocumentedModules()>0)
5253 {
5255 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5257 }
5258 if (index.numDocumentedGroups()>0)
5259 {
5261 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5263 }
5264 if (index.numDocumentedDirs()>0)
5265 {
5267 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5269 }
5270 if (index.numDocumentedNamespaces()>0)
5271 {
5273 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5275 }
5276 if (index.numDocumentedConcepts()>0)
5277 {
5279 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5281 }
5282 if (index.numAnnotatedInterfacesPrinted()>0)
5283 {
5285 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5287 }
5288 if (index.numAnnotatedClassesPrinted()>0)
5289 {
5291 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5293 }
5294 if (index.numAnnotatedStructsPrinted()>0)
5295 {
5297 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:4888
@ 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:6286
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4904

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5823 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5301 of file index.cpp.

5301 {
5303 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5305 }
5306 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5307 {
5309 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5311 }
5312 if (!Doxygen::exampleLinkedMap->empty())
5313 {
5315 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5317 }
5319 endFile(ol);
5320
5321 ol.popGeneratorState();
5322}
5323
5324static std::vector<bool> indexWritten;
5325
5326static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5327{
5328 auto isRef = [](const QCString &s)
5329 {
5330 return s.startsWith("@ref") || s.startsWith("\\ref");
5331 };
5332 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5333 const auto &index = Index::instance();
5334 for (const auto &lne : entries)
5335 {
5336 LayoutNavEntry::Kind kind = lne->kind();
5337 size_t idx = static_cast<size_t>(kind);
5338 if (idx>=indexWritten.size())
5339 {
5340 size_t oldSize = indexWritten.size();
5341 size_t newSize = idx+1;
5342 indexWritten.resize(newSize);
5343 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5344 }
5345 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5346 bool addToIndex=lne->visible();
5347 bool needsClosing=FALSE;
5348 if (!indexWritten.at(idx))
5349 {
5350 switch(kind)
5351 {
5352 case LayoutNavEntry::MainPage:
5353 msg("Generating index page...\n");
5354 writeIndex(ol);
5355 break;
5356 case LayoutNavEntry::Pages:
5357 msg("Generating page index...\n");
5358 writePageIndex(ol);
5359 break;
5360 case LayoutNavEntry::Topics:
5361 msg("Generating topic index...\n");
5362 writeTopicIndex(ol);
5363 break;
5364 case LayoutNavEntry::Modules:
5365 {
5366 if (index.numDocumentedModules()>0 && addToIndex)
5367 {
5368 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5369 Doxygen::indexList->incContentsDepth();
5370 needsClosing=TRUE;
5371 }
5372 }
5373 break;
5374 case LayoutNavEntry::ModuleList:
5375 msg("Generating module index...\n");
5376 writeModuleIndex(ol);
5377 break;
5378 case LayoutNavEntry::ModuleMembers:
5379 msg("Generating module member index...\n");
5381 break;
5382 case LayoutNavEntry::Namespaces:
5383 {
5384 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5385 if (showNamespaces)
5386 {
5387 if (index.numDocumentedNamespaces()>0 && addToIndex)
5388 {
5389 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5390 Doxygen::indexList->incContentsDepth();
5391 needsClosing=TRUE;
5392 }
5393 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5394 {
5395 msg("Generating namespace index...\n");
5397 }
5398 }
5399 }
5400 break;
5401 case LayoutNavEntry::NamespaceList:
5402 {
5403 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5404 if (showNamespaces)
5405 {
5406 msg("Generating namespace index...\n");
5408 }
5409 }
5410 break;
5411 case LayoutNavEntry::NamespaceMembers:
5412 msg("Generating namespace member index...\n");
5414 break;
5415 case LayoutNavEntry::Classes:
5416 if (index.numAnnotatedClasses()>0 && addToIndex)
5417 {
5418 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5419 Doxygen::indexList->incContentsDepth();
5420 needsClosing=TRUE;
5421 }
5422 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5423 {
5424 msg("Generating annotated compound index...\n");
5426 }
5427 break;
5428 case LayoutNavEntry::Concepts:
5429 msg("Generating concept index...\n");
5431 break;
5432 case LayoutNavEntry::ClassList:
5433 msg("Generating annotated compound index...\n");
5435 break;
5436 case LayoutNavEntry::ClassIndex:
5437 msg("Generating alphabetical compound index...\n");
5439 break;
5440 case LayoutNavEntry::ClassHierarchy:
5441 msg("Generating hierarchical class index...\n");
5443 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5444 {
5445 msg("Generating graphical class hierarchy...\n");
5447 }
5448 break;
5449 case LayoutNavEntry::ClassMembers:
5450 if (!sliceOpt)
5451 {
5452 msg("Generating member index...\n");
5454 }
5455 break;
5456 case LayoutNavEntry::Interfaces:
5457 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5458 {
5459 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5460 Doxygen::indexList->incContentsDepth();
5461 needsClosing=TRUE;
5462 }
5463 break;
5464 case LayoutNavEntry::InterfaceList:
5465 if (sliceOpt)
5466 {
5467 msg("Generating annotated interface index...\n");
5469 }
5470 break;
5471 case LayoutNavEntry::InterfaceIndex:
5472 if (sliceOpt)
5473 {
5474 msg("Generating alphabetical interface index...\n");
5476 }
5477 break;
5478 case LayoutNavEntry::InterfaceHierarchy:
5479 if (sliceOpt)
5480 {
5481 msg("Generating hierarchical interface index...\n");
5483 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5484 {
5485 msg("Generating graphical interface hierarchy...\n");
5487 }
5488 }
5489 break;
5490 case LayoutNavEntry::Structs:
5491 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5492 {
5493 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5494 Doxygen::indexList->incContentsDepth();
5495 needsClosing=TRUE;
5496 }
5497 break;
5498 case LayoutNavEntry::StructList:
5499 if (sliceOpt)
5500 {
5501 msg("Generating annotated struct index...\n");
5503 }
5504 break;
5505 case LayoutNavEntry::StructIndex:
5506 if (sliceOpt)
5507 {
5508 msg("Generating alphabetical struct index...\n");
5510 }
5511 break;
5512 case LayoutNavEntry::Exceptions:
5513 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5514 {
5515 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5516 Doxygen::indexList->incContentsDepth();
5517 needsClosing=TRUE;
5518 }
5519 break;
5520 case LayoutNavEntry::ExceptionList:
5521 if (sliceOpt)
5522 {
5523 msg("Generating annotated exception index...\n");
5525 }
5526 break;
5527 case LayoutNavEntry::ExceptionIndex:
5528 if (sliceOpt)
5529 {
5530 msg("Generating alphabetical exception index...\n");
5532 }
5533 break;
5534 case LayoutNavEntry::ExceptionHierarchy:
5535 if (sliceOpt)
5536 {
5537 msg("Generating hierarchical exception index...\n");
5539 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5540 {
5541 msg("Generating graphical exception hierarchy...\n");
5543 }
5544 }
5545 break;
5546 case LayoutNavEntry::Files:
5547 {
5548 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5549 {
5550 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5551 Doxygen::indexList->incContentsDepth();
5552 needsClosing=TRUE;
5553 }
5554 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5555 {
5556 msg("Generating file index...\n");
5557 writeFileIndex(ol);
5558 }
5559 }
5560 break;
5561 case LayoutNavEntry::FileList:
5562 msg("Generating file index...\n");
5563 writeFileIndex(ol);
5564 break;
5565 case LayoutNavEntry::FileGlobals:
5566 msg("Generating file member index...\n");
5568 break;
5569 case LayoutNavEntry::Examples:
5570 msg("Generating example index...\n");
5572 break;
5573 case LayoutNavEntry::User:
5574 if (addToIndex)
5575 {
5576 // prepend a ! or ^ marker to the URL to avoid tampering with it
5577 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5578 bool isRelative=url.at(0)=='!';
5579 if (!url.isEmpty() && !isRelative) // absolute URL
5580 {
5581 url.prepend("^"); // prepend ^ to absolute URL
5582 }
5583 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5584 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5585 }
5586 break;
5587 case LayoutNavEntry::UserGroup:
5588 if (addToIndex)
5589 {
5590 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5591 if (!url.isEmpty())
5592 {
5593 if (url=="!") // result of a "[none]" url
5594 {
5595 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5596 }
5597 else
5598 {
5599 bool isRelative=url.at(0)=='!';
5600 if (!isRelative) // absolute URL
5601 {
5602 url.prepend("^"); // prepend ^ to absolute URL
5603 }
5604 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5605 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5606 }
5607 }
5608 else
5609 {
5610 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5611 }
5612 Doxygen::indexList->incContentsDepth();
5613 needsClosing=TRUE;
5614 }
5615 writeUserGroupStubPage(ol,lne.get());
5616 break;
5617 case LayoutNavEntry::None:
5618 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5619 break;
5620 }
5621 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5622 {
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:5301
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1237
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2683
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2526
static std::vector< bool > indexWritten
Definition index.cpp:5299
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2655
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1598
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1342
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2439
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2669
static void writePageIndex(OutputList &ol)
Definition index.cpp:4035
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2052
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2697
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1263
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4851
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4429
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3855
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1447
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2468
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2497
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4576
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1368
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3671
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1156
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3487
@ 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:5927

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

3107 {
3108 var item = navItems[i];
3109 var link = item.querySelector('a');
3110 item.classList.remove('current');
3111 if (link && link.getAttribute('href') === currentHash) {
3112 item.classList.add('current');
3113 }
3114 }
3115
3116 if (currentHash) {
3117 var target = document.querySelector(currentHash);
3118 if (target) {
3119 target.scrollIntoView();
3120 }
3121 }
3122}
3123updateNavHighlight();
3124window.addEventListener('hashchange', updateNavHighlight);
3125</script>
3126 )js");
3127}
3128
3129static void writeMemberIndex(OutputList &ol,
3130 const Index::MemberIndexMap &map, QCString fullName,bool multiPage)
3131{
3132 bool first=true;

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

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

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

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

Referenced by addMembersToIndex(), writeModuleMembers(), and writeNamespaceMembers().

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5807 of file index.cpp.

5811 {
5812 auto numDoc = [](std::size_t i) {
5814 };
5815 auto memList = [](std::size_t i) {
5817 };
5818 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5819 }
5820 else // recursive into child list
5821 {
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:132
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:141

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4576 of file index.cpp.

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

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

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

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

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3855 of file index.cpp.

3859 : theTranslator->trModuleMembersDescriptionTotal(hl));
3860 ol.endTextBlock();
3861 if (dynamicMenus || disableIndex)
3862 {
3863 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3864 }
3865
3866 writeMemberList(ol,quickIndex,
3867 multiPageIndex ? letter : std::string(),
3868 index.isModuleIndexLetterUsed(hl),
3870 endFile(ol);
3871 first=FALSE;
3872 }
3873 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3874 ol.popGeneratorState();
3875}
3876

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

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3723 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1844 of file index.cpp.

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

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

References Doxygen::indexList, and TRUE.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2052 of file index.cpp.

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

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

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

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

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

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3546 of file index.cpp.

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

References Config_getBool, and theTranslator.

◆ writeNamespaceMembers()

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

Definition at line 1818 of file index.cpp.

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

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1935 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1875 of file index.cpp.

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

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

References Doxygen::indexList, and Doxygen::mainPage.

◆ writePages()

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

Definition at line 3974 of file index.cpp.

3974 {
3975 if (pd->visibleInIndex() && !pd->hasParentPage())
3976 {
3977 indexPages++;
3978 }
3979 if (pd->documentedPage())
3980 {
3981 docPages++;
3982 }
3983 }
3984}
3985
3986//----------------------------------------------------------------------------
3987
3988static bool mainPageHasOwnTitle()
3989{
3990 QCString projectName = Config_getString(PROJECT_NAME);
3991 QCString title;
3993 {
3994 title = filterTitle(Doxygen::mainPage->title());
3995 }
3996 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3997}
3998
3999static void writePages(PageDef *pd,FTVHelp *ftv)
4000{
4001 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
4002 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4003 bool addToIndex = lne==nullptr || lne->visible();
4004 if (!addToIndex) return;
4005
4006 bool hasSubPages = pd->hasSubPages();
4007 bool hasSections = pd->hasSections();
4008
4009 if (pd->visibleInIndex())
4010 {
4011 QCString pageTitle, pageTitleAsHtml;
4012
4013 if (pd->title().isEmpty())
4014 pageTitle=pd->name();
4015 else
4016 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4017 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4018
4019 if (ftv)
4020 {
4021 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4022 ftv->addContentsItem(
4023 hasSubPages,pageTitle,
4024 pd->getReference(),pd->getOutputFileBase(),
4025 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
4026 }
4027 if (addToIndex && pd!=Doxygen::mainPage.get())
4028 {
4029 Doxygen::indexList->addContentsItem(
4030 hasSubPages || hasSections,pageTitle,
4031 pd->getReference(),pd->getOutputFileBase(),
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
static bool mainPageHasOwnTitle()
Definition index.cpp:3963
QCString filterTitle(const QCString &title)
Definition util.cpp:5612

◆ writeQuickMemberIndex()

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

Definition at line 3077 of file index.cpp.

3080{
3081 bool first=TRUE;
3083 for (const auto &[letter,list] : map)
3084 {
3085 QCString ci(letter);
3086 QCString is = letterToLabel(ci);
3087 QCString anchor;
3089 if (!multiPage)
3090 anchor="#index_";
3091 else if (first)
3092 anchor=fullName+extension+"#index_";
3093 else
3094 anchor=fullName+"_"+is+extension+"#index_";
3095 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3096 ol.writeString(ci);
3098 first=FALSE;
3099 }
3101 ol.writeString(R"js(
3102<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 1495 of file index.cpp.

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

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

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

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

Variable Documentation

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5299 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 341 of file index.cpp.