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 DString &l, bool hl, bool, bool &first)
static void endQuickIndexItem (OutputList &ol)
void startTitle (OutputList &ol, const DString &fileName, const DefinitionMutable *def)
void endTitle (OutputList &ol, const DString &fileName, const DString &name)
void startFile (OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
void endFile (OutputList &ol, bool skipNavIndex, bool skipEndContents, const DString &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 DString &name, const DString &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 DString letterToLabel (const DString &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 DString &separator, DString &prevClassName)
static void writeFileLinkForMember (OutputList &ol, const MemberDef *md, const DString &separator, DString &prevFileName)
static void writeNamespaceLinkForMember (OutputList &ol, const MemberDef *md, const DString &separator, DString &prevNamespaceName)
static void writeModuleLinkForMember (OutputList &ol, const MemberDef *md, const DString &separator, DString &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, DString fullName, bool multiPage)
static void writeMemberIndex (OutputList &ol, const Index::MemberIndexMap &map, DString 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 2277 of file index.cpp.

Function Documentation

◆ addMembersToIndex()

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

Definition at line 529 of file index.cpp.

534{
535 int numClasses=0;
536 for (const auto &cd : def->getClasses())
537 {
538 if (cd->isLinkable()) numClasses++;
539 }
540 int numConcepts=0;
541 if (concepts)
542 {
543 for (const auto &cd : *concepts)
544 {
545 if (cd->isLinkable()) numConcepts++;
546 }
547 }
548 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
549 Doxygen::indexList->addContentsItem(hasMembers,name,
550 def->getReference(),def->getOutputFileBase(),anchor,
551 hasMembers && !preventSeparateIndex,
552 addToIndex,
553 def,
554 convertToHtml(name));
555 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
556 if (hasMembers || numClasses>0 || numConcepts>0)
557 {
559 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
560 {
561 auto kind = lde->kind();
562 if (kind==LayoutDocEntry::MemberDef)
563 {
564 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
565 if (lmd)
566 {
567 MemberList *ml = def->getMemberList(lmd->type);
568 if (ml)
569 {
570 for (const auto &md : *ml)
571 {
572 if (md->visibleInIndex())
573 {
574 writeMemberToIndex(def,md,addToIndex);
575 }
576 }
577 }
578 }
579 }
580 else if (kind==LayoutDocEntry::NamespaceClasses ||
581 kind==LayoutDocEntry::FileClasses ||
582 kind==LayoutDocEntry::ClassNestedClasses ||
583 kind==LayoutDocEntry::ModuleClasses
584 )
585 {
586 for (const auto &cd : def->getClasses())
587 {
588 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
589 {
590 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
591 bool isNestedClass = def->definitionType()==Definition::TypeClass;
592 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
593 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
594 preventSeparateIndex || cd->isEmbeddedInOuterScope());
595 }
596 }
597 }
598 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
599 {
600 for (const auto &cd : *concepts)
601 {
602 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
603 {
604 Doxygen::indexList->addContentsItem(false,cd->displayName(),
605 cd->getReference(),cd->getOutputFileBase(),DString(),
606 addToIndex,
607 false,
608 cd);
609 }
610 }
611 }
612 }
613
615 }
616}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:89
static IndexList * indexList
Definition doxygen.h:132
void decContentsDepth()
Definition indexlist.h:109
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex=false, bool addToNavIndex=false, const Definition *def=nullptr, const DString &nameAsHtml=DString())
Definition indexlist.h:112
void incContentsDepth()
Definition indexlist.h:106
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1435
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
#define Config_getBool(name)
Definition config.h:33
void addMembersToIndex(T *def, LayoutDocManager::LayoutPart part, const DString &name, const DString &anchor, bool addToIndex=true, bool preventSeparateIndex=false, const ConceptLinkedRefMap *concepts=nullptr)
Definition index.cpp:529
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
DString convertToHtml(const DString &s, bool keepEntities)
Definition util.cpp:4011

References IndexList::addContentsItem(), addMembersToIndex(), Config_getBool, convertToHtml(), IndexList::decContentsDepth(), IndexList::incContentsDepth(), Doxygen::indexList, LayoutDocManager::instance(), 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 2150 of file index.cpp.

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

References Doxygen::classLinkedMap, Config_getBool, and countAnnotatedClasses().

Referenced by countAnnotatedClasses(), and Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1119 of file index.cpp.

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

References classHasVisibleRoot(), Config_getBool, and countClassesInTreeList().

Referenced by countClassesInTreeList(), and countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1143 of file index.cpp.

1144{
1145 int count=0;
1148 return count;
1149}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1119

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

Referenced by countClassHierarchy(), and Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1734 of file index.cpp.

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

References Doxygen::conceptLinkedMap, and countConcepts().

Referenced by countConcepts(), and Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4082 of file index.cpp.

4092{
4093 int count=0;

References endFile().

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1470 of file index.cpp.

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

References countFiles(), fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures(), and countFiles().

◆ countGroups()

int countGroups ( )
static

Definition at line 4066 of file index.cpp.

4068 {
4069 if ((pd->getOuterScope()==nullptr ||
4070 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4071 pd->visibleInIndex()
4072 )
4073 {
4074 writePages(pd.get(),&ftv);
4075 }
4076 }
4077 TextStream t;
4078 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:3964

References Doxygen::pageLinkedMap, Definition::TypePage, and writePages().

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1723 of file index.cpp.

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

References countNamespaces(), and Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures(), and countNamespaces().

◆ countRelatedPages()

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

Definition at line 3946 of file index.cpp.

3948 {
3949 ol.writeObjectLink(DString(),n,DString(),pd->name());
3950 if (addToIndex)
3951 {
3952 Doxygen::indexList->addContentsItem(false,pd->name(),pd->getReference(),n,DString(),false,true);
3953 }
3954 }
3955 ol.endItemListItem();
3956 //ol.writeString("\n");
3957 }
3958 ol.endItemList();
3959
3960 if (addToIndex)
DString()=default

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 738 of file index.cpp.

739{
740 if (dd->hasDocumentation()) return true;
741
742 for (const auto &fd : dd->getFiles())
743 {
744 bool genSourceFile = false;
745 if (fileVisibleInIndex(fd,genSourceFile))
746 {
747 return true;
748 }
749 if (genSourceFile)
750 {
751 return true;
752 }
753 }
754
755 for(const auto &subdd : dd->subDirs())
756 {
757 if (dirHasVisibleChildren(subdd))
758 {
759 return true;
760 }
761 }
762 return false;
763}
virtual bool hasDocumentation() const =0
virtual const DirList & subDirs() const =0
virtual const FileList & getFiles() const =0
static bool dirHasVisibleChildren(const DirDef *dd)
Definition index.cpp:738

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

Referenced by dirHasVisibleChildren(), and writeDirTreeNode().

◆ endFile()

void endFile ( OutputList & ol,
bool skipNavIndex,
bool skipEndContents,
const DString & 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 writeFooter(const DString &navPath)
Definition outputlist.h:399
void endContents()
Definition outputlist.h:620
void writeString(const DString &text)
Definition outputlist.h:411
void endFile()
Definition outputlist.h:401
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()

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

Referenced by countDirs(), endFile(), 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(), writeNamespaceIndex(), and writePages().

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

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

Referenced by endFileWithNavPath(), 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 endQuickIndexItem(), and OutputList::writeString().

Referenced by endQuickIndexItem(), and 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 endQuickIndexList(), and OutputList::writeString().

Referenced by endQuickIndexList(), and writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1747 of file index.cpp.

1747{ return p.get(); }

References get_pointer().

◆ get_pointer() [2/3]

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

Definition at line 1748 of file index.cpp.

1748{ return p; }

References get_pointer().

◆ get_pointer() [3/3]

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

◆ getCmhlInfo()

const CmhlInfo * getCmhlInfo ( size_t hl)
static

Definition at line 3145 of file index.cpp.

3164{
3165 CmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
CmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3140

References alphaSepar, and letterToLabel().

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3337 of file index.cpp.

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

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

◆ getMmhlInfo()

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3523 of file index.cpp.

3532 {
3534 }
3535
3536}
3537
3538//----------------------------------------------------------------------------
3539
3540/** Helper class representing a namespace member in the navigation menu. */
3541struct NmhlInfo
3542{
3543 NmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3517
const char * fname
Definition index.cpp:3519
DString title
Definition index.cpp:3520
NmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3518

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

Referenced by writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2246 of file index.cpp.

2247{
2248 return (c<127 && c>31); // printable ASCII character
2249}

References isId1().

Referenced by isId1(), and letterToLabel().

◆ letterToLabel()

DString letterToLabel ( const DString & startLetter)
static

Definition at line 2251 of file index.cpp.

2252{
2253 if (startLetter.empty()) return startLetter;
2254 const char *p = startLetter.data();
2255 char c = *p;
2256 DString result;
2257 if (isId1(c))
2258 {
2259 result+=c;
2260 }
2261 else
2262 {
2263 result="0x";
2264 const char hex[]="0123456789abcdef";
2265 while ((c=*p++))
2266 {
2267 result+=hex[static_cast<unsigned char>(c)>>4];
2268 result+=hex[static_cast<unsigned char>(c)&0xf];
2269 }
2270 }
2271 return result;
2272}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:153
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:162
static const char * hex
bool isId1(int c)
Definition index.cpp:2246

References DString::data(), DString::empty(), hex, isId1(), and letterToLabel().

Referenced by getCmhlInfo(), letterToLabel(), renderQuickLinksAsJs(), 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}

References MemberIndexMap_add().

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5613 of file index.cpp.

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

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5721 of file index.cpp.

5731 {text:\"" << convertToJSString(ci) << "\",url:\""
5732 << convertToJSString(anchor+convertToId(is)) << "\"}";
5733 firstLetter=false;
5734 }
5735 t << "]";
5736 }
5737 t << "}";
5738 }
5739 }
5740 if (!firstMember)
5741 {
5742 t << "]";
5743 }
5744}
5745
5746static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5747{
5748 int count=0;
5749 for (const auto &entry : root->children())
5750 {
5751 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5752 }
5753 if (count>0) // at least one item is visible
5754 {
5755 bool firstChild = true;
5756 if (!first) t << ",";
5757 t << "children:[\n";
5758 for (const auto &entry : root->children())
5759 {
5760 if (entry->visible() && quickLinkVisible(entry->kind()))
5761 {
5762 if (!firstChild) t << ",\n";
5763 firstChild=false;
5764 DString url = entry->url();
5765 if (isURL(url)) url = "^" + url;
5766 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5767 << convertToJSString(url) << "\"";
5768 bool hasChildren=false;
5769 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5770 {
5771 auto numDoc = [](std::size_t i) {
5773 };
5774 auto memList = [](std::size_t i) {
5776 };
5777 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5778 }
5779 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5780 {
5781 auto numDoc = [](std::size_t i) {
5783 };
5784 auto memList = [](std::size_t i) {
5786 };
5787 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5788 }
5789 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5790 {
5791 auto numDoc = [](std::size_t i) {
5793 };
5794 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:5721
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3708
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3523
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 DString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:5957
DString convertToId(const DString &s)
Definition util.cpp:3916

References convertToId(), convertToJSString(), Doxygen::htmlFileExtension, and letterToLabel().

◆ startFile()

void startFile ( OutputList & ol,
const DString & name,
bool isSource,
const DString & manName,
const DString & title,
HighlightedItem hli,
bool additionalIndices,
const DString & altSidebarName,
int hierarchyLevel,
const DString & 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.empty() ? 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 DString &name, bool isSource, const DString &manName, const DString &title, int hierarchyLevel=0)
void endQuickIndices()
Definition outputlist.h:604
void writeSplitBar(const DString &name, const DString &allMembersFile)
Definition outputlist.h:606
void writeQuickLinks(HighlightedItem hli, const DString &file, bool extraTabs=false)
Definition outputlist.h:612

References Config_getBool, DString::empty(), OutputList::endQuickIndices(), OutputList::startFile(), startFile(), OutputList::startQuickIndices(), OutputList::writeQuickLinks(), OutputList::writeSearchInfo(), and OutputList::writeSplitBar().

Referenced by generateExampleDocs(), startFile(), 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 DString & 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 startQuickIndexItem(), and OutputList::writeString().

Referenced by startQuickIndexItem(), and 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 startQuickIndexList(), and OutputList::writeString().

Referenced by startQuickIndexList(), and writeQuickMemberIndex().

◆ startTitle()

void startTitle ( OutputList & ol,
const DString & 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 DString &fileName)
Definition outputlist.h:403
void startHeaderSection()
Definition outputlist.h:465

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

Referenced by generateExampleDocs(), startTitle(), 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 2280 of file index.cpp.

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

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

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

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2523 of file index.cpp.

2524{
2525 if (Index::instance().numAnnotatedExceptions()==0) return;
2526 ol.pushGeneratorState();
2528 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2529 DString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2530 bool addToIndex = lne==nullptr || lne->visible();
2531
2532 startFile(ol,"exceptions",false,DString(),title,HighlightedItem::Exceptions);
2533
2534 startTitle(ol,DString());
2535 ol.parseText(title);
2536 endTitle(ol,DString(),DString());
2537
2538 if (addToIndex)
2539 {
2540 Doxygen::indexList->addContentsItem(false,title,DString(),"exceptions",DString(),false,true);
2541 }
2542
2543 ol.startContents();
2544 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2545 endFile(ol); // contains ol.endContents()
2546
2547 ol.popGeneratorState();
2548}
@ Exception
Definition classdef.h:115
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1446
void parseText(const DString &textStr)
void startContents()
Definition outputlist.h:618
virtual DString trExceptionIndex()=0
void endTitle(OutputList &ol, const DString &fileName, const DString &name)
Definition index.cpp:396
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
Definition index.cpp:386
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2280
void startFile(OutputList &ol, const DString &name, bool isSource, const DString &manName, const DString &title, HighlightedItem hli, bool additionalIndices, const DString &altSidebarName, int hierarchyLevel, const DString &allMembersFile)
Definition index.cpp:403
Translator * theTranslator
Definition language.cpp:71
LayoutNavEntry * find(LayoutNavEntry::Kind k, const DString &file=DString()) const
Definition layout.cpp:133
DString title() const
Definition layout.h:216
bool visible() const
Definition layout.h:222

References IndexList::addContentsItem(), OutputList::disableAllBut(), DString::DString(), endFile(), endTitle(), ClassDef::Exception, Exceptions, LayoutNavEntry::find(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), startTitle(), theTranslator, LayoutNavEntry::title(), Translator::trExceptionIndex(), LayoutNavEntry::visible(), writeAlphabeticalClassList(), and writeAlphabeticalExceptionIndex().

Referenced by writeAlphabeticalExceptionIndex().

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2436 of file index.cpp.

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

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

Referenced by writeAlphabeticalIndex().

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2465 of file index.cpp.

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

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

Referenced by writeAlphabeticalInterfaceIndex().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2494 of file index.cpp.

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

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

Referenced by writeAlphabeticalStructIndex().

◆ writeAnnotatedClassList()

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

Definition at line 2175 of file index.cpp.

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

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

Referenced by writeAnnotatedClassList(), and writeAnnotatedIndexGeneric().

◆ writeAnnotatedExceptionIndex()

void writeAnnotatedExceptionIndex ( OutputList & ol)
static

Definition at line 2693 of file index.cpp.

2694{
2695 const auto &index = Index::instance();
2697 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2698 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2701 "annotatedexceptions",
2703}
virtual DString trExceptionList()=0
virtual DString trExceptionListDescription()=0
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2577
@ AnnotatedExceptions
Definition index.h:76
AnnotatedIndexContext(int numAnno, int numPrint, LayoutNavEntry::Kind lk, LayoutNavEntry::Kind fk, const DString &title, const DString &intro, ClassDef::CompoundType ct, const DString &fn, HighlightedItem hi)
Definition index.cpp:2554

References AnnotatedExceptions, AnnotatedIndexContext::AnnotatedIndexContext(), ClassDef::Exception, Index::instance(), theTranslator, Translator::trExceptionList(), Translator::trExceptionListDescription(), writeAnnotatedExceptionIndex(), and writeAnnotatedIndexGeneric().

Referenced by writeAnnotatedExceptionIndex().

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2651 of file index.cpp.

2652{
2653 const auto &index = Index::instance();
2655 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2656 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2659 "annotated",
2661}
virtual DString trCompoundList()=0
virtual DString trCompoundListDescription()=0
@ AnnotatedClasses
Definition index.h:73

References AnnotatedClasses, AnnotatedIndexContext::AnnotatedIndexContext(), ClassDef::Class, Index::instance(), theTranslator, Translator::trCompoundList(), Translator::trCompoundListDescription(), writeAnnotatedIndex(), and writeAnnotatedIndexGeneric().

Referenced by writeAnnotatedIndex().

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2577 of file index.cpp.

2578{
2579 //printf("writeAnnotatedIndex: count=%d printed=%d\n", ctx.numAnnotated, ctx.numPrinted);
2580 if (ctx.numAnnotated==0) return;
2581
2582 ol.pushGeneratorState();
2584 if (ctx.numPrinted==0)
2585 {
2588 }
2590 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2591 DString title = lne ? lne->title() : ctx.listDefaultTitleText;
2592 bool addToIndex = lne==nullptr || lne->visible();
2593
2594 startFile(ol,ctx.fileBaseName,false,DString(),title,ctx.hiItem);
2595
2596 startTitle(ol,DString());
2597 ol.parseText(title);
2598 endTitle(ol,DString(),DString());
2599
2600 ol.startContents();
2601
2602 ol.startTextBlock();
2603 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2604 ol.endTextBlock();
2605
2606 // ---------------
2607 // Linear class index for Latex/RTF
2608 // ---------------
2609 ol.pushGeneratorState();
2612
2614
2616 ol.popGeneratorState();
2617
2618 // ---------------
2619 // Hierarchical class index for HTML
2620 // ---------------
2621 ol.pushGeneratorState();
2623
2624 {
2625 if (addToIndex)
2626 {
2627 Doxygen::indexList->addContentsItem(true,title,DString(),ctx.fileBaseName,DString(),true,true);
2629 }
2630 FTVHelp ftv(false);
2632 writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,true,ctx.compoundType);
2633 TextStream t;
2634 ftv.generateTreeViewInline(t);
2635 ol.writeString(t.str());
2636 if (addToIndex)
2637 {
2639 }
2640 }
2641
2642 ol.popGeneratorState();
2643 // ------
2644
2645 endFile(ol); // contains ol.endContents()
2646 ol.popGeneratorState();
2647}
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:232
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2175
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2031
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1751
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2569
const DString listDefaultTitleText
Definition index.cpp:2570
const DString fileBaseName
Definition index.cpp:2573
const ClassDef::CompoundType compoundType
Definition index.cpp:2572
const HighlightedItem hiItem
Definition index.cpp:2574
const LayoutNavEntry::Kind listKind
Definition index.cpp:2568
const DString listDefaultIntroText
Definition index.cpp:2571
const int numAnnotated
Definition index.cpp:2566
DString intro() const
Definition layout.h:217

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

Referenced by writeAnnotatedExceptionIndex(), writeAnnotatedIndex(), writeAnnotatedIndexGeneric(), writeAnnotatedInterfaceIndex(), and writeAnnotatedStructIndex().

◆ writeAnnotatedInterfaceIndex()

void writeAnnotatedInterfaceIndex ( OutputList & ol)
static

Definition at line 2665 of file index.cpp.

2666{
2667 const auto &index = Index::instance();
2669 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2670 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2673 "annotatedinterfaces",
2675}
virtual DString trInterfaceList()=0
virtual DString trInterfaceListDescription()=0
@ AnnotatedInterfaces
Definition index.h:74

References AnnotatedIndexContext::AnnotatedIndexContext(), AnnotatedInterfaces, Index::instance(), ClassDef::Interface, theTranslator, Translator::trInterfaceList(), Translator::trInterfaceListDescription(), writeAnnotatedIndexGeneric(), and writeAnnotatedInterfaceIndex().

Referenced by writeAnnotatedInterfaceIndex().

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2679 of file index.cpp.

2680{
2681 const auto &index = Index::instance();
2683 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2684 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2687 "annotatedstructs",
2689}
virtual DString trStructListDescription()=0
virtual DString trStructList()=0
@ AnnotatedStructs
Definition index.h:75

References AnnotatedIndexContext::AnnotatedIndexContext(), AnnotatedStructs, Index::instance(), ClassDef::Struct, theTranslator, Translator::trStructList(), Translator::trStructListDescription(), writeAnnotatedIndexGeneric(), and writeAnnotatedStructIndex().

Referenced by writeAnnotatedStructIndex().

◆ writeClassHierarchy()

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

Definition at line 1092 of file index.cpp.

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

References Doxygen::classLinkedMap, IndexList::decContentsDepth(), OutputList::disable(), endIndexHierarchy(), Doxygen::hiddenClassLinkedMap, Html, Doxygen::indexList, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), writeClassHierarchy(), and writeClassTreeForList().

Referenced by writeClassHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), and writeHierarchicalInterfaceIndex().

◆ writeClassLinkForMember()

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

Definition at line 2706 of file index.cpp.

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

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

Referenced by writeClassLinkForMember(), and writeMemberList().

◆ writeClassMemberIndex()

void writeClassMemberIndex ( OutputList & ol)
static

Definition at line 3300 of file index.cpp.

3306 ol.endTextBlock();
3307 if (dynamicMenus || disableIndex)
3308 {
3309 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3310 }
3311
3312 writeMemberList(ol,quickIndex,
3313 multiPageIndex ? letter : std::string(),
3314 index.isClassIndexLetterUsed(hl),
3316 endFile(ol);
3317 first=false;
3318 }
3319
3320 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3321
3322 ol.popGeneratorState();
3323}
3324
3325static void writeClassMemberIndex(OutputList &ol)
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
virtual DString trCompoundMembersDescriptionTotal(ClassMemberHighlight::Enum hl)=0
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3300
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3145
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, DString fullName, bool multiPage)
Definition index.cpp:3100
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2760

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3167 of file index.cpp.

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

