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

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

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

Go to the source code of this file.

Classes

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

Macros

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200
#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Typedefs

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

Functions

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

Variables

constexpr auto alphaSepar = "<div class=\"alphasepar\"></div>"
const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX
static std::vector< bool > indexWritten

Detailed Description

This file contains functions for the various index pages.

Definition in file index.cpp.

Macro Definition Documentation

◆ MAX_ITEMS_BEFORE_MULTIPAGE_INDEX

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200

Definition at line 55 of file index.cpp.

◆ MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 56 of file index.cpp.

Typedef Documentation

◆ UsedIndexLetters

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

Definition at line 2281 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 533 of file index.cpp.

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

References IndexList::addContentsItem(), addMembersToIndex(), Config_getBool, convertToHtml(), IndexList::decContentsDepth(), IndexList::incContentsDepth(), LayoutDocEntryMemberDef::type, Definition::TypeClass, Definition::TypeGroup, and writeMemberToIndex().

Referenced by addMembersToIndex(), writeClassTree(), writeDirHierarchy(), and writeDirTreeNode().

◆ countAnnotatedClasses()

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

Definition at line 2154 of file index.cpp.

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

References Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1123 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1147 of file index.cpp.

1148{
1149 int count=0;
1150 count+=countClassesInTreeList(*Doxygen::classLinkedMap, ct);
1151 count+=countClassesInTreeList(*Doxygen::hiddenClassLinkedMap, ct);
1152 return count;
1153}
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1123

References countClassesInTreeList().

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1738 of file index.cpp.

1739{
1740 int count=0;
1741 for (const auto &cd : *Doxygen::conceptLinkedMap)
1742 {
1743 if (cd->isLinkableInProject()) count++;
1744 }
1745 return count;
1746}

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4086 of file index.cpp.

4096{
4097 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1474 of file index.cpp.

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

References fileVisibleInIndex().

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4070 of file index.cpp.

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

References Definition::TypePage.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1727 of file index.cpp.

1728{
1729 int count=0;
1730 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1731 {
1732 if (nd->isLinkableInProject()) count++;
1733 }
1734 return count;
1735}

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3950 of file index.cpp.

3952 {
3953 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3954 if (addToIndex)
3955 {
3956 Doxygen::indexList->addContentsItem(false,pd->name(),pd->getReference(),n,QCString(),false,true);
3957 }
3958 }
3959 ol.endItemListItem();
3960 //ol.writeString("\n");
3961 }
3962 ol.endItemList();
3963
3964 if (addToIndex)

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 742 of file index.cpp.

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

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

Referenced by dirHasVisibleChildren(), and writeDirTreeNode().

◆ endFile()

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

Definition at line 429 of file index.cpp.

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

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

Referenced by endFileWithNavPath(), generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), writeDirIndex(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), and writeNamespaceIndex().

◆ endFileWithNavPath()

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

Definition at line 450 of file index.cpp.

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

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

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

◆ endIndexHierarchy()

◆ endQuickIndexItem()

void endQuickIndexItem ( OutputList & ol)
static

Definition at line 379 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 360 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1751 of file index.cpp.

