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 "conceptdef.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 56 of file index.cpp.

◆ MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 57 of file index.cpp.

Typedef Documentation

◆ UsedIndexLetters

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

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

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

References IndexList::addContentsItem(), addMembersToIndex(), Config_getBool, convertToHtml(), IndexList::decContentsDepth(), DString::empty(), 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 2151 of file index.cpp.

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

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1120 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1144 of file index.cpp.

1145{
1146 int count=0;
1149 return count;
1150}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:89
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1120

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1735 of file index.cpp.

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

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4083 of file index.cpp.

4093{
4094 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1471 of file index.cpp.

1472{
1473 allFiles=0;
1474 docFiles=0;
1475 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1476 {
1477 for (const auto &fd: *fn)
1478 {
1479 bool src = false;
1480 bool doc = fd->visibleInIndex(src);
1481 if (doc || src)
1482 {
1483 allFiles++;
1484 }
1485 if (doc)
1486 {
1487 docFiles++;
1488 }
1489 }
1490 }
1491}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:97

References Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4067 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1724 of file index.cpp.

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

References Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3947 of file index.cpp.

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

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 739 of file index.cpp.

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

References dirHasVisibleChildren(), 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 430 of file index.cpp.

432{
433 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
436 if (!skipNavIndex)
437 {
438 if (!skipEndContents) ol.endContents();
439 if (generateTreeView)
440 {
441 ol.writeString("</div><!-- doc-content -->\n");
442 ol.writeString("</div><!-- container -->\n");
443 }
444 }
445
446 ol.writeFooter(navPath); // write the footer
448 ol.endFile();
449}
void writeFooter(const DString &navPath)
Definition outputlist.h:395
void endContents()
Definition outputlist.h:616
void writeString(const DString &text)
Definition outputlist.h:407
void endFile()
Definition outputlist.h:397
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()

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

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

◆ endFileWithNavPath()

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

Definition at line 451 of file index.cpp.

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

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

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

◆ endIndexHierarchy()

◆ endQuickIndexItem()

void endQuickIndexItem ( OutputList & ol)
static

Definition at line 380 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 361 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1748 of file index.cpp.

1748{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1749 of file index.cpp.

1749{ return p; }

◆ get_pointer() [3/3]

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

Referenced by writeClassTree().

◆ getCmhlInfo()

const CmhlInfo * getCmhlInfo ( size_t hl)
static

Definition at line 3146 of file index.cpp.

3165{
3166 CmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
Helper class representing a class member in the navigation menu.
Definition index.cpp:3140

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3338 of file index.cpp.

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

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

◆ getMmhlInfo()

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3524 of file index.cpp.

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

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

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2247 of file index.cpp.

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

Referenced by letterToLabel().

◆ letterToLabel()

DString letterToLabel ( const DString & startLetter)
static

Definition at line 2252 of file index.cpp.

2253{
2254 if (startLetter.empty()) return startLetter;
2255 const char *p = startLetter.data();
2256 char c = *p;
2257 DString result;
2258 if (isId1(c))
2259 {
2260 result+=c;
2261 }
2262 else
2263 {
2264 result="0x";
2265 const char hex[]="0123456789abcdef";
2266 while ((c=*p++))
2267 {
2268 result+=hex[static_cast<unsigned char>(c)>>4];
2269 result+=hex[static_cast<unsigned char>(c)&0xf];
2270 }
2271 }
2272 return result;
2273}
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition dstring.h:152
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:161
bool isId1(int c)
Definition index.cpp:2247

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

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

◆ MemberIndexMap_add()

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

Definition at line 183 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5614 of file index.cpp.

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

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

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5722 of file index.cpp.

5732 {text:\"" << convertToJSString(ci) << "\",url:\""
5733 << convertToJSString(anchor+convertToId(is)) << "\"}";
5734 firstLetter=false;
5735 }
5736 t << "]";
5737 }
5738 t << "}";
5739 }
5740 }
5741 if (!firstMember)
5742 {
5743 t << "]";
5744 }
5745}
5746
5747static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5748{
5749 int count=0;
5750 for (const auto &entry : root->children())
5751 {
5752 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5753 }
5754 if (count>0) // at least one item is visible
5755 {
5756 bool firstChild = true;
5757 if (!first) t << ",";
5758 t << "children:[\n";
5759 for (const auto &entry : root->children())
5760 {
5761 if (entry->visible() && quickLinkVisible(entry->kind()))
5762 {
5763 if (!firstChild) t << ",\n";
5764 firstChild=false;
5765 DString url = entry->url();
5766 if (isURL(url)) url = "^" + url;
5767 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5768 << convertToJSString(url) << "\"";
5769 bool hasChildren=false;
5770 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5771 {
5772 auto numDoc = [](std::size_t i) {
5774 };
5775 auto memList = [](std::size_t i) {
5777 };
5778 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5779 }
5780 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5781 {
5782 auto numDoc = [](std::size_t i) {
5784 };
5785 auto memList = [](std::size_t i) {
5787 };
5788 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5789 }
5790 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5791 {
5792 auto numDoc = [](std::size_t i) {
5794 };
5795 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:134
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:137
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:136
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:154
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:149
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5722
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3709
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3524
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:155
const LayoutNavEntryList & children() const
Definition layout.h:218
bool isURL(const DString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:4648
DString convertToId(const DString &s)
Definition util.cpp:3204

References Doxygen::htmlFileExtension.

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

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

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

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

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 367 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 348 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 387 of file index.cpp.

388{
389 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
391 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
392 ol.startTitleHead(fileName);
395}
virtual void writeSummaryLinks(OutputList &) const =0
void startTitleHead(const DString &fileName)
Definition outputlist.h:399
void startHeaderSection()
Definition outputlist.h:461

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

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

◆ writeAlphabeticalClassList()

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

Definition at line 2281 of file index.cpp.

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

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

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

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2524 of file index.cpp.

2525{
2526 if (Index::instance().numAnnotatedExceptions()==0) return;
2527 ol.pushGeneratorState();
2529 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2530 DString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2531 bool addToIndex = lne==nullptr || lne->visible();
2532
2533 startFile(ol,"exceptions",false,DString(),title,HighlightedItem::Exceptions);
2534
2535 startTitle(ol,DString());
2536 ol.parseText(title);
2537 endTitle(ol,DString(),DString());
2538
2539 if (addToIndex)
2540 {
2541 Doxygen::indexList->addContentsItem(false,title,DString(),"exceptions",DString(),false,true);
2542 }
2543
2544 ol.startContents();
2545 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2546 endFile(ol); // contains ol.endContents()
2547
2548 ol.popGeneratorState();
2549}
@ Exception
Definition classdef.h:111
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1447
void parseText(const DString &textStr)
void startContents()
Definition outputlist.h:614
virtual DString trExceptionIndex()=0
void endTitle(OutputList &ol, const DString &fileName, const DString &name)
Definition index.cpp:397
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
Definition index.cpp:387
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2281
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:404
Translator * theTranslator
Definition language.cpp:71
LayoutNavEntry * find(LayoutNavEntry::Kind k, const DString &file=DString()) const
Definition layout.cpp:134
DString title() const
Definition layout.h:215
bool visible() const
Definition layout.h:221

References IndexList::addContentsItem(), OutputList::disableAllBut(), 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(), and writeAlphabeticalClassList().

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2437 of file index.cpp.

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

References IndexList::addContentsItem(), ClassDef::Class, Classes, OutputList::disableAllBut(), 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(), and writeAlphabeticalClassList().

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2466 of file index.cpp.

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

References IndexList::addContentsItem(), OutputList::disableAllBut(), 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(), and writeAlphabeticalClassList().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2495 of file index.cpp.

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

References IndexList::addContentsItem(), OutputList::disableAllBut(), 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(), and writeAlphabeticalClassList().

◆ writeAnnotatedClassList()

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

Definition at line 2176 of file index.cpp.

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

References Doxygen::classLinkedMap, Config_getBool, VhdlDocGen::convert(), OutputList::disable(), Docbook, OutputList::docify(), 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(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeAnnotatedIndexGeneric().

◆ writeAnnotatedExceptionIndex()

void writeAnnotatedExceptionIndex ( OutputList & ol)
static

Definition at line 2694 of file index.cpp.

2695{
2696 const auto &index = Index::instance();
2698 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2699 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2702 "annotatedexceptions",
2704}
virtual DString trExceptionList()=0
virtual DString trExceptionListDescription()=0
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2578
@ AnnotatedExceptions
Definition index.h:75

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

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2652 of file index.cpp.

2653{
2654 const auto &index = Index::instance();
2656 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2657 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2660 "annotated",
2662}
virtual DString trCompoundList()=0
virtual DString trCompoundListDescription()=0
@ AnnotatedClasses
Definition index.h:72

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

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2578 of file index.cpp.

2579{
2580 //printf("writeAnnotatedIndex: count=%d printed=%d\n", ctx.numAnnotated, ctx.numPrinted);
2581 if (ctx.numAnnotated==0) return;
2582
2583 ol.pushGeneratorState();
2585 if (ctx.numPrinted==0)
2586 {
2589 }
2591 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2592 DString title = lne ? lne->title() : ctx.listDefaultTitleText;
2593 bool addToIndex = lne==nullptr || lne->visible();
2594
2595 startFile(ol,ctx.fileBaseName,false,DString(),title,ctx.hiItem);
2596
2597 startTitle(ol,DString());
2598 ol.parseText(title);
2599 endTitle(ol,DString(),DString());
2600
2601 ol.startContents();
2602
2603 ol.startTextBlock();
2604 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2605 ol.endTextBlock();
2606
2607 // ---------------
2608 // Linear class index for Latex/RTF
2609 // ---------------
2610 ol.pushGeneratorState();
2613
2615
2617 ol.popGeneratorState();
2618
2619 // ---------------
2620 // Hierarchical class index for HTML
2621 // ---------------
2622 ol.pushGeneratorState();
2624
2625 {
2626 if (addToIndex)
2627 {
2628 Doxygen::indexList->addContentsItem(true,title,DString(),ctx.fileBaseName,DString(),true,true);
2630 }
2631 FTVHelp ftv(false);
2633 writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,true,ctx.compoundType);
2634 TextStream t;
2635 ftv.generateTreeViewInline(t);
2636 ol.writeString(t.str());
2637 if (addToIndex)
2638 {
2640 }
2641 }
2642
2643 ol.popGeneratorState();
2644 // ------
2645
2646 endFile(ol); // contains ol.endContents()
2647 ol.popGeneratorState();
2648}
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
void enable()
enable the indices
Definition indexlist.h:93
void disable()
disable the indices
Definition indexlist.h:89
void endTextBlock(bool paraBreak=false)
Definition outputlist.h:668
void startTextBlock(bool dense=false)
Definition outputlist.h:666
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:2176
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2032
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1752
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2570
const DString listDefaultTitleText
Definition index.cpp:2571
const DString fileBaseName
Definition index.cpp:2574
const ClassDef::CompoundType compoundType
Definition index.cpp:2573
const HighlightedItem hiItem
Definition index.cpp:2575
const LayoutNavEntry::Kind listKind
Definition index.cpp:2569
const DString listDefaultIntroText
Definition index.cpp:2572
const int numAnnotated
Definition index.cpp:2567
DString intro() const
Definition layout.h:216

References IndexList::addContentsItem(), Doxygen::classLinkedMap, AnnotatedIndexContext::compoundType, IndexList::decContentsDepth(), IndexList::disable(), OutputList::disable(), OutputList::disableAllBut(), IndexList::enable(), endFile(), OutputList::endTextBlock(), endTitle(), AnnotatedIndexContext::fallbackKind, AnnotatedIndexContext::fileBaseName, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), AnnotatedIndexContext::hiItem, Html, IndexList::incContentsDepth(), 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(), writeClassTree(), writeClassTreeInsideNamespace(), and OutputList::writeString().

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

◆ writeAnnotatedInterfaceIndex()

void writeAnnotatedInterfaceIndex ( OutputList & ol)
static

Definition at line 2666 of file index.cpp.

2667{
2668 const auto &index = Index::instance();
2670 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2671 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2674 "annotatedinterfaces",
2676}
virtual DString trInterfaceList()=0
virtual DString trInterfaceListDescription()=0
@ AnnotatedInterfaces
Definition index.h:73

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

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2680 of file index.cpp.

2681{
2682 const auto &index = Index::instance();
2684 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2685 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2688 "annotatedstructs",
2690}
virtual DString trStructListDescription()=0
virtual DString trStructList()=0
@ AnnotatedStructs
Definition index.h:74

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

◆ writeClassHierarchy()

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

Definition at line 1093 of file index.cpp.

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

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

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

◆ writeClassLinkForMember()

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

Definition at line 2707 of file index.cpp.

2709{
2710 const ClassDef *cd=md->getClassDef();
2711 if ( cd && prevClassName!=cd->displayName())
2712 {
2713 ol.writeString(separator);
2715 cd->displayName());
2716 prevClassName = cd->displayName();
2717 }
2718}
A abstract class representing of a compound symbol.
Definition classdef.h:100
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(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeMemberList().

◆ writeClassMemberIndex()

void writeClassMemberIndex ( OutputList & ol)
static

Definition at line 3301 of file index.cpp.

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

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3168 of file index.cpp.

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

◆ writeClassTree()

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

Definition at line 1752 of file index.cpp.

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

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

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

Referenced by writeClassHierarchy().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 2041 of file index.cpp.

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2032 of file index.cpp.

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

References writeClassTreeInsideNamespaceElement().

Referenced by writeAnnotatedIndexGeneric(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespaceElement()

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

Definition at line 1960 of file index.cpp.

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

Referenced by writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespace().

◆ writeClassTreeToOutput()

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

Generates HTML Help tree of classes

Definition at line 623 of file index.cpp.

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

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

◆ writeConceptList()

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

Definition at line 4634 of file index.cpp.

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

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

Referenced by writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4718 of file index.cpp.

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

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4657 of file index.cpp.

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

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4667 of file index.cpp.

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

◆ writeDirHierarchy()

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

Definition at line 925 of file index.cpp.

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

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

Referenced by writeFileIndex().

◆ writeDirIndex()

void writeDirIndex ( OutputList & ol)
static

Definition at line 1567 of file index.cpp.

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

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

◆ writeDirTreeNode()

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

Definition at line 767 of file index.cpp.

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

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

References IndexList::addContentsItem(), ModuleMemberHighlight::All, IndexList::decContentsDepth(), 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(), and writeModuleMemberIndexFiltered().

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1596 of file index.cpp.

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

References IndexList::addContentsItem(), compareFileDefs(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, 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(), writeSingleFileIndex(), and OutputList::writeString().

◆ writeFileLinkForMember()

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

Definition at line 2720 of file index.cpp.

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

References Definition::anchor(), MemberDef::getFileDef(), Definition::getOutputFileBase(), Definition::getReference(), Definition::name(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeMemberList().

◆ writeFileMemberIndex()

void writeFileMemberIndex ( OutputList & ol)
static

Definition at line 3489 of file index.cpp.

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

◆ writeFileMemberIndexFiltered()

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

Definition at line 3361 of file index.cpp.

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

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1235 of file index.cpp.

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

References ClassHierarchy, OutputList::disableAllBut(), 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(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1445 of file index.cpp.

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

References OutputList::disableAllBut(), 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(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1340 of file index.cpp.

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

References OutputList::disableAllBut(), 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(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4099 of file index.cpp.

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

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4395 of file index.cpp.

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

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

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4149 of file index.cpp.

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

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

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1366 of file index.cpp.

1367{
1368 if (Index::instance().numHierarchyExceptions()==0) return;
1369 ol.pushGeneratorState();
1370 //1.{
1372
1373 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1374 DString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1375 bool addToIndex = lne==nullptr || lne->visible();
1376
1377 startFile(ol,"exceptionhierarchy",false,DString(), title, HighlightedItem::ExceptionHierarchy);
1378 startTitle(ol,DString());
1379 ol.parseText(title);
1380 endTitle(ol,DString(),DString());
1381 ol.startContents();
1382 ol.startTextBlock();
1383
1384 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1385 {
1388 ol.startParagraph();
1389 ol.startTextLink("exceptioninherits",DString());
1391 ol.endTextLink();
1392 ol.endParagraph();
1395 }
1397 ol.endTextBlock();
1398
1399 // ---------------
1400 // Static exception hierarchy for Latex/RTF
1401 // ---------------
1402 ol.pushGeneratorState();
1403 //2.{
1406
1407 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1408
1410 ol.popGeneratorState();
1411 //2.}
1412
1413 // ---------------
1414 // Dynamic exception hierarchical index for HTML
1415 // ---------------
1416 ol.pushGeneratorState();
1417 //2.{
1419
1420 {
1421 if (addToIndex)
1422 {
1423 Doxygen::indexList->addContentsItem(true,title,DString(),"exceptionhierarchy",DString(),true,true);
1424 }
1425 FTVHelp ftv(false);
1426 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1427 TextStream t;
1428 ftv.generateTreeViewInline(t);
1429 ol.pushGeneratorState();
1431 ol.writeString(t.str());
1432 ol.popGeneratorState();
1433 }
1434 ol.popGeneratorState();
1435 //2.}
1436 // ------
1437
1438 endFile(ol);
1439 ol.popGeneratorState();
1440 //1.}
1441}
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:1093

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

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1154 of file index.cpp.

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

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

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1261 of file index.cpp.

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

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

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4878 of file index.cpp.

4878 : lne->children())
4879 {
4880 if (entry->visible()) count++;
4881 }
4882 if (count>0)
4883 {
4884 ol.writeString("<ul>\n");
4885 for (const auto &entry: lne->children())
4886 {
4887 if (entry->visible())
4888 {
4889 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4890 HtmlGenerator::fixSpaces(entry->title())+"</span></a></li>\n");
4891 }
4892 }
4893 ol.writeString("</ul>\n");
4894 }
4895 endFile(ol);
4896 ol.popGeneratorState();
4897 }
4898}
4899
4900//----------------------------------------------------------------------------
4901
4902
4903static void writeIndex(OutputList &ol)
4904{
4905 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4906 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4907 bool disableIndex = Config_getBool(DISABLE_INDEX);
4908 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4909 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4910 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4911 DString projectName = Config_getString(PROJECT_NAME);
4912 // save old generator state
4913 ol.pushGeneratorState();
4914
4915 DString projPrefix;
4916 if (!projectName.empty())
4917 {
4918 projPrefix=projectName+" ";
4919 }
4920
4921 //--------------------------------------------------------------------
4922 // write HTML index
4923 //--------------------------------------------------------------------
4925
4926 DString defFileName =
4927 Doxygen::mainPage ? Doxygen::mainPage->docFile() : DString("[generated]");
4928 int defLine =
4929 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4930
4931 DString title, titleAsHtml;
4932 if (!mainPageHasTitle())
4933 {
4934 title = theTranslator->trMainPage();
4935 }
4936 else if (Doxygen::mainPage)
4937 {
4938 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4939 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4940 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4941 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4942 }
4943
4944 DString indexName="index";
4945 ol.startFile(indexName,false,DString(),title);
4946
4948 {
4949 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4950 bool hasTitle = !projectName.empty() && mainPageHasTitle() && dstricmp(title,projectName)!=0;
4951 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4952 if (hasTitle) // to avoid duplicate entries in the treeview
4953 {
4955 title,
4956 DString(),
4957 indexName,
4958 DString(),
4959 hasSubs,
4960 true,
4961 nullptr,
4962 titleAsHtml);
4963 }
4964 if (hasSubs)
4965 {
4966 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
4967 }
4968 }
4969
4970 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4971 ol.startQuickIndices();
4972 if (!disableIndex && !quickLinksAfterSplitbar)
4973 {
4975 }
4976 ol.endQuickIndices();
4977 ol.writeSplitBar(indexName,DString());
4978 if (quickLinksAfterSplitbar)
4979 {
4981 }
4982 ol.writeSearchInfo();
4983 bool headerWritten=false;
4985 {
4986 if (!Doxygen::mainPage->title().empty())
4987 {
4988 if (Doxygen::mainPage->title().lower() != "notitle")
4989 ol.startPageDoc(Doxygen::mainPage->title());
4990 else
4991 ol.startPageDoc("");
4992 }
4993 else
4994 ol.startPageDoc(projectName);
4995 }
4996 if (Doxygen::mainPage && !Doxygen::mainPage->title().empty())
4997 {
4998 if (Doxygen::mainPage->title().lower()!="notitle")
4999 {
5000 ol.startHeaderSection();
5001 ol.startTitleHead(DString());
5002 ol.generateDoc(Doxygen::mainPage->docFile(),
5003 Doxygen::mainPage->getStartBodyLine(),
5004 Doxygen::mainPage.get(),
5005 nullptr,
5006 Doxygen::mainPage->title(),
5007 DocOptions()
5008 .setSingleLine(true));
5009 headerWritten = true;
5010 }
5011 }
5012 else
5013 {
5014 if (!projectName.empty())
5015 {
5016 ol.startHeaderSection();
5017 ol.startTitleHead(DString());
5018 ol.parseText(theTranslator->trDocumentation(projectName));
5019 headerWritten = true;
5020 }
5021 }
5022 if (headerWritten)
5023 {
5025 ol.endHeaderSection();
5026 }
5027
5028 ol.startContents();
5029 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5030 {
5032 }
5033
5035 {
5036 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5037 {
5038 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5039 }
5040
5041 ol.startTextBlock();
5042 ol.generateDoc(defFileName,
5043 defLine,
5044 Doxygen::mainPage.get(),
5045 nullptr,
5046 Doxygen::mainPage->documentation(),
5047 DocOptions()
5048 .setIndexWords(true));
5049 ol.endTextBlock();
5050 ol.endPageDoc();
5051 }
5052
5055 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5057
5058 if (Doxygen::mainPage &&
5059 generateTreeView &&
5060 pageOutlinePanel &&
5061 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5062 Doxygen::mainPage->hasSections()
5063 )
5064 {
5065 ol.writeString("</div><!-- doc-content -->\n");
5066 ol.endContents();
5067 Doxygen::mainPage->writePageNavigation(ol);
5068 ol.writeString("</div><!-- container -->\n");
5069 endFile(ol,true,true);
5070 }
5071 else
5072 {
5073 endFile(ol);
5074 }
5075
5077
5078 //--------------------------------------------------------------------
5079 // write LaTeX/RTF index
5080 //--------------------------------------------------------------------
5084
5086 {
5087 msg("Generating main page...\n");
5088 Doxygen::mainPage->writeDocumentation(ol);
5089 }
5090
5091 ol.startFile("refman",false,DString(),DString());
5095
5096 if (projPrefix.empty())
5097 {
5099 }
5100 else
5101 {
5102 ol.parseText(projPrefix);
5103 }
5104
5105 if (!Config_getString(PROJECT_NUMBER).empty())
5106 {
5107 ol.startProjectNumber();
5108 ol.generateDoc(defFileName,
5109 defLine,
5110 Doxygen::mainPage.get(),
5111 nullptr,
5112 Config_getString(PROJECT_NUMBER),
5113 DocOptions());
5114 ol.endProjectNumber();
5115 }
5122
5123 ol.lastIndexPage();
5125 {
5128 }
5129 const auto &index = Index::instance();
5130 if (index.numDocumentedPages()>0)
5131 {
5134 }
5135
5137 if (!Config_getBool(LATEX_HIDE_INDICES))
5138 {
5139 //if (indexedPages>0)
5140 //{
5141 // ol.startIndexSection(isPageIndex);
5142 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5143 // ol.endIndexSection(isPageIndex);
5144 //}
5145 if (index.numDocumentedModules()>0)
5146 {
5148 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5150 }
5151 if (index.numDocumentedGroups()>0)
5152 {
5154 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5156 }
5157 if (index.numDocumentedDirs()>0)
5158 {
5162 }
5163 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5164 {
5165 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5166 if (lne)
5167 {
5169 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5171 }
5172 }
5173 if (index.numDocumentedConcepts()>0)
5174 {
5176 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5178 }
5179 if (index.numHierarchyInterfaces()>0)
5180 {
5182 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5184 }
5185 if (index.numHierarchyClasses()>0)
5186 {
5187 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5188 if (lne)
5189 {
5191 ol.parseText(/*projPrefix+*/
5192 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5193 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5195 ));
5197 }
5198 }
5199 if (index.numHierarchyExceptions()>0)
5200 {
5202 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5204 }
5205 if (index.numAnnotatedInterfacesPrinted()>0)
5206 {
5208 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5210 }
5211 if (index.numAnnotatedClassesPrinted()>0)
5212 {
5214 ol.parseText(/*projPrefix+*/
5215 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5216 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5218 ));
5220 }
5221 if (index.numAnnotatedStructsPrinted()>0)
5222 {
5224 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5226 }
5227 if (index.numAnnotatedExceptionsPrinted()>0)
5228 {
5230 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5232 }
5233 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5234 {
5236 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5238 }
5239 }
5241
5242 if (index.numDocumentedModules()>0)
5243 {
5245 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5247 }
5248 if (index.numDocumentedGroups()>0)
5249 {
5251 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5253 }
5254 if (index.numDocumentedDirs()>0)
5255 {
5257 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5259 }
5260 if (index.numDocumentedNamespaces()>0)
5261 {
5265 }
5266 if (index.numDocumentedConcepts()>0)
5267 {
5269 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5271 }
5272 if (index.numAnnotatedInterfacesPrinted()>0)
5273 {
5275 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5277 }
5278 if (index.numAnnotatedClassesPrinted()>0)
5279 {
5283 }
5284 if (index.numAnnotatedStructsPrinted()>0)
5285 {
5287 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
static const DString crawlFileName
Definition sitemap.h:72
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:93
void addIndexFile(const DString &name)
Definition indexlist.h:121
void endPageDoc()
Definition outputlist.h:620
void endIndexSection(IndexSection is)
Definition outputlist.h:383
void startProjectNumber()
Definition outputlist.h:387
void startPageDoc(const DString &pageTitle)
Definition outputlist.h:618
void lastIndexPage()
Definition outputlist.h:670
void endProjectNumber()
Definition outputlist.h:389
void startIndexSection(IndexSection is)
Definition outputlist.h:381
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:440
static void writeIndex(OutputList &ol)
Definition index.cpp:4878
@ isMainPage
Definition index.h:34
@ isTitlePageAuthor
Definition index.h:33
@ isFileIndex
Definition index.h:42
@ isPageDocumentation
Definition index.h:52
@ isDirDocumentation
Definition index.h:46
@ isModuleDocumentation
Definition index.h:44
@ isClassHierarchyIndex
Definition index.h:40
@ isModuleIndex
Definition index.h:35
@ isTopicIndex
Definition index.h:36
@ isConceptIndex
Definition index.h:39
@ isClassDocumentation
Definition index.h:48
@ isCompoundIndex
Definition index.h:41
@ isConceptDocumentation
Definition index.h:49
@ isDirIndex
Definition index.h:37
@ isNamespaceIndex
Definition index.h:38
@ isNamespaceDocumentation
Definition index.h:47
@ isTitlePageStart
Definition index.h:32
@ isTopicDocumentation
Definition index.h:45
#define msg(fmt,...)
Definition message.h:94
bool mainPageHasTitle()
Definition util.cpp:4961
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3933

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5813 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5291 of file index.cpp.

5291 {
5293 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5295 }
5296 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5297 {
5299 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5301 }
5302 if (!Doxygen::exampleLinkedMap->empty())
5303 {
5305 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5307 }
5309 endFile(ol);
5310
5311 ol.popGeneratorState();
5312}
5313
5314static std::vector<bool> indexWritten;
5315
5316static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5317{
5318 auto isRef = [](const DString &s)
5319 {
5320 return s.startsWith("@ref") || s.startsWith("\\ref");
5321 };
5322 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5323 const auto &index = Index::instance();
5324 for (const auto &lne : entries)
5325 {
5326 LayoutNavEntry::Kind kind = lne->kind();
5327 size_t idx = static_cast<size_t>(kind);
5328 if (idx>=indexWritten.size())
5329 {
5330 size_t oldSize = indexWritten.size();
5331 size_t newSize = idx+1;
5332 indexWritten.resize(newSize);
5333 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=false;
5334 }
5335 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5336 bool addToIndex=lne->visible();
5337 bool needsClosing=false;
5338 if (!indexWritten.at(idx))
5339 {
5340 switch(kind)
5341 {
5342 case LayoutNavEntry::MainPage:
5343 msg("Generating index page...\n");
5344 writeIndex(ol);
5345 break;
5346 case LayoutNavEntry::Pages:
5347 msg("Generating page index...\n");
5348 writePageIndex(ol);
5349 break;
5350 case LayoutNavEntry::Topics:
5351 msg("Generating topic index...\n");
5352 writeTopicIndex(ol);
5353 break;
5354 case LayoutNavEntry::Modules:
5355 {
5356 if (index.numDocumentedModules()>0 && addToIndex)
5357 {
5358 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5360 needsClosing=true;
5361 }
5362 }
5363 break;
5364 case LayoutNavEntry::ModuleList:
5365 msg("Generating module index...\n");
5366 writeModuleIndex(ol);
5367 break;
5368 case LayoutNavEntry::ModuleMembers:
5369 msg("Generating module member index...\n");
5371 break;
5372 case LayoutNavEntry::Namespaces:
5373 {
5374 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5375 if (showNamespaces)
5376 {
5377 if (index.numDocumentedNamespaces()>0 && addToIndex)
5378 {
5379 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5381 needsClosing=true;
5382 }
5383 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5384 {
5385 msg("Generating namespace index...\n");
5387 }
5388 }
5389 }
5390 break;
5391 case LayoutNavEntry::NamespaceList:
5392 {
5393 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5394 if (showNamespaces)
5395 {
5396 msg("Generating namespace index...\n");
5398 }
5399 }
5400 break;
5401 case LayoutNavEntry::NamespaceMembers:
5402 msg("Generating namespace member index...\n");
5404 break;
5405 case LayoutNavEntry::Classes:
5406 if (index.numAnnotatedClasses()>0 && addToIndex)
5407 {
5408 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5410 needsClosing=true;
5411 }
5412 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5413 {
5414 msg("Generating annotated compound index...\n");
5416 }
5417 break;
5418 case LayoutNavEntry::Concepts:
5419 msg("Generating concept index...\n");
5421 break;
5422 case LayoutNavEntry::ClassList:
5423 msg("Generating annotated compound index...\n");
5425 break;
5426 case LayoutNavEntry::ClassIndex:
5427 msg("Generating alphabetical compound index...\n");
5429 break;
5430 case LayoutNavEntry::ClassHierarchy:
5431 msg("Generating hierarchical class index...\n");
5433 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5434 {
5435 msg("Generating graphical class hierarchy...\n");
5437 }
5438 break;
5439 case LayoutNavEntry::ClassMembers:
5440 if (!sliceOpt)
5441 {
5442 msg("Generating member index...\n");
5444 }
5445 break;
5446 case LayoutNavEntry::Interfaces:
5447 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5448 {
5449 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5451 needsClosing=true;
5452 }
5453 break;
5454 case LayoutNavEntry::InterfaceList:
5455 if (sliceOpt)
5456 {
5457 msg("Generating annotated interface index...\n");
5459 }
5460 break;
5461 case LayoutNavEntry::InterfaceIndex:
5462 if (sliceOpt)
5463 {
5464 msg("Generating alphabetical interface index...\n");
5466 }
5467 break;
5468 case LayoutNavEntry::InterfaceHierarchy:
5469 if (sliceOpt)
5470 {
5471 msg("Generating hierarchical interface index...\n");
5473 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5474 {
5475 msg("Generating graphical interface hierarchy...\n");
5477 }
5478 }
5479 break;
5480 case LayoutNavEntry::Structs:
5481 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5482 {
5483 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5485 needsClosing=true;
5486 }
5487 break;
5488 case LayoutNavEntry::StructList:
5489 if (sliceOpt)
5490 {
5491 msg("Generating annotated struct index...\n");
5493 }
5494 break;
5495 case LayoutNavEntry::StructIndex:
5496 if (sliceOpt)
5497 {
5498 msg("Generating alphabetical struct index...\n");
5500 }
5501 break;
5502 case LayoutNavEntry::Exceptions:
5503 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5504 {
5505 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5507 needsClosing=true;
5508 }
5509 break;
5510 case LayoutNavEntry::ExceptionList:
5511 if (sliceOpt)
5512 {
5513 msg("Generating annotated exception index...\n");
5515 }
5516 break;
5517 case LayoutNavEntry::ExceptionIndex:
5518 if (sliceOpt)
5519 {
5520 msg("Generating alphabetical exception index...\n");
5522 }
5523 break;
5524 case LayoutNavEntry::ExceptionHierarchy:
5525 if (sliceOpt)
5526 {
5527 msg("Generating hierarchical exception index...\n");
5529 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5530 {
5531 msg("Generating graphical exception hierarchy...\n");
5533 }
5534 }
5535 break;
5536 case LayoutNavEntry::Files:
5537 {
5538 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5539 {
5540 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5542 needsClosing=true;
5543 }
5544 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5545 {
5546 msg("Generating file index...\n");
5547 writeFileIndex(ol);
5548 }
5549 }
5550 break;
5551 case LayoutNavEntry::FileList:
5552 msg("Generating file index...\n");
5553 writeFileIndex(ol);
5554 break;
5555 case LayoutNavEntry::FileGlobals:
5556 msg("Generating file member index...\n");
5558 break;
5559 case LayoutNavEntry::Examples:
5560 msg("Generating example index...\n");
5562 break;
5563 case LayoutNavEntry::User:
5564 if (addToIndex)
5565 {
5566 // prepend a ! or ^ marker to the URL to avoid tampering with it
5567 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5568 bool isRelative=url.at(0)=='!';
5569 if (!url.empty() && !isRelative) // absolute URL
5570 {
5571 url.prepend("^"); // prepend ^ to absolute URL
5572 }
5573 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5574 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5575 }
5576 break;
5577 case LayoutNavEntry::UserGroup:
5578 if (addToIndex)
5579 {
5580 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5581 if (!url.empty())
5582 {
5583 if (url=="!") // result of a "[none]" url
5584 {
5585 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),DString(),DString(),false,false);
5586 }
5587 else
5588 {
5589 bool isRelative=url.at(0)=='!';
5590 if (!isRelative) // absolute URL
5591 {
5592 url.prepend("^"); // prepend ^ to absolute URL
5593 }
5594 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5595 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5596 }
5597 }
5598 else
5599 {
5600 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString(),true,true);
5601 }
5603 needsClosing=true;
5604 }
5605 writeUserGroupStubPage(ol,lne.get());
5606 break;
5607 case LayoutNavEntry::None:
5608 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5609 break;
5610 }
5611 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5612 {
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:690
DString & prepend(const char *s)
Definition dstring.h:519
virtual DString trFileDocumentation()=0
virtual DString trExceptionDocumentation()=0
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5291
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1235
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2680
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2524
static std::vector< bool > indexWritten
Definition index.cpp:5289
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2652
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1596
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1340
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2437
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2666
static void writePageIndex(OutputList &ol)
Definition index.cpp:4025
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2050
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2694
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1261
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4841
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4419
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3857
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1445
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2466
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2495
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4566
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1366
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3673
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1154
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3489
@ isFileDocumentation
Definition index.h:50
@ isExampleDocumentation
Definition index.h:51
@ isEndIndex
Definition index.h:54
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
Definition layout.h:151
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:4661

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

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

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

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

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

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5797 of file index.cpp.

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

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4566 of file index.cpp.

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

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

◆ writeModuleLinkForMember()

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

Definition at line 2746 of file index.cpp.

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

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

Referenced by writeMemberList().

◆ writeModuleList()

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

Definition at line 4542 of file index.cpp.

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

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3857 of file index.cpp.

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

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

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3725 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1842 of file index.cpp.

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

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

◆ writeModuleTreeNode()

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

Definition at line 4488 of file index.cpp.

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

References Doxygen::indexList.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2050 of file index.cpp.

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

References IndexList::addContentsItem(), Config_getBool, IndexList::decContentsDepth(), OutputList::disable(), OutputList::disableAllBut(), Docbook, 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(), DString::replace(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexKey(), OutputList::startIndexList(), OutputList::startIndexValue(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), Translator::trNamespaceList(), Translator::trNamespaceListDescription(), LayoutNavEntry::visible(), writeNamespaceTree(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeNamespaceLinkForMember()

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

Definition at line 2733 of file index.cpp.

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

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

Referenced by writeMemberList().

◆ writeNamespaceMemberIndex()

void writeNamespaceMemberIndex ( OutputList & ol)
static

Definition at line 3673 of file index.cpp.

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

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3548 of file index.cpp.

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

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

◆ writeNamespaceMembers()

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

Definition at line 1816 of file index.cpp.

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

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

Referenced by writeNamespaceTreeElement().

◆ writeNamespaceTree() [1/2]

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

Definition at line 1945 of file index.cpp.

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1933 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1873 of file index.cpp.

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

Referenced by writeNamespaceTree(), and writeNamespaceTree().

◆ writePageIndex()

void writePageIndex ( OutputList & ol)
static

Definition at line 4025 of file index.cpp.

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

◆ writePages()

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

Definition at line 3965 of file index.cpp.

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

◆ writeQuickMemberIndex()

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

Definition at line 3074 of file index.cpp.

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

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

◆ writeSingleFileIndex()

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

Definition at line 1493 of file index.cpp.

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

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

Referenced by writeFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4419 of file index.cpp.

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

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

◆ writeUserGroupStubPage()

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

Definition at line 4841 of file index.cpp.

4844 {
4845 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4846 }
4847 writeConceptRootList(&ftv,addToIndex);
4848 TextStream t;
4849 ftv.generateTreeViewInline(t);
4850 ol.writeString(t.str());
4851 if (addToIndex)
4852 {
4854 }
4855 }
4856 ol.popGeneratorState();
4857 // 2.}
4858
4859 endFile(ol);
4860 ol.popGeneratorState();
4861 // 1.}
4862}
4863
4864//----------------------------------------------------------------------------
4865
4867{
4868 if (lne->baseFile().startsWith("usergroup"))
4869 {
4870 ol.pushGeneratorState();
4872 startFile(ol,lne->baseFile(),false,DString(),lne->title(),HighlightedItem::UserGroup);
4873 startTitle(ol,DString());
bool startsWith(const char *s) const
Definition dstring.h:604
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4718
DString baseFile() const
Definition layout.h:213

Variable Documentation

◆ alphaSepar

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

Definition at line 59 of file index.cpp.

Referenced by getCmhlInfo(), and writeAlphabeticalClassList().

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5289 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 344 of file index.cpp.