Referenced by getFmhlInfo().

◆ writeClassTree()

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

Definition at line 1751 of file index.cpp.

1752{
1753 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1754 for (const auto &cdi : cl)
1755 {
1756 const ClassDef *cd = get_pointer(cdi);
1757 if (cd->getLanguage()==SrcLangExt::VHDL)
1758 {
1761 )// no architecture
1762 {
1763 continue;
1764 }
1765 }
1766
1767 if (sliceOpt && cd->compoundType() != ct)
1768 {
1769 continue;
1770 }
1771
1772 if (!globalOnly ||
1773 cd->getOuterScope()==nullptr ||
1775 )
1776 {
1777 int count=0;
1778 for (const auto &ccd : cd->getClasses())
1779 {
1780 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1781 {
1782 count++;
1783 }
1784 }
1786 {
1787 DString displayName = cd->displayName(false);
1788 if (ftv)
1789 {
1790 ftv->addContentsItem(count>0,displayName,cd->getReference(),
1791 cd->getOutputFileBase(),cd->anchor(),false,true,cd,convertToHtml(displayName));
1792 }
1793 if (addToIndex &&
1794 (cd->getOuterScope()==nullptr ||
1796 )
1797 )
1798 {
1799 addMembersToIndex(cd,LayoutDocManager::Class,
1800 displayName,
1801 cd->anchor(),
1802 cd->partOfGroups().empty() && !cd->isSimple());
1803 }
1804 if (count>0)
1805 {
1806 if (ftv) ftv->incContentsDepth();
1807 writeClassTree(cd->getClasses(),ftv,addToIndex,false,ct);
1808 if (ftv) ftv->decContentsDepth();
1809 }
1810 }
1811 }
1812 }
1813}
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
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
void decContentsDepth()
Definition ftvhelp.cpp:154
void incContentsDepth()
Definition ftvhelp.cpp:143
void addContentsItem(bool isDir, const DString &name, const DString &ref, const DString &file, const DString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const DString &nameAsHtml=DString())
Definition ftvhelp.cpp:186
bool classVisibleInIndex(const ClassDef *cd)
const ClassDef * get_pointer(const Ptr &p)

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