1751{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1752 of file index.cpp.

1752{ 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 3149 of file index.cpp.

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

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3341 of file index.cpp.

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

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

◆ getMmhlInfo()

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3527 of file index.cpp.

3536 {
3538 }
3539
3540}
3541
3542//----------------------------------------------------------------------------
3543
3544/** Helper class representing a namespace member in the navigation menu. */
3545struct NmhlInfo
3546{
3547 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3521
const char * fname
Definition index.cpp:3523
QCString title
Definition index.cpp:3524
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3522

References FileMemberHighlight::All, FileMemberHighlight::Defines, FileMemberHighlight::Dictionaries, FileMemberHighlight::Enums, FileMemberHighlight::EnumValues, FileMemberHighlight::Functions, FileMemberHighlight::Sequences, FileMemberHighlight::Typedefs, and FileMemberHighlight::Variables.

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2250 of file index.cpp.

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

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2255 of file index.cpp.

2256{
2257 if (startLetter.isEmpty()) return startLetter;
2258 const char *p = startLetter.data();
2259 char c = *p;
2260 QCString result;
2261 if (isId1(c))
2262 {
2263 result+=c;
2264 }
2265 else
2266 {
2267 result="0x";
2268 const char hex[]="0123456789abcdef";
2269 while ((c=*p++))
2270 {
2271 result+=hex[static_cast<unsigned char>(c)>>4];
2272 result+=hex[static_cast<unsigned char>(c)&0xf];
2273 }
2274 }
2275 return result;
2276}
bool isEmpty() const
Returns true iff the string is empty.
Definition qcstring.h:161
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:170
static constexpr auto hex
bool isId1(int c)
Definition index.cpp:2250

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

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

◆ MemberIndexMap_add()

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

Definition at line 182 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5617 of file index.cpp.

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

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

References ClassMemberHighlight::All, and FileMemberHighlight::All.

◆ renderQuickLinksAsJs()

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

Definition at line 5725 of file index.cpp.

5735 {text:\"" << convertToJSString(ci) << "\",url:\""
5736 << convertToJSString(anchor+convertToId(is)) << "\"}";
5737 firstLetter=false;
5738 }
5739 t << "]";
5740 }
5741 t << "}";
5742 }
5743 }
5744 if (!firstMember)
5745 {
5746 t << "]";
5747 }
5748}
5749
5750static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5751{
5752 int count=0;
5753 for (const auto &entry : root->children())
5754 {
5755 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5756 }
5757 if (count>0) // at least one item is visible
5758 {
5759 bool firstChild = true;
5760 if (!first) t << ",";
5761 t << "children:[\n";
5762 for (const auto &entry : root->children())
5763 {
5764 if (entry->visible() && quickLinkVisible(entry->kind()))
5765 {
5766 if (!firstChild) t << ",\n";
5767 firstChild=false;
5768 QCString url = entry->url();
5769 if (isURL(url)) url = "^" + url;
5770 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5771 << convertToJSString(url) << "\"";
5772 bool hasChildren=false;
5773 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5774 {
5775 auto numDoc = [](std::size_t i) {
5777 };
5778 auto memList = [](std::size_t i) {
5780 };
5781 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5782 }
5783 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5784 {
5785 auto numDoc = [](std::size_t i) {
5787 };
5788 auto memList = [](std::size_t i) {
5790 };
5791 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5792 }
5793 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5794 {
5795 auto numDoc = [](std::size_t i) {
5797 };
5798 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:136
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:135
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:153
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:148
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5725
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3712
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3527
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:5953
QCString convertToId(const QCString &s)
Definition util.cpp:3911

◆ startFile()

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

Definition at line 403 of file index.cpp.

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

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

Referenced by generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), DirRelation::writeDocumentation(), FileDefImpl::writeDocumentation(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeNamespaceIndex(), and FileDefImpl::writeSourceHeader().

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 366 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 347 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 386 of file index.cpp.

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

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

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

◆ writeAlphabeticalClassList()

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

Definition at line 2284 of file index.cpp.

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

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

2528{
2529 if (Index::instance().numAnnotatedExceptions()==0) return;
2530 ol.pushGeneratorState();
2532 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2533 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2534 bool addToIndex = lne==nullptr || lne->visible();
2535
2536 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2537
2538 startTitle(ol,QCString());
2539 ol.parseText(title);
2540 endTitle(ol,QCString(),QCString());
2541
2542 if (addToIndex)
2543 {
2544 Doxygen::indexList->addContentsItem(false,title,QCString(),"exceptions",QCString(),false,true);
2545 }
2546
2547 ol.startContents();
2548 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2549 endFile(ol); // contains ol.endContents()
2550
2551 ol.popGeneratorState();
2552}
@ Exception
Definition classdef.h:115
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
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)
virtual QCString trExceptionIndex()=0
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:396
void startFile(OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
Definition index.cpp:403
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2284
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 IndexList::addContentsItem(), OutputList::disableAllBut(), endFile(), endTitle(), ClassDef::Exception, Exceptions, LayoutNavEntry::find(), Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trExceptionIndex(), LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2440 of file index.cpp.

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

References IndexList::addContentsItem(), ClassDef::Class, Classes, OutputList::disableAllBut(), endFile(), endTitle(), LayoutNavEntry::find(), Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trCompoundIndex(), LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2469 of file index.cpp.

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

References IndexList::addContentsItem(), OutputList::disableAllBut(), endFile(), endTitle(), LayoutNavEntry::find(), Html, ClassDef::Interface, Interfaces, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trInterfaceIndex(), LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2498 of file index.cpp.

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

References IndexList::addContentsItem(), OutputList::disableAllBut(), endFile(), endTitle(), LayoutNavEntry::find(), Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), startTitle(), ClassDef::Struct, Structs, theTranslator, LayoutNavEntry::title(), Translator::trStructIndex(), LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAnnotatedClassList()

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

Definition at line 2179 of file index.cpp.

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

References AnnotatedExceptions, ClassDef::Exception, theTranslator, Translator::trExceptionList(), Translator::trExceptionListDescription(), 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,
2663 "annotated",
2665}
virtual QCString trCompoundListDescription()=0
virtual QCString trCompoundList()=0
@ AnnotatedClasses
Definition index.h:73

References AnnotatedClasses, ClassDef::Class, theTranslator, Translator::trCompoundList(), Translator::trCompoundListDescription(), and writeAnnotatedIndexGeneric().

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2581 of file index.cpp.

2582{
2583 //printf("writeAnnotatedIndex: count=%d printed=%d\n", ctx.numAnnotated, ctx.numPrinted);
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();
2616
2618
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);
2633 }
2634 FTVHelp ftv(false);
2635 writeClassTreeInsideNamespace(*Doxygen::namespaceLinkedMap,&ftv,true,addToIndex,ctx.compoundType);
2636 writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,true,ctx.compoundType);
2637 TextStream t;
2638 ftv.generateTreeViewInline(t);
2639 ol.writeString(t.str());
2640 if (addToIndex)
2641 {
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 enable()
enable the indices
Definition indexlist.h:92
void disable()
disable the indices
Definition indexlist.h:88
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:2179
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2035
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1755
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2573
const ClassDef::CompoundType compoundType
Definition index.cpp:2576
const HighlightedItem hiItem
Definition index.cpp:2578
const QCString fileBaseName
Definition index.cpp:2577
const LayoutNavEntry::Kind listKind
Definition index.cpp:2572
const QCString listDefaultTitleText
Definition index.cpp:2574
const int numAnnotated
Definition index.cpp:2570
const QCString listDefaultIntroText
Definition index.cpp:2575
QCString intro() const
Definition layout.h:217

References IndexList::addContentsItem(), AnnotatedIndexContext::compoundType, IndexList::decContentsDepth(), IndexList::disable(), OutputList::disable(), OutputList::disableAllBut(), IndexList::enable(), endFile(), OutputList::endTextBlock(), endTitle(), AnnotatedIndexContext::fallbackKind, AnnotatedIndexContext::fileBaseName, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), AnnotatedIndexContext::hiItem, Html, IndexList::incContentsDepth(), LayoutNavEntry::intro(), Latex, AnnotatedIndexContext::listDefaultIntroText, AnnotatedIndexContext::listDefaultTitleText, AnnotatedIndexContext::listKind, Man, AnnotatedIndexContext::numAnnotated, AnnotatedIndexContext::numPrinted, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), RTF, OutputList::startContents(), startFile(), OutputList::startTextBlock(), startTitle(), TextStream::str(), LayoutNavEntry::title(), 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,
2677 "annotatedinterfaces",
2679}
virtual QCString trInterfaceList()=0
virtual QCString trInterfaceListDescription()=0
@ AnnotatedInterfaces
Definition index.h:74

