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

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

#include "index.h"
#include <array>
#include <cstdlib>
#include <map>
#include <set>
#include "classlist.h"
#include "conceptdef.h"
#include "config.h"
#include "dirdef.h"
#include "dotgfxhierarchytable.h"
#include "dotlegendgraph.h"
#include "doxygen.h"
#include "filedef.h"
#include "filename.h"
#include "ftvhelp.h"
#include "groupdef.h"
#include "htmlgen.h"
#include "indexlist.h"
#include "language.h"
#include "layout.h"
#include "memberlist.h"
#include "message.h"
#include "moduledef.h"
#include "namespacedef.h"
#include "outputlist.h"
#include "pagedef.h"
#include "portable.h"
#include "sitemap.h"
#include "utf8.h"
#include "util.h"
#include "vhdldocgen.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 57 of file index.cpp.

◆ MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 58 of file index.cpp.

Typedef Documentation

◆ UsedIndexLetters

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

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

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

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

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

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1145 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1736 of file index.cpp.

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

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4081 of file index.cpp.

4091{
4092 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1472 of file index.cpp.

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

References Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4065 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1725 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 740 of file index.cpp.

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

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

433{
434 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
437 if (!skipNavIndex)
438 {
439 if (!skipEndContents) ol.endContents();
440 if (generateTreeView)
441 {
442 ol.writeString("</div><!-- doc-content -->\n");
443 ol.writeString("</div><!-- container -->\n");
444 }
445 }
446
447 ol.writeFooter(navPath); // write the footer
449 ol.endFile();
450}
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 452 of file index.cpp.

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

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

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 362 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1749 of file index.cpp.

1749{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1750 of file index.cpp.

1750{ return p; }

◆ get_pointer() [3/3]

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

Referenced by writeClassTree().

◆ getCmhlInfo()

const CmhlInfo * getCmhlInfo ( size_t hl)
static

Definition at line 3144 of file index.cpp.

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

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3336 of file index.cpp.

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

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

◆ getMmhlInfo()

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3522 of file index.cpp.

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

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

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2248 of file index.cpp.

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

Referenced by letterToLabel().

◆ letterToLabel()

DString letterToLabel ( const DString & startLetter)
static

Definition at line 2253 of file index.cpp.

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

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

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5612 of file index.cpp.

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

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5720 of file index.cpp.

5730 {text:\"" << convertToJSString(ci) << "\",url:\""
5731 << convertToJSString(anchor+convertToId(is)) << "\"}";
5732 firstLetter=false;
5733 }
5734 t << "]";
5735 }
5736 t << "}";
5737 }
5738 }
5739 if (!firstMember)
5740 {
5741 t << "]";
5742 }
5743}
5744
5745static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5746{
5747 int count=0;
5748 for (const auto &entry : root->children())
5749 {
5750 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5751 }
5752 if (count>0) // at least one item is visible
5753 {
5754 bool firstChild = true;
5755 if (!first) t << ",";
5756 t << "children:[\n";
5757 for (const auto &entry : root->children())
5758 {
5759 if (entry->visible() && quickLinkVisible(entry->kind()))
5760 {
5761 if (!firstChild) t << ",\n";
5762 firstChild=false;
5763 DString url = entry->url();
5764 if (isURL(url)) url = "^" + url;
5765 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5766 << convertToJSString(url) << "\"";
5767 bool hasChildren=false;
5768 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5769 {
5770 auto numDoc = [](std::size_t i) {
5772 };
5773 auto memList = [](std::size_t i) {
5775 };
5776 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5777 }
5778 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5779 {
5780 auto numDoc = [](std::size_t i) {
5782 };
5783 auto memList = [](std::size_t i) {
5785 };
5786 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5787 }
5788 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5789 {
5790 auto numDoc = [](std::size_t i) {
5792 };
5793 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:135
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:138
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:137
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:155
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:150
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5720
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3707
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3522
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h: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:4646
DString convertToId(const DString &s)
Definition util.cpp:3202

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

408{
409 bool disableIndex = Config_getBool(DISABLE_INDEX);
410 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
411 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
412 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
413 ol.startFile(name,isSource,manName,title,hierarchyLevel);
415 if (!disableIndex && !quickLinksAfterSplitbar)
416 {
417 ol.writeQuickLinks(hli,name);
418 }
419 if (!additionalIndices)
420 {
421 ol.endQuickIndices();
422 }
423 ol.writeSplitBar(!altSidebarName.empty() ? altSidebarName : name, allMembersFile);
424 if (quickLinksAfterSplitbar)
425 {
426 ol.writeQuickLinks(hli,name);
427 }
428 ol.writeSearchInfo();
429}
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 368 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 349 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 388 of file index.cpp.

389{
390 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
392 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
393 ol.startTitleHead(fileName);
396}
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 2282 of file index.cpp.

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

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

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

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

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

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

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

2696{
2697 const auto &index = Index::instance();
2699 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2700 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2703 "annotatedexceptions",
2705}
virtual DString trExceptionList()=0
virtual DString trExceptionListDescription()=0
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2579
@ 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 2653 of file index.cpp.

2654{
2655 const auto &index = Index::instance();
2657 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2658 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2661 "annotated",
2663}
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 2579 of file index.cpp.

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

2668{
2669 const auto &index = Index::instance();
2671 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2672 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2675 "annotatedinterfaces",
2677}
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 2681 of file index.cpp.

2682{
2683 const auto &index = Index::instance();
2685 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2686 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2689 "annotatedstructs",
2691}
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 1094 of file index.cpp.

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

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

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

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

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3166 of file index.cpp.

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

◆ writeClassTree()

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

Definition at line 1753 of file index.cpp.

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

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

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

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2033 of file index.cpp.

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

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

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

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

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

◆ writeConceptList()

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

Definition at line 4632 of file index.cpp.

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

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

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

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4655 of file index.cpp.

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

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4665 of file index.cpp.

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

◆ writeDirHierarchy()

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

Definition at line 926 of file index.cpp.

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

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

1569{
1570 if (Index::instance().numDocumentedDirs()==0) return;
1571 ol.pushGeneratorState();
1573
1575 startFile(ol,"dirs",false,DString(),title,HighlightedItem::Files);
1576 startTitle(ol,title);
1577 ol.parseText(title);
1578 endTitle(ol,DString(),DString());
1579
1580 ol.startIndexList();
1581 for (const auto &dir : *Doxygen::dirLinkedMap)
1582 {
1583 if (dir->hasDocumentation())
1584 {
1585 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1586 }
1587 }
1588
1589 ol.endIndexList();
1590
1591 endFile(ol);
1592 ol.popGeneratorState();
1593}
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 768 of file index.cpp.

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

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

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

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

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

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

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

◆ writeFileMemberIndexFiltered()

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

Definition at line 3359 of file index.cpp.

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

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1236 of file index.cpp.

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

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

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

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

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4393 of file index.cpp.

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

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

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

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

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1367 of file index.cpp.

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

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

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

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

4876 : lne->children())
4877 {
4878 if (entry->visible()) count++;
4879 }
4880 if (count>0)
4881 {
4882 ol.writeString("<ul>\n");
4883 for (const auto &entry: lne->children())
4884 {
4885 if (entry->visible())
4886 {
4887 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4888 HtmlGenerator::fixSpaces(entry->title())+"</span></a></li>\n");
4889 }
4890 }
4891 ol.writeString("</ul>\n");
4892 }
4893 endFile(ol);
4894 ol.popGeneratorState();
4895 }
4896}
4897
4898//----------------------------------------------------------------------------
4899
4900
4901static void writeIndex(OutputList &ol)
4902{
4903 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4904 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4905 bool disableIndex = Config_getBool(DISABLE_INDEX);
4906 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4907 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4908 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4909 DString projectName = Config_getString(PROJECT_NAME);
4910 // save old generator state
4911 ol.pushGeneratorState();
4912
4913 DString projPrefix;
4914 if (!projectName.empty())
4915 {
4916 projPrefix=projectName+" ";
4917 }
4918
4919 //--------------------------------------------------------------------
4920 // write HTML index
4921 //--------------------------------------------------------------------
4923
4924 DString defFileName =
4925 Doxygen::mainPage ? Doxygen::mainPage->docFile() : DString("[generated]");
4926 int defLine =
4927 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4928
4929 DString title, titleAsHtml;
4930 if (!mainPageHasTitle())
4931 {
4932 title = theTranslator->trMainPage();
4933 }
4934 else if (Doxygen::mainPage)
4935 {
4936 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4937 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4938 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4939 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4940 }
4941
4942 DString indexName="index";
4943 ol.startFile(indexName,false,DString(),title);
4944
4946 {
4947 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4948 bool hasTitle = !projectName.empty() && mainPageHasTitle() && dstricmp(title,projectName)!=0;
4949 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4950 if (hasTitle) // to avoid duplicate entries in the treeview
4951 {
4953 title,
4954 DString(),
4955 indexName,
4956 DString(),
4957 hasSubs,
4958 true,
4959 nullptr,
4960 titleAsHtml);
4961 }
4962 if (hasSubs)
4963 {
4964 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
4965 }
4966 }
4967
4968 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4969 ol.startQuickIndices();
4970 if (!disableIndex && !quickLinksAfterSplitbar)
4971 {
4973 }
4974 ol.endQuickIndices();
4975 ol.writeSplitBar(indexName,DString());
4976 if (quickLinksAfterSplitbar)
4977 {
4979 }
4980 ol.writeSearchInfo();
4981 bool headerWritten=false;
4983 {
4984 if (!Doxygen::mainPage->title().empty())
4985 {
4986 if (Doxygen::mainPage->title().lower() != "notitle")
4987 ol.startPageDoc(Doxygen::mainPage->title());
4988 else
4989 ol.startPageDoc("");
4990 }
4991 else
4992 ol.startPageDoc(projectName);
4993 }
4994 if (Doxygen::mainPage && !Doxygen::mainPage->title().empty())
4995 {
4996 if (Doxygen::mainPage->title().lower()!="notitle")
4997 {
4998 ol.startHeaderSection();
4999 ol.startTitleHead(DString());
5000 ol.generateDoc(Doxygen::mainPage->docFile(),
5001 Doxygen::mainPage->getStartBodyLine(),
5002 Doxygen::mainPage.get(),
5003 nullptr,
5004 Doxygen::mainPage->title(),
5005 DocOptions()
5006 .setSingleLine(true));
5007 headerWritten = true;
5008 }
5009 }
5010 else
5011 {
5012 if (!projectName.empty())
5013 {
5014 ol.startHeaderSection();
5015 ol.startTitleHead(DString());
5016 ol.parseText(theTranslator->trDocumentation(projectName));
5017 headerWritten = true;
5018 }
5019 }
5020 if (headerWritten)
5021 {
5023 ol.endHeaderSection();
5024 }
5025
5026 ol.startContents();
5027 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5028 {
5030 }
5031
5033 {
5034 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5035 {
5036 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5037 }
5038
5039 ol.startTextBlock();
5040 ol.generateDoc(defFileName,
5041 defLine,
5042 Doxygen::mainPage.get(),
5043 nullptr,
5044 Doxygen::mainPage->documentation(),
5045 DocOptions()
5046 .setIndexWords(true));
5047 ol.endTextBlock();
5048 ol.endPageDoc();
5049 }
5050
5053 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5055
5056 if (Doxygen::mainPage &&
5057 generateTreeView &&
5058 pageOutlinePanel &&
5059 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5060 Doxygen::mainPage->hasSections()
5061 )
5062 {
5063 ol.writeString("</div><!-- doc-content -->\n");
5064 ol.endContents();
5065 Doxygen::mainPage->writePageNavigation(ol);
5066 ol.writeString("</div><!-- container -->\n");
5067 endFile(ol,true,true);
5068 }
5069 else
5070 {
5071 endFile(ol);
5072 }
5073
5075
5076 //--------------------------------------------------------------------
5077 // write LaTeX/RTF index
5078 //--------------------------------------------------------------------
5082
5084 {
5085 msg("Generating main page...\n");
5086 Doxygen::mainPage->writeDocumentation(ol);
5087 }
5088
5089 ol.startFile("refman",false,DString(),DString());
5093
5094 if (projPrefix.empty())
5095 {
5097 }
5098 else
5099 {
5100 ol.parseText(projPrefix);
5101 }
5102
5103 if (!Config_getString(PROJECT_NUMBER).empty())
5104 {
5105 ol.startProjectNumber();
5106 ol.generateDoc(defFileName,
5107 defLine,
5108 Doxygen::mainPage.get(),
5109 nullptr,
5110 Config_getString(PROJECT_NUMBER),
5111 DocOptions());
5112 ol.endProjectNumber();
5113 }
5120
5121 ol.lastIndexPage();
5123 {
5126 }
5127 const auto &index = Index::instance();
5128 if (index.numDocumentedPages()>0)
5129 {
5132 }
5133
5135 if (!Config_getBool(LATEX_HIDE_INDICES))
5136 {
5137 //if (indexedPages>0)
5138 //{
5139 // ol.startIndexSection(isPageIndex);
5140 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5141 // ol.endIndexSection(isPageIndex);
5142 //}
5143 if (index.numDocumentedModules()>0)
5144 {
5146 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5148 }
5149 if (index.numDocumentedGroups()>0)
5150 {
5152 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5154 }
5155 if (index.numDocumentedDirs()>0)
5156 {
5160 }
5161 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5162 {
5163 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5164 if (lne)
5165 {
5167 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5169 }
5170 }
5171 if (index.numDocumentedConcepts()>0)
5172 {
5174 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5176 }
5177 if (index.numHierarchyInterfaces()>0)
5178 {
5180 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5182 }
5183 if (index.numHierarchyClasses()>0)
5184 {
5185 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5186 if (lne)
5187 {
5189 ol.parseText(/*projPrefix+*/
5190 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5191 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5193 ));
5195 }
5196 }
5197 if (index.numHierarchyExceptions()>0)
5198 {
5200 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5202 }
5203 if (index.numAnnotatedInterfacesPrinted()>0)
5204 {
5206 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5208 }
5209 if (index.numAnnotatedClassesPrinted()>0)
5210 {
5212 ol.parseText(/*projPrefix+*/
5213 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5214 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5216 ));
5218 }
5219 if (index.numAnnotatedStructsPrinted()>0)
5220 {
5222 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5224 }
5225 if (index.numAnnotatedExceptionsPrinted()>0)
5226 {
5228 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5230 }
5231 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5232 {
5234 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5236 }
5237 }
5239
5240 if (index.numDocumentedModules()>0)
5241 {
5243 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5245 }
5246 if (index.numDocumentedGroups()>0)
5247 {
5249 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5251 }
5252 if (index.numDocumentedDirs()>0)
5253 {
5255 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5257 }
5258 if (index.numDocumentedNamespaces()>0)
5259 {
5263 }
5264 if (index.numDocumentedConcepts()>0)
5265 {
5267 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5269 }
5270 if (index.numAnnotatedInterfacesPrinted()>0)
5271 {
5273 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5275 }
5276 if (index.numAnnotatedClassesPrinted()>0)
5277 {
5281 }
5282 if (index.numAnnotatedStructsPrinted()>0)
5283 {
5285 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:444
static void writeIndex(OutputList &ol)
Definition index.cpp:4876
@ 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:4959
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3931

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5811 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5289 of file index.cpp.

5289 {
5291 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5293 }
5294 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5295 {
5297 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5299 }
5300 if (!Doxygen::exampleLinkedMap->empty())
5301 {
5303 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5305 }
5307 endFile(ol);
5308
5309 ol.popGeneratorState();
5310}
5311
5312static std::vector<bool> indexWritten;
5313
5314static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5315{
5316 auto isRef = [](const DString &s)
5317 {
5318 return s.startsWith("@ref") || s.startsWith("\\ref");
5319 };
5320 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5321 const auto &index = Index::instance();
5322 for (const auto &lne : entries)
5323 {
5324 LayoutNavEntry::Kind kind = lne->kind();
5325 size_t idx = static_cast<size_t>(kind);
5326 if (idx>=indexWritten.size())
5327 {
5328 size_t oldSize = indexWritten.size();
5329 size_t newSize = idx+1;
5330 indexWritten.resize(newSize);
5331 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=false;
5332 }
5333 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5334 bool addToIndex=lne->visible();
5335 bool needsClosing=false;
5336 if (!indexWritten.at(idx))
5337 {
5338 switch(kind)
5339 {
5340 case LayoutNavEntry::MainPage:
5341 msg("Generating index page...\n");
5342 writeIndex(ol);
5343 break;
5344 case LayoutNavEntry::Pages:
5345 msg("Generating page index...\n");
5346 writePageIndex(ol);
5347 break;
5348 case LayoutNavEntry::Topics:
5349 msg("Generating topic index...\n");
5350 writeTopicIndex(ol);
5351 break;
5352 case LayoutNavEntry::Modules:
5353 {
5354 if (index.numDocumentedModules()>0 && addToIndex)
5355 {
5356 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5358 needsClosing=true;
5359 }
5360 }
5361 break;
5362 case LayoutNavEntry::ModuleList:
5363 msg("Generating module index...\n");
5364 writeModuleIndex(ol);
5365 break;
5366 case LayoutNavEntry::ModuleMembers:
5367 msg("Generating module member index...\n");
5369 break;
5370 case LayoutNavEntry::Namespaces:
5371 {
5372 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5373 if (showNamespaces)
5374 {
5375 if (index.numDocumentedNamespaces()>0 && addToIndex)
5376 {
5377 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5379 needsClosing=true;
5380 }
5381 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5382 {
5383 msg("Generating namespace index...\n");
5385 }
5386 }
5387 }
5388 break;
5389 case LayoutNavEntry::NamespaceList:
5390 {
5391 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5392 if (showNamespaces)
5393 {
5394 msg("Generating namespace index...\n");
5396 }
5397 }
5398 break;
5399 case LayoutNavEntry::NamespaceMembers:
5400 msg("Generating namespace member index...\n");
5402 break;
5403 case LayoutNavEntry::Classes:
5404 if (index.numAnnotatedClasses()>0 && addToIndex)
5405 {
5406 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5408 needsClosing=true;
5409 }
5410 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5411 {
5412 msg("Generating annotated compound index...\n");
5414 }
5415 break;
5416 case LayoutNavEntry::Concepts:
5417 msg("Generating concept index...\n");
5419 break;
5420 case LayoutNavEntry::ClassList:
5421 msg("Generating annotated compound index...\n");
5423 break;
5424 case LayoutNavEntry::ClassIndex:
5425 msg("Generating alphabetical compound index...\n");
5427 break;
5428 case LayoutNavEntry::ClassHierarchy:
5429 msg("Generating hierarchical class index...\n");
5431 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5432 {
5433 msg("Generating graphical class hierarchy...\n");
5435 }
5436 break;
5437 case LayoutNavEntry::ClassMembers:
5438 if (!sliceOpt)
5439 {
5440 msg("Generating member index...\n");
5442 }
5443 break;
5444 case LayoutNavEntry::Interfaces:
5445 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5446 {
5447 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5449 needsClosing=true;
5450 }
5451 break;
5452 case LayoutNavEntry::InterfaceList:
5453 if (sliceOpt)
5454 {
5455 msg("Generating annotated interface index...\n");
5457 }
5458 break;
5459 case LayoutNavEntry::InterfaceIndex:
5460 if (sliceOpt)
5461 {
5462 msg("Generating alphabetical interface index...\n");
5464 }
5465 break;
5466 case LayoutNavEntry::InterfaceHierarchy:
5467 if (sliceOpt)
5468 {
5469 msg("Generating hierarchical interface index...\n");
5471 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5472 {
5473 msg("Generating graphical interface hierarchy...\n");
5475 }
5476 }
5477 break;
5478 case LayoutNavEntry::Structs:
5479 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5480 {
5481 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5483 needsClosing=true;
5484 }
5485 break;
5486 case LayoutNavEntry::StructList:
5487 if (sliceOpt)
5488 {
5489 msg("Generating annotated struct index...\n");
5491 }
5492 break;
5493 case LayoutNavEntry::StructIndex:
5494 if (sliceOpt)
5495 {
5496 msg("Generating alphabetical struct index...\n");
5498 }
5499 break;
5500 case LayoutNavEntry::Exceptions:
5501 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5502 {
5503 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5505 needsClosing=true;
5506 }
5507 break;
5508 case LayoutNavEntry::ExceptionList:
5509 if (sliceOpt)
5510 {
5511 msg("Generating annotated exception index...\n");
5513 }
5514 break;
5515 case LayoutNavEntry::ExceptionIndex:
5516 if (sliceOpt)
5517 {
5518 msg("Generating alphabetical exception index...\n");
5520 }
5521 break;
5522 case LayoutNavEntry::ExceptionHierarchy:
5523 if (sliceOpt)
5524 {
5525 msg("Generating hierarchical exception index...\n");
5527 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5528 {
5529 msg("Generating graphical exception hierarchy...\n");
5531 }
5532 }
5533 break;
5534 case LayoutNavEntry::Files:
5535 {
5536 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5537 {
5538 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5540 needsClosing=true;
5541 }
5542 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5543 {
5544 msg("Generating file index...\n");
5545 writeFileIndex(ol);
5546 }
5547 }
5548 break;
5549 case LayoutNavEntry::FileList:
5550 msg("Generating file index...\n");
5551 writeFileIndex(ol);
5552 break;
5553 case LayoutNavEntry::FileGlobals:
5554 msg("Generating file member index...\n");
5556 break;
5557 case LayoutNavEntry::Examples:
5558 msg("Generating example index...\n");
5560 break;
5561 case LayoutNavEntry::User:
5562 if (addToIndex)
5563 {
5564 // prepend a ! or ^ marker to the URL to avoid tampering with it
5565 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5566 bool isRelative=url.at(0)=='!';
5567 if (!url.empty() && !isRelative) // absolute URL
5568 {
5569 url.prepend("^"); // prepend ^ to absolute URL
5570 }
5571 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5572 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5573 }
5574 break;
5575 case LayoutNavEntry::UserGroup:
5576 if (addToIndex)
5577 {
5578 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5579 if (!url.empty())
5580 {
5581 if (url=="!") // result of a "[none]" url
5582 {
5583 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),DString(),DString(),false,false);
5584 }
5585 else
5586 {
5587 bool isRelative=url.at(0)=='!';
5588 if (!isRelative) // absolute URL
5589 {
5590 url.prepend("^"); // prepend ^ to absolute URL
5591 }
5592 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5593 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5594 }
5595 }
5596 else
5597 {
5598 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString(),true,true);
5599 }
5601 needsClosing=true;
5602 }
5603 writeUserGroupStubPage(ol,lne.get());
5604 break;
5605 case LayoutNavEntry::None:
5606 ASSERT(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5607 break;
5608 }
5609 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5610 {
char & at(size_t i)
Returns a reference to the character at index i.
Definition dstring.h:686
DString & prepend(const char *s)
Definition dstring.h:515
virtual DString trFileDocumentation()=0
virtual DString trExceptionDocumentation()=0
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5289
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1236
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2681
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2525
static std::vector< bool > indexWritten
Definition index.cpp:5287
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2653
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1597
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1341
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2438
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2667
static void writePageIndex(OutputList &ol)
Definition index.cpp:4023
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2051
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2695
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1262
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4839
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4417
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3855
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1446
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2467
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2496
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4564
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1367
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3671
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1155
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3487
@ 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:4659

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

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

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

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

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

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

5799 {
5800 auto numDoc = [](std::size_t i) {
5802 };
5803 auto memList = [](std::size_t i) {
5805 };
5806 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5807 }
5808 else // recursive into child list
5809 {
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:136
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:145

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4564 of file index.cpp.

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

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

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

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

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3855 of file index.cpp.

3860 ol.endTextBlock();
3861 if (dynamicMenus || disableIndex)
3862 {
3863 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3864 }
3865
3866 writeMemberList(ol,quickIndex,
3867 multiPageIndex ? letter : std::string(),
3868 index.isModuleIndexLetterUsed(hl),
3870 endFile(ol);
3871 first=false;
3872 }
3873 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3874 ol.popGeneratorState();
3875}
3876
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 3723 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1843 of file index.cpp.

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

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

References Doxygen::indexList.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2051 of file index.cpp.

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

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

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

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

Referenced by writeMemberList().

◆ writeNamespaceMemberIndex()

void writeNamespaceMemberIndex ( OutputList & ol)
static

Definition at line 3671 of file index.cpp.

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

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3546 of file index.cpp.

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

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

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1934 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1874 of file index.cpp.

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

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

◆ writePages()

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

Definition at line 3963 of file index.cpp.

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

3075{
3076 bool first=true;
3077 startQuickIndexList(ol,true);
3078 for (const auto &[letter,list] : map)
3079 {
3080 DString ci(letter);
3081 DString is = letterToLabel(ci);
3082 DString anchor;
3084 if (!multiPage)
3085 anchor="#index_";
3086 else if (first)
3087 anchor=fullName+extension+"#index_";
3088 else
3089 anchor=fullName+"_"+is+extension+"#index_";
3090 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,true,first);
3091 ol.writeString(ci);
3093 first=false;
3094 }
3096 ol.writeString(R"js(
3097<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 1494 of file index.cpp.

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

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

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

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

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

Variable Documentation

◆ alphaSepar

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

Definition at line 60 of file index.cpp.

Referenced by getCmhlInfo(), and writeAlphabeticalClassList().

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5287 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 345 of file index.cpp.