Referenced by writeAnnotatedIndexGeneric(), writeClassTree(), writeClassTreeInsideNamespaceElement(), and writeNamespaceTreeElement().

◆ writeClassTreeForList()

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

Definition at line 988 of file index.cpp.

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

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

Referenced by writeClassHierarchy(), and writeClassTreeForList().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 2040 of file index.cpp.

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

References writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2031 of file index.cpp.

2033{
2034 for (const auto &nd : nsLinkedMap)
2035 {
2036 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2037 }
2038}

References writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespaceElement().

Referenced by writeAnnotatedIndexGeneric(), writeClassTreeInsideNamespace(), writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespaceElement()

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

Definition at line 1959 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), Config_getBool, FTVHelp::decContentsDepth(), IndexList::decContentsDepth(), dstrlen(), ClassDef::Exception, NamespaceDef::getClasses(), NamespaceDef::getExceptions(), NamespaceDef::getInterfaces(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), NamespaceDef::getStructs(), Doxygen::globalScope, FTVHelp::incContentsDepth(), IndexList::incContentsDepth(), Doxygen::indexList, ClassDef::Interface, Definition::isAnonymous(), Definition::isLinkableInProject(), Definition::localName(), namespaceHasNestedClass(), DString::replace(), ClassDef::Struct, writeClassTree(), writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespaceElement().