References AnnotatedInterfaces, ClassDef::Interface, theTranslator, Translator::trInterfaceList(), Translator::trInterfaceListDescription(), 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,
2691 "annotatedstructs",
2693}
virtual QCString trStructList()=0
virtual QCString trStructListDescription()=0
@ AnnotatedStructs
Definition index.h:75

References AnnotatedStructs, ClassDef::Struct, theTranslator, Translator::trStructList(), Translator::trStructListDescription(), and writeAnnotatedIndexGeneric().

◆ writeClassHierarchy()

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

Definition at line 1096 of file index.cpp.

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

References IndexList::decContentsDepth(), OutputList::disable(), endIndexHierarchy(), Html, 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 3304 of file index.cpp.

3310 ol.endTextBlock();
3311 if (dynamicMenus || disableIndex)
3312 {
3313 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3314 }
3315
3316 writeMemberList(ol,quickIndex,
3317 multiPageIndex ? letter : std::string(),
3318 index.isClassIndexLetterUsed(hl),
3320 endFile(ol);
3321 first=false;
3322 }
3323
3324 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3325
3326 ol.popGeneratorState();
3327}
3328
3329static void writeClassMemberIndex(OutputList &ol)
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
virtual QCString trCompoundMembersDescriptionTotal(ClassMemberHighlight::Enum hl)=0
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3304
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:3149
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 3171 of file index.cpp.

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