Referenced by writeClassTreeInsideNamespace(), writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeToOutput()

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

Generates HTML Help tree of classes

Definition at line 622 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), Definition::anchor(), ClassDef::baseClasses(), classHasVisibleChildren(), classHasVisibleRoot(), VhdlDocGen::convert(), convertToHtml(), FTVHelp::decContentsDepth(), IndexList::decContentsDepth(), Definition::displayName(), OutputList::docify(), DString::DString(), 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(), Doxygen::indexList, 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 4739 of file index.cpp.

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

◆ writeConceptList()

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

Definition at line 4633 of file index.cpp.

4633 {
4634 if (addToIndex)
4635 {
4636 Doxygen::indexList->addContentsItem(true,title,DString(),"modules",DString(),true,true);
4638 }
4639 FTVHelp ftv(false);
4640 writeModuleList(ol,&ftv,addToIndex);
4641 TextStream t;
4643 ol.writeString(t.str());
4644 if (addToIndex)
4645 {
4647 }
4648 }
4649 ol.popGeneratorState();
4650 // 2.}
4651 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:881
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4541

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

Referenced by writeConceptTreeInsideNamespace(), and writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4717 of file index.cpp.

4725 {
4727 }
4728
4729 ftv->incContentsDepth();
4730 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,false,addToIndex);
4731 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4732 ftv->decContentsDepth();
4733
4734 if (addToIndex)
4735 {
4737 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4656
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4633

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4656 of file index.cpp.

4659{
4660 for (const auto &cd : concepts)
4661 {
4662 if (cd->isLinkableInProject())
4663 {

References writeConceptList().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4666 of file index.cpp.

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

◆ writeDirHierarchy()

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

Definition at line 924 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), addMembersToIndex(), Doxygen::dirLinkedMap, OutputList::disable(), endIndexHierarchy(), fileVisibleInIndex(), Doxygen::globalScope, Html, Doxygen::indexList, Doxygen::inputNameLinkedMap, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), startIndexHierarchy(), writeDirHierarchy(), and writeDirTreeNode().

Referenced by writeDirHierarchy(), and writeFileIndex().

◆ writeDirIndex()

void writeDirIndex ( OutputList & ol)
static

Definition at line 1566 of file index.cpp.

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

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

Referenced by writeDirIndex().

◆ writeDirTreeNode()

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

Definition at line 766 of file index.cpp.

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

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

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

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1595 of file index.cpp.

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

References IndexList::addContentsItem(), compareFileDefs(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, DString::DString(), DString::empty(), endFile(), OutputList::endIndexList(), OutputList::endTextBlock(), endTitle(), Files, DString::find(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, IndexList::incContentsDepth(), Doxygen::indexList, Doxygen::inputNameLinkedMap, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexList(), OutputList::startTextBlock(), startTitle(), DString::str(), TextStream::str(), theTranslator, LayoutNavEntry::title(), Translator::trFileList(), Translator::trFileListDescription(), LayoutNavEntry::visible(), writeDirHierarchy(), writeFileIndex(), writeSingleFileIndex(), and OutputList::writeString().

Referenced by writeFileIndex().

◆ writeFileLinkForMember()

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

Definition at line 2719 of file index.cpp.

2721{
2722 const FileDef *fd=md->getFileDef();
2723 if (fd && prevFileName!=fd->name())
2724 {
2725 ol.writeString(separator);
2727 fd->name());
2728 prevFileName = fd->name();
2729 }
2730}
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(), writeFileLinkForMember(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeFileLinkForMember(), and writeMemberList().

◆ writeFileMemberIndex()

void writeFileMemberIndex ( OutputList & ol)
static

Definition at line 3488 of file index.cpp.

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

◆ writeFileMemberIndexFiltered()

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

Definition at line 3360 of file index.cpp.

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

Referenced by getNmhlInfo().

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1234 of file index.cpp.

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

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

Referenced by writeGraphicalClassHierarchy().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1444 of file index.cpp.

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

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

Referenced by writeGraphicalExceptionHierarchy().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1339 of file index.cpp.

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

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

Referenced by writeGraphicalInterfaceHierarchy().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4098 of file index.cpp.

4108{
4109 int count=0;
4110 for (const auto &dd : *Doxygen::dirLinkedMap)
4111 {
4112 if (dd->isLinkableInProject())
4113 {
4114 count++;
4115 }
4116 }
4117 return count;
4118}
4119
4120
4121//----------------------------------------------------------------------------
4122
4123void writeGraphInfo(OutputList &ol)
4124{
4125 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4126 ol.pushGeneratorState();
4128
4129 DotLegendGraph gd;
4130 gd.writeGraph(Config_getString(HTML_OUTPUT));
4131
4132 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4133 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4134 // temporarily disable the stripping of comments for our own code example!
4135 Config_updateBool(STRIP_CODE_COMMENTS,false);
4136 // temporarily disable create subdirs for linking to our example
4137 Config_updateBool(CREATE_SUBDIRS,false);
4138
4139 startFile(ol,"graph_legend",false,DString(),theTranslator->trLegendTitle());
4140 startTitle(ol,DString());
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const DString &path)
virtual DString 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:4098

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4394 of file index.cpp.

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

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

Referenced by writeTopicIndex().

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4148 of file index.cpp.

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

References DString::left(), DString::mid(), and DString::npos.

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1365 of file index.cpp.

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

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

Referenced by writeHierarchicalExceptionIndex().

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1153 of file index.cpp.

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

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

Referenced by writeHierarchicalIndex().

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1260 of file index.cpp.

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

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

Referenced by writeHierarchicalInterfaceIndex().

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4877 of file index.cpp.

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

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5812 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5290 of file index.cpp.

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

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

◆ writeMemberIndex()

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

Definition at line 3100 of file index.cpp.

3103 {
3104 var item = navItems[i];
3105 var link = item.querySelector('a');
3106 item.classList.remove('current');
3107 if (link && link.getAttribute('href') === currentHash) {
3108 item.classList.add('current');
3109 }
3110 }
3111
3112 if (currentHash) {
3113 var target = document.querySelector(currentHash);
3114 if (target) {
3115 target.scrollIntoView();
3116 }
3117 }
3118}
3119updateNavHighlight();
3120window.addEventListener('hashchange', updateNavHighlight);
3121</script>
3122 )js");
3123}
3124
3125static void writeMemberIndex(OutputList &ol,
3126 const Index::MemberIndexMap &map, DString fullName,bool multiPage)
3127{
3128 bool first=true;
3129 ol.writeString("<br/>\n");
3130 DString alphaLinks = "<div class=\"qindex\">";
3131 StringMap usedLetters;
3132 for (const auto &[letter,list] : map)
3133 {
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 2760 of file index.cpp.

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

References ASSERT, DString::at(), convertToId(), DString::data(), OutputList::docify(), DString::empty(), OutputList::endItemList(), OutputList::endItemListItem(), OutputList::endSection(), getPrefixIndex(), letterToLabel(), OutputList::startItemList(), OutputList::startItemListItem(), OutputList::startSection(), SectionType::Subsection, 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 DString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
479 md->qualifiedName() : md->name();
480 if (md->getOuterScope()==def ||
481 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
483 {
485 name,md->getReference(),md->getOutputFileBase(),md->anchor(),false,lAddToIndex && md->getGroupDef()==nullptr);
486 }
487 else // inherited member
488 {
490 name,def->getReference(),def->getOutputFileBase(),md->anchor(),false,lAddToIndex && md->getGroupDef()==nullptr);
491 }
492 if (isDir)
493 {
494 if (!isAnonymous)
495 {
497 }
498 for (const auto &emd : enumList)
499 {
500 if (emd->hasDocumentation())
501 {
502 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
503 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
504 DString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
505 emd->qualifiedName() : emd->name();
506 if (emd->getOuterScope()==def ||
507 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
508 emd->getOuterScope()==Doxygen::globalScope)
509 {
511 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),false,lAddToIndex && emd->getGroupDef()==nullptr);
512 }
513 else // inherited member
514 {
516 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),false,lAddToIndex && emd->getGroupDef()==nullptr);
517 }
518 }
519 }
520 if (!isAnonymous)
521 {
523 }
524 }
525}
virtual DString qualifiedName() const =0
virtual GroupDef * getGroupDef()=0
virtual const MemberVector & enumFieldList() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0
iterator end() noexcept
Definition memberlist.h:56
iterator begin() noexcept
Definition memberlist.h:54

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

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5796 of file index.cpp.