◆ writeClassTree()

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

Definition at line 1755 of file index.cpp.

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

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), classHasVisibleChildren(), classHasVisibleRoot(), Config_getBool, convertToHtml(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, OutputList::generateDoc(), IndexList::incContentsDepth(), OutputList::parseText(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), 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 2044 of file index.cpp.

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2035 of file index.cpp.

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

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

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), Config_getBool, FTVHelp::decContentsDepth(), IndexList::decContentsDepth(), ClassDef::Exception, NamespaceDef::getClasses(), NamespaceDef::getExceptions(), NamespaceDef::getInterfaces(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), NamespaceDef::getStructs(), FTVHelp::incContentsDepth(), IndexList::incContentsDepth(), ClassDef::Interface, Definition::isAnonymous(), Definition::isLinkableInProject(), Definition::localName(), namespaceHasNestedClass(), qstrlen(), QCString::replace(), ClassDef::Struct, 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 626 of file index.cpp.

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

Referenced by writeClassTreeForList(), and writeClassTreeToOutput().

◆ writeConceptIndex()

void writeConceptIndex ( OutputList & ol)
static

Definition at line 4743 of file index.cpp.

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

◆ writeConceptList()

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

Definition at line 4637 of file index.cpp.

4637 {
4638 if (addToIndex)
4639 {
4640 Doxygen::indexList->addContentsItem(true,title,QCString(),"modules",QCString(),true,true);
4642 }
4643 FTVHelp ftv(false);
4644 writeModuleList(ol,&ftv,addToIndex);
4645 TextStream t;
4647 ol.writeString(t.str());
4648 if (addToIndex)
4649 {
4651 }
4652 }
4653 ol.popGeneratorState();
4654 // 2.}
4655 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:881
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4545

References IndexList::addContentsItem(), IndexList::decContentsDepth(), FTVHelp::generateTreeViewInline(), IndexList::incContentsDepth(), TextStream::str(), writeModuleList(), and OutputList::writeString().

Referenced by writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4721 of file index.cpp.

4729 {
4731 }
4732
4733 ftv->incContentsDepth();
4734 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,false,addToIndex);
4735 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4736 ftv->decContentsDepth();
4737
4738 if (addToIndex)
4739 {
4741 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4660
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4637

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4660 of file index.cpp.

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

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4670 of file index.cpp.

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

◆ writeDirHierarchy()

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

Definition at line 928 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), addMembersToIndex(), OutputList::disable(), endIndexHierarchy(), fileVisibleInIndex(), Html, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startIndexHierarchy(), and writeDirTreeNode().

Referenced by writeFileIndex().

◆ writeDirIndex()

void writeDirIndex ( OutputList & ol)
static

Definition at line 1570 of file index.cpp.

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

References OutputList::disable(), endFile(), OutputList::endIndexList(), endTitle(), Files, Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startFile(), OutputList::startIndexList(), startTitle(), theTranslator, Translator::trDirectories(), and writeDirTreeNode().

◆ writeDirTreeNode()

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

Definition at line 770 of file index.cpp.

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

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

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

◆ writeExampleIndex()

void writeExampleIndex ( OutputList & ol)
static

Definition at line 3885 of file index.cpp.

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

References IndexList::addContentsItem(), ModuleMemberHighlight::All, IndexList::decContentsDepth(), ModuleMemberHighlight::Enums, ModuleMemberHighlight::EnumValues, LayoutNavEntry::find(), ModuleMemberHighlight::Functions, IndexList::incContentsDepth(), LayoutDocManager::rootNavEntry(), theTranslator, LayoutNavEntry::title(), Translator::trModulesMembers(), ModuleMemberHighlight::Typedefs, ModuleMemberHighlight::Variables, LayoutNavEntry::visible(), and writeModuleMemberIndexFiltered().

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1599 of file index.cpp.

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

References IndexList::addContentsItem(), compareFileDefs(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endIndexList(), OutputList::endTextBlock(), endTitle(), Files, LayoutNavEntry::find(), QCString::find(), FTVHelp::generateTreeViewInline(), Html, IndexList::incContentsDepth(), 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(), Translator::trFileList(), Translator::trFileListDescription(), 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 3492 of file index.cpp.

3500 ol.endTextBlock();
3501 if (dynamicMenus || disableIndex)
3502 {
3503 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3504 }
3505
3506 writeMemberList(ol,quickIndex,
3507 multiPageIndex ? letter : std::string(),
3508 index.isFileIndexLetterUsed(hl),
3510 endFile(ol);
3511 first=false;
3512 }
3513 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3514 ol.popGeneratorState();
3515}
virtual QCString trFileMembersDescriptionTotal(FileMemberHighlight::Enum hl)=0
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3341

◆ writeFileMemberIndexFiltered()

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

Definition at line 3364 of file index.cpp.

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

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1238 of file index.cpp.

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

References ClassHierarchy, OutputList::disableAllBut(), OutputList::enableAll(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), Html, OutputList::parseText(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trClassHierarchy(), Translator::trGotoTextualHierarchy(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1448 of file index.cpp.

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

References OutputList::disableAllBut(), OutputList::enableAll(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), ClassDef::Exception, ExceptionHierarchy, LayoutNavEntry::find(), Html, OutputList::parseText(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trExceptionHierarchy(), Translator::trGotoTextualHierarchy(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1343 of file index.cpp.

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

References OutputList::disableAllBut(), OutputList::enableAll(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), Html, ClassDef::Interface, InterfaceHierarchy, OutputList::parseText(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trGotoTextualHierarchy(), Translator::trInterfaceHierarchy(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4102 of file index.cpp.

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

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4398 of file index.cpp.

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

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

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

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

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1369 of file index.cpp.

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

References IndexList::addContentsItem(), Config_getBool, IndexList::disable(), OutputList::disable(), OutputList::disableAllBut(), IndexList::enable(), OutputList::enable(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), ClassDef::Exception, ExceptionHierarchy, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, 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(), Translator::trExceptionHierarchy(), Translator::trExceptionHierarchyDescription(), Translator::trGotoGraphicalHierarchy(), LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1157 of file index.cpp.

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

References IndexList::addContentsItem(), ClassDef::Class, ClassHierarchy, Config_getBool, IndexList::disable(), OutputList::disable(), OutputList::disableAllBut(), Docbook, IndexList::enable(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, 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(), Translator::trClassHierarchy(), Translator::trClassHierarchyDescription(), Translator::trGotoGraphicalHierarchy(), LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1264 of file index.cpp.

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

References IndexList::addContentsItem(), Config_getBool, IndexList::disable(), OutputList::disable(), OutputList::disableAllBut(), IndexList::enable(), OutputList::enable(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, 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(), Translator::trGotoGraphicalHierarchy(), Translator::trInterfaceHierarchy(), Translator::trInterfaceHierarchyDescription(), LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4881 of file index.cpp.

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

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5816 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5294 of file index.cpp.

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

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

◆ 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;
3133 ol.writeString("<br/>\n");
3134 QCString alphaLinks = "<div class=\"qindex\">";
3135 StringMap usedLetters;
3136 for (const auto &[letter,list] : map)
3137 {
std::map< std::string, std::string > StringMap
Definition containers.h:30

Referenced by writeClassMemberIndex(), and writeModuleMemberIndex().

◆ writeMemberList()

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

Definition at line 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 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:33

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

◆ writeMemberToIndex()

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

Definition at line 470 of file index.cpp.

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

References IndexList::addContentsItem(), Definition::anchor(), MemberDef::anonymousMemberPrefix(), MemberVector::begin(), IndexList::decContentsDepth(), Definition::definitionType(), MemberVector::end(), MemberDef::enumFieldList(), MemberDef::getGroupDef(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), IndexList::incContentsDepth(), Definition::isAnonymous(), MemberDef::isEnumerate(), Definition::name(), QCString::prepend(), Definition::qualifiedName(), MemberDef::toAnonymousMember(), Definition::TypeFile, and Definition::TypeModule.

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5800 of file index.cpp.

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

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4569 of file index.cpp.

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

References OutputList::disable(), endIndexHierarchy(), Html, 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 4545 of file index.cpp.

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

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3860 of file index.cpp.

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

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

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3728 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1845 of file index.cpp.

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

◆ writeModuleTreeNode()

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

Definition at line 4491 of file index.cpp.

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

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2053 of file index.cpp.

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

References IndexList::addContentsItem(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endIndexKey(), OutputList::endIndexList(), OutputList::endIndexValue(), OutputList::endTextBlock(), endTitle(), LayoutNavEntry::find(), OutputList::generateDoc(), FTVHelp::generateTreeViewInline(), Html, IndexList::incContentsDepth(), LayoutNavEntry::intro(), Man, 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(), Translator::trNamespaceList(), Translator::trNamespaceListDescription(), 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 3676 of file index.cpp.

3677 {
3678 ol.writeString("<div id=\"container\">\n");
3679 ol.writeString("<div id=\"doc-content\">\n");
3680 }
3681 }
3682 ol.writeSearchInfo();
3683
3684 ol.startContents();
3685
3686 ol.startTextBlock();
3688 ol.endTextBlock();
3689
3690 writeMemberList(ol,quickIndex,
3691 multiPageIndex ? letter : std::string(),
3692 index.isNamespaceIndexLetterUsed(hl),
3694 endFile(ol);
3695 first=false;
3696 }
3697 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3698 ol.popGeneratorState();
3699}
3700
virtual QCString trNamespaceMembersDescriptionTotal(NamespaceMemberHighlight::Enum hl)=0

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3551 of file index.cpp.

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

References Config_getBool, theTranslator, Translator::trAll(), Translator::trConstants(), Translator::trDictionaries(), Translator::trEnumerations(), Translator::trEnumerationValues(), Translator::trFunctionAndProc(), Translator::trFunctions(), Translator::trSequences(), Translator::trSubprograms(), Translator::trTypedefs(), and Translator::trVariables().

◆ writeNamespaceMembers()

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

Definition at line 1819 of file index.cpp.

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

References NamespaceDef::getMemberList(), 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 1948 of file index.cpp.

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1936 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1876 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), ClassDef::Class, NamespaceDef::countVisibleMembers(), FTVHelp::decContentsDepth(), IndexList::decContentsDepth(), NamespaceDef::getClasses(), NamespaceDef::getConcepts(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), FTVHelp::incContentsDepth(), IndexList::incContentsDepth(), 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 4028 of file index.cpp.

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

◆ writePages()

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

Definition at line 3968 of file index.cpp.

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

◆ writeQuickMemberIndex()

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

Definition at line 3077 of file index.cpp.

3080{
3081 bool first=true;
3082 startQuickIndexList(ol,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(), letterToLabel(), startQuickIndexItem(), startQuickIndexList(), and OutputList::writeString().

◆ writeSingleFileIndex()

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

Definition at line 1496 of file index.cpp.

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

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, Translator::trCode(), and OutputList::writeObjectLink().

Referenced by writeFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4422 of file index.cpp.

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

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

◆ writeUserGroupStubPage()

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

Definition at line 4844 of file index.cpp.

4847 {
4848 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4849 }
4850 writeConceptRootList(&ftv,addToIndex);
4851 TextStream t;
4852 ftv.generateTreeViewInline(t);
4853 ol.writeString(t.str());
4854 if (addToIndex)
4855 {
4857 }
4858 }
4859 ol.popGeneratorState();
4860 // 2.}
4861
4862 endFile(ol);
4863 ol.popGeneratorState();
4864 // 1.}
4865}
4866
4867//----------------------------------------------------------------------------
4868
4870{
4871 if (lne->baseFile().startsWith("usergroup"))
4872 {
4873 ol.pushGeneratorState();
4876 startTitle(ol,QCString());
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
bool startsWith(const char *s) const
Definition qcstring.h:505
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4721
QCString baseFile() const
Definition layout.h:214

Variable Documentation

◆ alphaSepar

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

Definition at line 58 of file index.cpp.

Referenced by getCmhlInfo(), and writeAlphabeticalClassList().

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5292 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 343 of file index.cpp.