5800 {
5801 auto numDoc = [](std::size_t i) {
5803 };
5804 auto memList = [](std::size_t i) {
5806 };
5807 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5808 }
5809 else // recursive into child list
5810 {
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 4565 of file index.cpp.

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

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

◆ writeModuleLinkForMember()

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

Definition at line 2745 of file index.cpp.

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

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

Referenced by writeMemberList(), and writeModuleLinkForMember().

◆ writeModuleList()

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

Definition at line 4541 of file index.cpp.

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

Referenced by writeConceptList(), and writeModuleIndex().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3856 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3724 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1841 of file index.cpp.

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

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

Referenced by writeModuleMembers().

◆ writeModuleTreeNode()

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

Definition at line 4487 of file index.cpp.

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

References Doxygen::indexList.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2049 of file index.cpp.

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

References IndexList::addContentsItem(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, DString::DString(), dstrlen(), endFile(), OutputList::endIndexKey(), OutputList::endIndexList(), OutputList::endIndexValue(), OutputList::endTextBlock(), endTitle(), LayoutNavEntry::find(), OutputList::generateDoc(), FTVHelp::generateTreeViewInline(), Html, IndexList::incContentsDepth(), Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Man, Doxygen::namespaceLinkedMap, Namespaces, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexKey(), OutputList::startIndexList(), OutputList::startIndexValue(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), Translator::trNamespaceList(), Translator::trNamespaceListDescription(), LayoutNavEntry::visible(), writeNamespaceIndex(), writeNamespaceTree(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeNamespaceIndex().

◆ writeNamespaceLinkForMember()

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

Definition at line 2732 of file index.cpp.

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

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

Referenced by writeMemberList(), and writeNamespaceLinkForMember().

◆ writeNamespaceMemberIndex()

void writeNamespaceMemberIndex ( OutputList & ol)
static

Definition at line 3672 of file index.cpp.

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

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3547 of file index.cpp.

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

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

Referenced by getMmhlInfo().

◆ writeNamespaceMembers()

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

Definition at line 1815 of file index.cpp.

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

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

Referenced by writeNamespaceMembers(), and writeNamespaceTreeElement().

◆ writeNamespaceTree() [1/2]

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

Definition at line 1944 of file index.cpp.

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

References writeNamespaceTree(), and writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1932 of file index.cpp.

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

References writeNamespaceTree(), and writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), writeNamespaceTree(), writeNamespaceTree(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1872 of file index.cpp.

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

References FTVHelp::addContentsItem(), IndexList::addContentsItem(), ClassDef::Class, NamespaceDef::countVisibleMembers(), FTVHelp::decContentsDepth(), IndexList::decContentsDepth(), dstrlen(), DString::empty(), NamespaceDef::getClasses(), NamespaceDef::getConcepts(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::globalScope, FTVHelp::incContentsDepth(), IndexList::incContentsDepth(), Doxygen::indexList, Definition::isAnonymous(), Definition::isLinkable(), Definition::localName(), namespaceHasNestedClass(), namespaceHasNestedConcept(), namespaceHasNestedNamespace(), Definition::partOfGroups(), DString::replace(), writeClassTree(), writeConceptList(), writeNamespaceMembers(), writeNamespaceTree(), and writeNamespaceTreeElement().

Referenced by writeNamespaceTree(), writeNamespaceTree(), and writeNamespaceTreeElement().

◆ writePageIndex()

void writePageIndex ( OutputList & ol)
static

Definition at line 4024 of file index.cpp.

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

◆ writePages()

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

Definition at line 3964 of file index.cpp.

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

References endFile().

Referenced by countGroups().

◆ writeQuickMemberIndex()

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

Definition at line 3073 of file index.cpp.

3076{
3077 bool first=true;
3078 startQuickIndexList(ol,true);
3079 for (const auto &[letter,list] : map)
3080 {
3081 DString ci(letter);
3082 DString is = letterToLabel(ci);
3083 DString anchor;
3085 if (!multiPage)
3086 anchor="#index_";
3087 else if (first)
3088 anchor=fullName+extension+"#index_";
3089 else
3090 anchor=fullName+"_"+is+extension+"#index_";
3091 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,true,first);
3092 ol.writeString(ci);
3094 first=false;
3095 }
3097 ol.writeString(R"js(
3098<script type="text/javascript">

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

Referenced by writeQuickMemberIndex().

◆ writeSingleFileIndex()

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

Definition at line 1492 of file index.cpp.

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

References DString::at(), Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disableAllBut(), OutputList::docify(), DString::DString(), DString::empty(), OutputList::endIndexKey(), OutputList::endIndexValue(), OutputList::endTextLink(), OutputList::generateDoc(), FileDef::generateSourceFile(), Definition::getOutputFileBase(), FileDef::getPath(), Definition::getSourceFileBase(), Html, FileDef::includeName(), FileDef::isDocumentationFile(), Definition::isLinkableInProject(), Definition::isReference(), DString::length(), Definition::name(), OutputList::parseText(), OutputList::popGeneratorState(), DString::prepend(), OutputList::pushGeneratorState(), OutputList::startIndexKey(), OutputList::startIndexValue(), OutputList::startTextLink(), stripFromPath(), theTranslator, Translator::trCode(), OutputList::writeObjectLink(), and writeSingleFileIndex().

Referenced by writeFileIndex(), and writeSingleFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4418 of file index.cpp.

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

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

◆ writeUserGroupStubPage()

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

Definition at line 4840 of file index.cpp.

4843 {
4844 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4845 }
4846 writeConceptRootList(&ftv,addToIndex);
4847 TextStream t;
4848 ftv.generateTreeViewInline(t);
4849 ol.writeString(t.str());
4850 if (addToIndex)
4851 {
4853 }
4854 }
4855 ol.popGeneratorState();
4856 // 2.}
4857
4858 endFile(ol);
4859 ol.popGeneratorState();
4860 // 1.}
4861}
4862
4863//----------------------------------------------------------------------------
4864
4866{
4867 if (lne->baseFile().startsWith("usergroup"))
4868 {
4869 ol.pushGeneratorState();
4871 startFile(ol,lne->baseFile(),false,DString(),lne->title(),HighlightedItem::UserGroup);
4872 startTitle(ol,DString());
bool startsWith(const char *s) const
Definition dstring.h:589
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4717
DString 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 5288 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 343 of file index.cpp.