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 ClassDef * get_pointer (const Ptr &p)
template<>
const ClassDef * get_pointer (const ClassLinkedMap::Ptr &p)
template<>
const ClassDef * get_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 writeAlphabeticalRecordIndex (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 writeAnnotatedRecordIndex (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 CmhlInfo * getCmhlInfo (size_t hl)
static void writeClassMemberIndexFiltered (OutputList &ol, ClassMemberHighlight::Enum hl)
static void writeClassMemberIndex (OutputList &ol)
static const FmhlInfo * getFmhlInfo (size_t hl)
static void writeFileMemberIndexFiltered (OutputList &ol, FileMemberHighlight::Enum hl)
static void writeFileMemberIndex (OutputList &ol)
static const NmhlInfo * getNmhlInfo (size_t hl)
static void writeNamespaceMemberIndexFiltered (OutputList &ol, NamespaceMemberHighlight::Enum hl)
static void writeNamespaceMemberIndex (OutputList &ol)
static const MmhlInfo * getMmhlInfo (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 2289 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 537 of file index.cpp.

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

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

2163{
2164 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2165 int count=0;
2166 int countPrinted=0;
2167 for (const auto &cd : *Doxygen::classLinkedMap)
2168 {
2169 if (sliceOpt && cd->compoundType() != ct)
2170 {
2171 continue;
2172 }
2173 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2174 {
2175 if (!cd->isEmbeddedInOuterScope())
2176 {
2177 countPrinted++;
2178 }
2179 count++;
2180 }
2181 }
2182 *cp = countPrinted;
2183 return count;
2184}
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 1127 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1151 of file index.cpp.

1152{
1153 int count=0;
1156 return count;
1157}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:89
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1127

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1742 of file index.cpp.

1743{
1744 int count=0;
1745 for (const auto &cd : *Doxygen::conceptLinkedMap)
1746 {
1747 if (cd->isLinkableInProject()) count++;
1748 }
1749 return count;
1750}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:90

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4134 of file index.cpp.

4144{
4145 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1478 of file index.cpp.

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

References Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4118 of file index.cpp.

4120 {
4121 if ((pd->getOuterScope()==nullptr ||
4122 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4123 pd->visibleInIndex()
4124 )
4125 {
4126 writePages(pd.get(),&ftv);
4127 }
4128 }
4129 TextStream t;
4130 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:4016

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

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1731 of file index.cpp.

1732{
1733 int count=0;
1734 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1735 {
1736 if (nd->isLinkableInProject()) count++;
1737 }
1738 return count;
1739}
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 3998 of file index.cpp.

4000 {
4001 ol.writeObjectLink(DString(),n,DString(),pd->name());
4002 if (addToIndex)
4003 {
4004 Doxygen::indexList->addContentsItem(false,pd->name(),pd->getReference(),n,DString(),false,true);
4005 }
4006 }
4007 ol.endItemListItem();
4008 //ol.writeString("\n");
4009 }
4010 ol.endItemList();
4011
4012 if (addToIndex)

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 746 of file index.cpp.

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

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

439{
440 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
443 if (!skipNavIndex)
444 {
445 if (!skipEndContents) ol.endContents();
446 if (generateTreeView)
447 {
448 ol.writeString("</div><!-- doc-content -->\n");
449 ol.writeString("</div><!-- container -->\n");
450 }
451 }
452
453 ol.writeFooter(navPath); // write the footer
455 ol.endFile();
456}
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(), writeAlphabeticalRecordIndex(), 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 458 of file index.cpp.

459{
460 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
461 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
462 DString navPath;
463 if (generateTreeview)
464 {
467 ol.writeString("</div><!-- doc-content -->\n");
468 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
469 ol.writeString("</div><!-- container -->\n");
471 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
472 }
473 endFile(ol,generateTreeview,true,navPath);
474}
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:437

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

388{
389 ol.writeString("</span>");
390 ol.writeString("</a>");
391 ol.writeString("</li>\n");
392}

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 368 of file index.cpp.

369{
370 ol.writeString(" </ul>\n");
371 ol.writeString(" </div>\n");
372}

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1755 of file index.cpp.

1755{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1756 of file index.cpp.

1756{ 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 3197 of file index.cpp.

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

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3389 of file index.cpp.

3398 {
3400 }
3401
3402}
3403
3404//----------------------------------------------------------------------------
3405
3406/** Helper class representing a file member in the navigation menu. */
3407struct FmhlInfo
3408{
3409 FmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
3410 const char *fname;
Helper class representing a file member in the navigation menu.
Definition index.cpp:3383
DString title
Definition index.cpp:3386
FmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3384
const char * fname
Definition index.cpp:3385

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

3584 {
3586 }
3587
3588}
3589
3590//----------------------------------------------------------------------------
3591
3592/** Helper class representing a namespace member in the navigation menu. */
3593struct NmhlInfo
3594{
3595 NmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3569
const char * fname
Definition index.cpp:3571
DString title
Definition index.cpp:3572
NmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3570

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

2259{
2260 return (c<127 && c>31); // printable ASCII character
2261}

Referenced by letterToLabel().

◆ letterToLabel()

DString letterToLabel ( const DString & startLetter)
static

Definition at line 2263 of file index.cpp.

2264{
2265 if (startLetter.empty()) return startLetter;
2266 const char *p = startLetter.data();
2267 char c = *p;
2268 DString result;
2269 if (isId1(c))
2270 {
2271 result+=c;
2272 }
2273 else
2274 {
2275 result="0x";
2276 const char hex[]="0123456789abcdef";
2277 while ((c=*p++))
2278 {
2279 result+=hex[static_cast<unsigned char>(c)>>4];
2280 result+=hex[static_cast<unsigned char>(c)&0xf];
2281 }
2282 }
2283 return result;
2284}
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
bool isId1(int c)
Definition index.cpp:2258

References DString::data(), DString::empty(), 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 188 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5700 of file index.cpp.

5704 {
5705 switch(kind)
5706 {
5707 case LayoutNavEntry::Modules:
5708 case LayoutNavEntry::Namespaces:
5709 case LayoutNavEntry::Classes:
5710 case LayoutNavEntry::Files:
5711 case LayoutNavEntry::UserGroup:
5713 break;
5714 default:
5715 break;
5716 }
5717 }
5718 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5719 }
5720
5721 // always write the directory index as it is used for non-HTML output only
5722 writeDirIndex(ol);
5723}
5724
5725static bool quickLinkVisible(LayoutNavEntry::Kind kind)
5726{
5727 const auto &index = Index::instance();
5728 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5729 bool showFiles = Config_getBool(SHOW_FILES);
5730 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5731 switch (kind)
5732 {
5733 case LayoutNavEntry::MainPage: return true;
5734 case LayoutNavEntry::User: return true;
5735 case LayoutNavEntry::UserGroup: return true;
5736 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5737 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5738 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5739 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5740 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5741 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5742 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5743 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5744 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5745 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5746 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5747 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5748 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
static Index & instance()
Definition index.cpp:112
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1574
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition index.cpp:5700
Kind
Definition layout.h:196

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

5751 : return index.numAnnotatedInterfaces()>0;
5752 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5753 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5754 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5755 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5756 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5757 case LayoutNavEntry::Records: return index.numAnnotatedRecords()>0;
5758 case LayoutNavEntry::RecordList: return index.numAnnotatedRecords()>0;
5759 case LayoutNavEntry::RecordIndex: return index.numAnnotatedRecords()>0;
5760 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5761 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5762 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5763 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5764 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5765 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5766 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5767 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5768 case LayoutNavEntry::None: // should never happen, means not properly initialized
5769 ASSERT(kind != LayoutNavEntry::None);
5770 return false;
5771 }
5772 return false;
5773}
5774
5775template<class T>
5776void renderMemberIndicesAsJs(std::ostream &t,
5777 std::function<std::size_t(std::size_t)> numDocumented,
5778 std::function<Index::MemberIndexMap(std::size_t)> getMemberList,
5779 const T *(*getInfo)(size_t hl),
5780 std::size_t total)
5781{
5782 // index items per category member lists
5783 bool firstMember=true;
5784 for (std::size_t i=0;i<total;i++)
5785 {
5786 if (numDocumented(i)>0)
5787 {
5788 t << ",";
5789 if (firstMember)
5790 {
5791 t << "children:[";
5792 firstMember=false;
5793 }
5794 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5795 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5796
5797 // Check if we have many members, then add sub entries per letter...
5798 // quick alphabetical index
5799 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5800 if (quickIndex)
5801 {
5802 bool multiPageIndex=false;
5803 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5804 {
5805 multiPageIndex=true;
5806 }
5807 t << ",children:[\n";
5808 bool firstLetter=true;
5809 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:170
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:5751
const int maxItemsBeforeQuickIndex
Definition index.cpp:351
#define ASSERT(x)
Definition message.h:142
DString convertToJSString(const DString &s, bool keepEntities, bool singleQuotes)
Definition util.cpp:3360

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

◆ renderQuickLinksAsJs()

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

Definition at line 5811 of file index.cpp.

5821 {text:\"" << convertToJSString(ci) << "\",url:\""
5822 << convertToJSString(anchor+convertToId(is)) << "\"}";
5823 firstLetter=false;
5824 }
5825 t << "]";
5826 }
5827 t << "}";
5828 }
5829 }
5830 if (!firstMember)
5831 {
5832 t << "]";
5833 }
5834}
5835
5836static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5837{
5838 int count=0;
5839 for (const auto &entry : root->children())
5840 {
5841 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5842 }
5843 if (count>0) // at least one item is visible
5844 {
5845 bool firstChild = true;
5846 if (!first) t << ",";
5847 t << "children:[\n";
5848 for (const auto &entry : root->children())
5849 {
5850 if (entry->visible() && quickLinkVisible(entry->kind()))
5851 {
5852 if (!firstChild) t << ",\n";
5853 firstChild=false;
5854 DString url = entry->url();
5855 if (isURL(url)) url = "^" + url;
5856 t << "{text:\"" << convertToJSString(entry->titleAsHtml(),true) << "\",url:\""
5857 << convertToJSString(url) << "\"";
5858 bool hasChildren=false;
5859 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5860 {
5861 auto numDoc = [](std::size_t i) {
5863 };
5864 auto memList = [](std::size_t i) {
5866 };
5867 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5868 }
5869 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5870 {
5871 auto numDoc = [](std::size_t i) {
5873 };
5874 auto memList = [](std::size_t i) {
5876 };
5877 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5878 }
5879 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5880 {
5881 auto numDoc = [](std::size_t i) {
5883 };
5884 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:139
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:142
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:141
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:159
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:154
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5811
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3760
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3575
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
const LayoutNavEntryList & children() const
Definition layout.h:223
bool isURL(const DString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:4659
DString convertToId(const DString &s)
Definition util.cpp:3211

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

414{
415 bool disableIndex = Config_getBool(DISABLE_INDEX);
416 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
417 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
418 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
419 ol.startFile(name,isSource,manName,title,hierarchyLevel);
421 if (!disableIndex && !quickLinksAfterSplitbar)
422 {
423 ol.writeQuickLinks(hli,name);
424 }
425 if (!additionalIndices)
426 {
427 ol.endQuickIndices();
428 }
429 ol.writeSplitBar(!altSidebarName.empty() ? altSidebarName : name, allMembersFile);
430 if (quickLinksAfterSplitbar)
431 {
432 ol.writeQuickLinks(hli,name);
433 }
434 ol.writeSearchInfo();
435}
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(), writeAlphabeticalRecordIndex(), 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 374 of file index.cpp.

376{
377 first=false;
378 ol.writeString(" <li");
379 if (hl) ol.writeString(" class=\"current\"");
380 ol.writeString("><a ");
381 ol.writeString("href=\"");
382 ol.writeString(l);
383 ol.writeString("\">");
384 ol.writeString("<span>");
385}

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 355 of file index.cpp.

356{
357 if (letterTabs)
358 {
359 ol.writeString(" <div id=\"navrow4\" class=\"tabs3\">\n");
360 }
361 else
362 {
363 ol.writeString(" <div id=\"navrow3\" class=\"tabs2\">\n");
364 }
365 ol.writeString(" <ul class=\"tablist\">\n");
366}

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 394 of file index.cpp.

395{
396 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
398 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
399 ol.startTitleHead(fileName);
402}
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(), writeAlphabeticalRecordIndex(), 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 2292 of file index.cpp.

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

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(), writeAlphabeticalRecordIndex(), and writeAlphabeticalStructIndex().

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2564 of file index.cpp.

2565{
2566 if (Index::instance().numAnnotatedExceptions()==0) return;
2567 ol.pushGeneratorState();
2569 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2570 DString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2571 bool addToIndex = lne==nullptr || lne->visible();
2572
2573 startFile(ol,"exceptions",false,DString(),title,HighlightedItem::Exceptions);
2574
2575 startTitle(ol,DString());
2576 ol.parseText(title);
2577 endTitle(ol,DString(),DString());
2578
2579 if (addToIndex)
2580 {
2581 Doxygen::indexList->addContentsItem(false,title,DString(),"exceptions",DString(),false,true);
2582 }
2583
2584 ol.startContents();
2585 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2586 endFile(ol); // contains ol.endContents()
2587
2588 ol.popGeneratorState();
2589}
@ Exception
Definition classdef.h:112
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1487
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:404
void startTitle(OutputList &ol, const DString &fileName, const DefinitionMutable *def)
Definition index.cpp:394
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2292
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:411
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.cpp:194
bool visible() const
Definition layout.h:226

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

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

2478{
2479 if (Index::instance().numAnnotatedInterfaces()==0) return;
2480 ol.pushGeneratorState();
2482 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2483 DString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2484 bool addToIndex = lne==nullptr || lne->visible();
2485
2486 startFile(ol,"interfaces",false,DString(),title,HighlightedItem::Interfaces);
2487
2488 startTitle(ol,DString());
2489 ol.parseText(title);
2490 endTitle(ol,DString(),DString());
2491
2492 if (addToIndex)
2493 {
2494 Doxygen::indexList->addContentsItem(false,title,DString(),"interfaces",DString(),false,true);
2495 }
2496
2497 ol.startContents();
2498 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2499 endFile(ol); // contains ol.endContents()
2500
2501 ol.popGeneratorState();
2502}
@ Interface
Definition classdef.h:109
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().

◆ writeAlphabeticalRecordIndex()

void writeAlphabeticalRecordIndex ( OutputList & ol)
static

Definition at line 2535 of file index.cpp.

2536{
2537 if (Index::instance().numAnnotatedRecords()==0) return;
2538 ol.pushGeneratorState();
2540 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::RecordIndex);
2541 DString title = lne ? lne->title() : theTranslator->trRecordIndex();
2542 bool addToIndex = lne==nullptr || lne->visible();
2543
2544 startFile(ol,"records",false,DString(),title,HighlightedItem::Records);
2545
2546 startTitle(ol,DString());
2547 ol.parseText(title);
2548 endTitle(ol,DString(),DString());
2549
2550 if (addToIndex)
2551 {
2552 Doxygen::indexList->addContentsItem(false,title,DString(),"records",DString(),false,true);
2553 }
2554
2555 ol.startContents();
2556 writeAlphabeticalClassList(ol, ClassDef::Record, Index::instance().numAnnotatedRecords());
2557 endFile(ol); // contains ol.endContents()
2558
2559 ol.popGeneratorState();
2560}
virtual DString trRecordIndex()=0

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

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2506 of file index.cpp.

2507{
2508 if (Index::instance().numAnnotatedStructs()==0) return;
2509 ol.pushGeneratorState();
2511 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2512 DString title = lne ? lne->title() : theTranslator->trStructIndex();
2513 bool addToIndex = lne==nullptr || lne->visible();
2514
2515 startFile(ol,"structs",false,DString(),title,HighlightedItem::Structs);
2516
2517 startTitle(ol,DString());
2518 ol.parseText(title);
2519 endTitle(ol,DString(),DString());
2520
2521 if (addToIndex)
2522 {
2523 Doxygen::indexList->addContentsItem(false,title,DString(),"structs",DString(),false,true);
2524 }
2525
2526 ol.startContents();
2527 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2528 endFile(ol); // contains ol.endContents()
2529
2530 ol.popGeneratorState();
2531}
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 2187 of file index.cpp.

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

2749{
2750 const auto &index = Index::instance();
2752 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2753 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2756 "annotatedexceptions",
2758}
virtual DString trExceptionList()=0
virtual DString trExceptionListDescription()=0
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2618
@ AnnotatedExceptions
Definition index.h:77

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

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2692 of file index.cpp.

2693{
2694 const auto &index = Index::instance();
2696 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2697 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2700 "annotated",
2702}
virtual DString trCompoundList()=0
virtual DString trCompoundListDescription()=0
@ AnnotatedClasses
Definition index.h:73

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

2619{
2620 //printf("writeAnnotatedIndex: count=%d printed=%d\n", ctx.numAnnotated, ctx.numPrinted);
2621 if (ctx.numAnnotated==0) return;
2622
2623 ol.pushGeneratorState();
2625 if (ctx.numPrinted==0)
2626 {
2629 }
2631 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2632 DString title = lne ? lne->title() : ctx.listDefaultTitleText;
2633 bool addToIndex = lne==nullptr || lne->visible();
2634
2635 startFile(ol,ctx.fileBaseName,false,DString(),title,ctx.hiItem);
2636
2637 startTitle(ol,DString());
2638 ol.parseText(title);
2639 endTitle(ol,DString(),DString());
2640
2641 ol.startContents();
2642
2643 ol.startTextBlock();
2644 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2645 ol.endTextBlock();
2646
2647 // ---------------
2648 // Linear class index for Latex/RTF
2649 // ---------------
2650 ol.pushGeneratorState();
2653
2655
2657 ol.popGeneratorState();
2658
2659 // ---------------
2660 // Hierarchical class index for HTML
2661 // ---------------
2662 ol.pushGeneratorState();
2664
2665 {
2666 if (addToIndex)
2667 {
2668 Doxygen::indexList->addContentsItem(true,title,DString(),ctx.fileBaseName,DString(),true,true);
2670 }
2671 FTVHelp ftv(false);
2673 writeClassTree(*Doxygen::classLinkedMap,&ftv,addToIndex,true,ctx.compoundType);
2674 TextStream t;
2675 ftv.generateTreeViewInline(t);
2676 ol.writeString(t.str());
2677 if (addToIndex)
2678 {
2680 }
2681 }
2682
2683 ol.popGeneratorState();
2684 // ------
2685
2686 endFile(ol); // contains ol.endContents()
2687 ol.popGeneratorState();
2688}
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:2187
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2043
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1759
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2610
const DString listDefaultTitleText
Definition index.cpp:2611
const DString fileBaseName
Definition index.cpp:2614
const ClassDef::CompoundType compoundType
Definition index.cpp:2613
const HighlightedItem hiItem
Definition index.cpp:2615
const LayoutNavEntry::Kind listKind
Definition index.cpp:2609
const DString listDefaultIntroText
Definition index.cpp:2612
const int numAnnotated
Definition index.cpp:2607
DString intro() const
Definition layout.h:221

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(), writeAnnotatedRecordIndex(), and writeAnnotatedStructIndex().

◆ writeAnnotatedInterfaceIndex()

void writeAnnotatedInterfaceIndex ( OutputList & ol)
static

Definition at line 2706 of file index.cpp.

2707{
2708 const auto &index = Index::instance();
2710 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2711 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2714 "annotatedinterfaces",
2716}
virtual DString trInterfaceList()=0
virtual DString trInterfaceListDescription()=0
@ AnnotatedInterfaces
Definition index.h:74

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

◆ writeAnnotatedRecordIndex()

void writeAnnotatedRecordIndex ( OutputList & ol)
static

Definition at line 2734 of file index.cpp.

2735{
2736 const auto &index = Index::instance();
2738 AnnotatedIndexContext(index.numAnnotatedRecords(),index.numAnnotatedRecordsPrinted(),
2739 LayoutNavEntry::RecordList,LayoutNavEntry::Records,
2742 "annotatedrecords",
2744}
virtual DString trRecordListDescription()=0
virtual DString trRecordList()=0
@ AnnotatedRecords
Definition index.h:76

References AnnotatedRecords, Index::instance(), ClassDef::Record, theTranslator, Translator::trRecordList(), Translator::trRecordListDescription(), and writeAnnotatedIndexGeneric().

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2720 of file index.cpp.

2721{
2722 const auto &index = Index::instance();
2724 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2725 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2728 "annotatedstructs",
2730}
virtual DString trStructListDescription()=0
virtual DString trStructList()=0
@ AnnotatedStructs
Definition index.h:75

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

1101{
1102 ClassDefSet visitedClasses;
1103 if (ftv)
1104 {
1105 ol.pushGeneratorState();
1107 }
1108 bool started=false;
1109 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1110 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1111 if (started)
1112 {
1113 endIndexHierarchy(ol,0);
1114 if (addToIndex)
1115 {
1117 }
1118 }
1119 if (ftv)
1120 {
1121 ol.popGeneratorState();
1122 }
1123}
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:91
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:333
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:996

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

2763{
2764 const ClassDef *cd=md->getClassDef();
2765 if ( cd && prevClassName!=cd->displayName())
2766 {
2767 ol.writeString(separator);
2769 cd->displayName());
2770 prevClassName = cd->displayName();
2771 }
2772}
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 3352 of file index.cpp.

3358 ol.endTextBlock();
3359 if (dynamicMenus || disableIndex)
3360 {
3361 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3362 }
3363
3364 writeMemberList(ol,quickIndex,
3365 multiPageIndex ? letter : std::string(),
3366 index.isClassIndexLetterUsed(hl),
3368 endFile(ol);
3369 first=false;
3370 }
3371
3372 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3373
3374 ol.popGeneratorState();
3375}
3376
3377static 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:3352
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3197
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, DString fullName, bool multiPage)
Definition index.cpp:3152
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2815

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3219 of file index.cpp.

3223{
3224 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3225 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3226 static CmhlInfo cmhlInfo[] =
3227 {
3228 CmhlInfo("functions", theTranslator->trAll()),
3229 CmhlInfo("functions_func",
3230 fortranOpt ? theTranslator->trSubprograms() :
3231 vhdlOpt ? theTranslator->trFunctionAndProc() :
3233 CmhlInfo("functions_vars",theTranslator->trVariables()),
3234 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3235 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3236 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3237 CmhlInfo("functions_prop",theTranslator->trProperties()),
3238 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3239 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3240 };
3241 return &cmhlInfo[hl];
3242}
3243
3245{
3246 const auto &index = Index::instance();
3247 if (index.numDocumentedClassMembers(hl)==0) return;
3248
3249 bool disableIndex = Config_getBool(DISABLE_INDEX);
3250 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3251 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3252 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3253 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3254
3255 bool multiPageIndex=false;
3256 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3257 {
3258 multiPageIndex=true;
3259 }
3260
3261 ol.pushGeneratorState();
3263
3265 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3266 DString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3267 if (hl!=ClassMemberHighlight::All) title+=DString(" - ")+getCmhlInfo(hl)->title;
3268 bool addToIndex = lne==nullptr || lne->visible();
3269
3270 if (addToIndex)
3271 {
3272 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,DString(),
3273 getCmhlInfo(hl)->fname,DString(),multiPageIndex,true);
3274 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3275 }
3276
3277 bool first=true;
3278 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3279 {
3280 DString fileName = getCmhlInfo(hl)->fname;
3281 if (multiPageIndex)
3282 {
3283 DString cs(letter);
3284 if (!first)
3285 {
3286 fileName+="_"+letterToLabel(cs);
3287 }
3288 if (addToIndex)
3289 {
3290 Doxygen::indexList->addContentsItem(false,cs,DString(),fileName,DString(),false,true);
3291 }
3292 }
3293
3294 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3295
3296 auto writeQuickLinks = [&,cap_letter=letter]()
3297 {
3299 if (!dynamicMenus)
3300 {
3302
3303 // index item for global member list
3308
3309 // index items per category member lists
3310 for (int i=1;i<ClassMemberHighlight::Total;i++)
3311 {
3312 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3313 {
3314 startQuickIndexItem(ol,getCmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3316 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3317 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3319 }
3320 }
3321
3323
3324 // quick alphabetical index
3325 if (quickIndex)
3326 {
3327 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3328 getCmhlInfo(hl)->fname,multiPageIndex);
3329 }
3330
3331 ol.writeString("</div><!-- main-nav -->\n");
3332 }
3333 };
3334
3335 ol.startFile(fileName+extension,false,DString(),title);
3336 ol.startQuickIndices();
3337 if (!disableIndex && !quickLinksAfterSplitbar)
3338 {
3339 writeQuickLinks();
3340 }
3341 ol.endQuickIndices();
3342 ol.writeSplitBar(fileName,DString());
3343 if (quickLinksAfterSplitbar)
3344 {
3345 writeQuickLinks();
3346 if (!dynamicMenus)
3347 {
3348 ol.writeString("<div id=\"container\">\n");
3349 ol.writeString("<div id=\"doc-content\">\n");
3350 }
static DString fixSpaces(const DString &s)
Definition htmlgen.cpp:3793
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:355
static void startQuickIndexItem(OutputList &ol, const DString &l, bool hl, bool, bool &first)
Definition index.cpp:374
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3219
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:368
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:387
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, DString fullName, bool multiPage)
Definition index.cpp:3125
const char * fname
Definition index.cpp:3193
DString title
Definition index.cpp:3194

◆ writeClassTree()

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

Definition at line 1759 of file index.cpp.

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

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

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

2054{
2055 for (const auto &nd : nsLinkedMap)
2056 {
2057 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2058 }
2059}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1967

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2043 of file index.cpp.

2045{
2046 for (const auto &nd : nsLinkedMap)
2047 {
2048 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2049 }
2050}

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

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

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

4795{
4796 for (const auto &cd : *Doxygen::conceptLinkedMap)
4797 {
4798 if ((cd->getOuterScope()==nullptr ||
4799 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4800 )
4801 {
4802 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4803 ftv->addContentsItem(
4804 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4805 DString(),false,cd->partOfGroups().empty(),cd.get());
4806 if (addToIndex)
4807 {
4809 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4810 DString(),false,cd->partOfGroups().empty(),cd.get());
4811 }
4812 }
4813 }
4814}
4815
4816static void writeConceptIndex(OutputList &ol)
4817{
4818 if (Index::instance().numDocumentedConcepts()==0) return;
4819 ol.pushGeneratorState();
4820 // 1.{
4823 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4824 DString title = lne ? lne->title() : theTranslator->trConceptList();
4825 bool addToIndex = lne==nullptr || lne->visible();
4826
4827 startFile(ol,"concepts",false,DString(),title,HighlightedItem::Concepts);
4828 startTitle(ol,DString());
4829 ol.parseText(title);
4830 endTitle(ol,DString(),DString());
4831 ol.startContents();
4832 ol.startTextBlock();
4833 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4834 ol.endTextBlock();
4835
4836 // ---------------
4837 // Normal group index for Latex/RTF
4838 // ---------------
4839 // 2.{
4840 ol.pushGeneratorState();
4842
4843 bool first=true;
4844 for (const auto &cd : *Doxygen::conceptLinkedMap)
4845 {
4846 if (cd->isLinkableInProject())
4847 {
4848 if (first)
4849 {
4850 ol.startIndexList();
4851 first=false;
4852 }
4853 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4854 ol.startIndexKey();
4855 ol.writeObjectLink(DString(),cd->getOutputFileBase(),DString(),cd->displayName());
4856 ol.endIndexKey();
4857
4858 bool hasBrief = !cd->briefDescription().empty();
4859 ol.startIndexValue(hasBrief);
4860 if (hasBrief)
4861 {
4862 ol.generateDoc(cd->briefFile(),
4863 cd->briefLine(),
4864 cd.get(),
4865 nullptr,
4866 cd->briefDescription(true),
4867 DocOptions()
4868 .setSingleLine(true)
4869 .setLinkFromIndex(true));
4870 }
4871 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4872
4873 }
4874 }
4875 if (!first) ol.endIndexList();
4876
4877 ol.popGeneratorState();
4878 // 2.}
4879
4880 // ---------------
4881 // interactive group index for HTML
4882 // ---------------
4883 // 2.{
4884 ol.pushGeneratorState();
4886
4887 {
4888 if (addToIndex)
virtual DString trConceptList()=0
virtual DString trConceptListDescription(bool extractAll)=0
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4791

◆ writeConceptList()

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

Definition at line 4685 of file index.cpp.

4685 {
4686 if (addToIndex)
4687 {
4688 Doxygen::indexList->addContentsItem(true,title,DString(),"modules",DString(),true,true);
4690 }
4691 FTVHelp ftv(false);
4692 writeModuleList(ol,&ftv,addToIndex);
4693 TextStream t;
4695 ol.writeString(t.str());
4696 if (addToIndex)
4697 {
4699 }
4700 }
4701 ol.popGeneratorState();
4702 // 2.}
4703 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:889
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4593

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

4777 {
4779 }
4780
4781 ftv->incContentsDepth();
4782 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,false,addToIndex);
4783 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4784 ftv->decContentsDepth();
4785
4786 if (addToIndex)
4787 {
4789 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4708
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4685

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4708 of file index.cpp.

4711{
4712 for (const auto &cd : concepts)
4713 {
4714 if (cd->isLinkableInProject())
4715 {

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4718 of file index.cpp.

4722 {
4723 Doxygen::indexList->addContentsItem(false,cd->displayName(false),cd->getReference(),
4724 cd->getOutputFileBase(),DString(),false,cd->partOfGroups().empty());
4725 }
4726 }
4727 }
4728}
4729
4731 bool rootOnly, bool addToIndex);
4732
4733static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap,FTVHelp *ftv,
4734 bool rootOnly, bool addToIndex)
4735{
4736 for (const auto &nd : nsLinkedMap)
4737 {
4738 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4739 }
4740}
4741
4742
4744 bool rootOnly, bool addToIndex)
4745{
4746 if (!nd->isAnonymous() &&
4747 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4748 {
4749 bool isDir = namespaceHasNestedConcept(nd);
4750 bool isLinkable = nd->isLinkableInProject();
4751
4752 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4753
4754 DString ref;
4755 DString file;
4756 if (isLinkable)
4757 {
4758 ref = nd->getReference();
4759 file = nd->getOutputFileBase();
4760 }
4761
4762 if (isDir)
4763 {
4764 ftv->addContentsItem(isDir,nd->localName(),ref,file,DString(),false,true,nd);
4765
4766 if (addToIndex)
4767 {
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4718
bool namespaceHasNestedConcept(const NamespaceDef *nd)

◆ writeDirHierarchy()

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

Definition at line 932 of file index.cpp.

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

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

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

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

3934{
3935 const auto &index = Index::instance();
3936 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3937 bool addToIndex = lne==nullptr || lne->visible();
3938 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3939 {
3940 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),DString(),"modulemembers",DString());
3942 }
3943 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3950 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3951 {
3953 }
3954}
3955
3956//----------------------------------------------------------------------------
3957
3958static void writeExampleIndex(OutputList &ol)
3959{
3960 if (Doxygen::exampleLinkedMap->empty()) return;
3961 ol.pushGeneratorState();
3964 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3965 DString title = lne ? lne->title() : theTranslator->trExamples();
3966 bool addToIndex = lne==nullptr || lne->visible();
3967
3968 startFile(ol,"examples",false,DString(),title,HighlightedItem::Examples);
3969
3970 startTitle(ol,DString());
3971 ol.parseText(title);
3972 endTitle(ol,DString(),DString());
3973
3974 ol.startContents();
3975
3976 if (addToIndex)
3977 {
3978 Doxygen::indexList->addContentsItem(true,title,DString(),"examples",DString(),true,true);
3980 }
3981
3982 ol.startTextBlock();
3983 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3984 ol.endTextBlock();
3985
3986 ol.startItemList();
3987 for (const auto &pd : *Doxygen::exampleLinkedMap)
3988 {
3989 ol.startItemListItem();
3990 DString n=pd->getOutputFileBase();
3991 if (!pd->title().empty())
3992 {
3993 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:3933
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3776

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

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

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

2776{
2777 const FileDef *fd=md->getFileDef();
2778 if (fd && prevFileName!=fd->name())
2779 {
2780 ol.writeString(separator);
2782 fd->name());
2783 prevFileName = fd->name();
2784 }
2785}
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 3540 of file index.cpp.

3548 ol.endTextBlock();
3549 if (dynamicMenus || disableIndex)
3550 {
3551 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3552 }
3553
3554 writeMemberList(ol,quickIndex,
3555 multiPageIndex ? letter : std::string(),
3556 index.isFileIndexLetterUsed(hl),
3558 endFile(ol);
3559 first=false;
3560 }
3561 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3562 ol.popGeneratorState();
3563}
virtual DString trFileMembersDescriptionTotal(FileMemberHighlight::Enum hl)=0
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3389

◆ writeFileMemberIndexFiltered()

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

Definition at line 3412 of file index.cpp.

3415{
3416 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3417 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3418 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3419 static FmhlInfo fmhlInfo[] =
3420 {
3421 FmhlInfo("globals", theTranslator->trAll()),
3422 FmhlInfo("globals_func",
3423 fortranOpt ? theTranslator->trSubprograms() :
3424 vhdlOpt ? theTranslator->trFunctionAndProc() :
3426 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3427 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3428 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3429 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3430 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3431 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3432 FmhlInfo("globals_defs",theTranslator->trDefines())
3433 };
3434 return &fmhlInfo[hl];
3435}
3436
3438{
3439 const auto &index = Index::instance();
3440 if (index.numDocumentedFileMembers(hl)==0) return;
3441
3442 bool disableIndex = Config_getBool(DISABLE_INDEX);
3443 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3444 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3445 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3446 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3447
3448 bool multiPageIndex=false;
3449 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3450 {
3451 multiPageIndex=true;
3452 }
3453
3454 ol.pushGeneratorState();
3456
3458 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3459 DString title = lne ? lne->title() : theTranslator->trFileMembers();
3460 bool addToIndex = lne==nullptr || lne->visible();
3461
3462 if (addToIndex)
3463 {
3464 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,DString(),
3465 getFmhlInfo(hl)->fname,DString(),multiPageIndex,true);
3466 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3467 }
3468
3469 bool first=true;
3470 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3471 {
3472 DString fileName = getFmhlInfo(hl)->fname;
3473 if (multiPageIndex)
3474 {
3475 DString cs(letter);
3476 if (!first)
3477 {
3478 fileName+="_"+letterToLabel(cs);
3479 }
3480 if (addToIndex)
3481 {
3482 Doxygen::indexList->addContentsItem(false,cs,DString(),fileName,DString(),false,true);
3483 }
3484 }
3485
3486 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3487
3488 auto writeQuickLinks = [&,cap_letter=letter]()
3489 {
3491 if (!dynamicMenus)
3492 {
3494
3495 // index item for all file member lists
3500
3501 // index items for per category member lists
3502 for (int i=1;i<FileMemberHighlight::Total;i++)
3503 {
3504 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3505 {
3507 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3510 }
3511 }
3512
3514
3515 if (quickIndex)
3516 {
3517 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3518 getFmhlInfo(hl)->fname,multiPageIndex);
3519 }
3520
3521 ol.writeString("</div><!-- main-nav -->\n");
3522 }
3523 };
3524
3525 ol.startFile(fileName+extension,false,DString(),title);
3526 ol.startQuickIndices();
3527 if (!disableIndex && !quickLinksAfterSplitbar)
3528 {
3529 writeQuickLinks();
3530 }
3531 ol.endQuickIndices();
3532 ol.writeSplitBar(fileName,DString());
3533 if (quickLinksAfterSplitbar)
3534 {
3535 writeQuickLinks();
3536 if (!dynamicMenus)
3537 {
3538 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:3412

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1242 of file index.cpp.

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

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

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

4160{
4161 int count=0;
4162 for (const auto &dd : *Doxygen::dirLinkedMap)
4163 {
4164 if (dd->isLinkableInProject())
4165 {
4166 count++;
4167 }
4168 }
4169 return count;
4170}
4171
4172
4173//----------------------------------------------------------------------------
4174
4175void writeGraphInfo(OutputList &ol)
4176{
4177 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4178 ol.pushGeneratorState();
4180
4181 DotLegendGraph gd;
4182 gd.writeGraph(Config_getString(HTML_OUTPUT));
4183
4184 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4185 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4186 // temporarily disable the stripping of comments for our own code example!
4187 Config_updateBool(STRIP_CODE_COMMENTS,false);
4188 // temporarily disable create subdirs for linking to our example
4189 Config_updateBool(CREATE_SUBDIRS,false);
4190
4191 startFile(ol,"graph_legend",false,DString(),theTranslator->trLegendTitle());
4192 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:4150

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4446 of file index.cpp.

4446 {
4447 startIndexHierarchy(ol,level+1);
4448 for (const auto &subgd : gd->getSubGroups())
4449 {
4450 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4451 }
4452 endIndexHierarchy(ol,level+1);
4453 }
4454 }
4455 }
4456
4457 ol.endIndexListItem();
4458
4459 if (addToIndex)
4460 {
4462 }
4463 if (ftv)
4464 {
4465 ftv->decContentsDepth();
4466 }
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4200

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

4201 {
4202 legendDocs = legendDocs.left(s+8) + "
"
+ legendDocs.mid(e);
4203 //printf("legendDocs=%s\n",qPrint(legendDocs));
4204 }
4205
4206 {
4207 auto fd = createFileDef("","graph_legend.dox");
4208 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4209 }
4210
4211 // restore config settings
4212 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4213 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4214
4215 endFile(ol);
4216 ol.popGeneratorState();
4217}
4218
4219
4220
4221//----------------------------------------------------------------------------
4222/*!
4223 * write groups as hierarchical trees
4224 */
4225static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp* ftv, bool addToIndex)
4226{
4227 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4228 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4229 if (level>20)
4230 {
4231 warn(gd->getDefFileName(),gd->getDefLine(),
4232 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4233 return;
4234 }
4235
4236 /* Some groups should appear twice under different parent-groups.
4237 * That is why we should not check if it was visited
4238 */
4239 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4240 {
4241 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4242 // write group info
4243 bool hasSubGroups = !gd->getSubGroups().empty();
4244 bool hasSubPages = !gd->getPages().empty();
4245 size_t numSubItems = 0;
4246 for (const auto &ml : gd->getMemberLists())
4247 {
4248 if (ml->listType().isDocumentation())
4249 {
4250 numSubItems += ml->size();
4251 }
4252 }
4253 numSubItems += gd->getNamespaces().size();
4254 numSubItems += gd->getClasses().size();
4255 numSubItems += gd->getFiles().size();
4256 numSubItems += gd->getConcepts().size();
4257 numSubItems += gd->getDirs().size();
4258 numSubItems += gd->getPages().size();
4259
4260 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4261 DString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4262 DString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4263
4264 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4265 if (addToIndex)
4266 {
4269 isDir,true,nullptr,titleAsHtml);
4271 }
4272 if (ftv)
4273 {
4274 ftv->addContentsItem(hasSubGroups,title,
4276 false,false,gd,titleAsHtml);
4277 ftv->incContentsDepth();
4278 }
4279
4280 ol.startIndexListItem();
4282 ol.generateDoc(gd->getDefFileName(),
4283 gd->getDefLine(),
4284 gd,
4285 nullptr,
4286 gd->groupTitle(),
4287 DocOptions()
4288 .setSingleLine(true)
4289 .setAutolinkSupport(false));
4291
4292 if (gd->isReference())
4293 {
4294 ol.startTypewriter();
4295 ol.docify(" [external]");
4296 ol.endTypewriter();
4297 }
4298
4299 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4300 {
4301 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4302 {
4303 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4304 if (lmd)
4305 {
4306 MemberList *ml = gd->getMemberList(lmd->type);
4307 if (ml)
4308 {
4309 for (const auto &md : *ml)
4310 {
4311 const MemberVector &enumList = md->enumFieldList();
4312 isDir = !enumList.empty() && md->isEnumerate();
4313 if (md->isVisible() && !md->isAnonymous())
4314 {
4316 md->qualifiedName(),md->getReference(),
4317 md->getOutputFileBase(),md->anchor(),false,addToIndex);
4318 }
4319 if (isDir)
4320 {
4322 for (const auto &emd : enumList)
4323 {
4324 if (emd->isVisible())
4325 {
4327 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4328 emd->anchor(),false,addToIndex);
4329 }
4330 }
4332 }
4333 }
4334 }
4335 }
4336 }
4337 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4338 {
4339 for (const auto &cd : gd->getClasses())
4340 {
4341 //bool nestedClassInSameGroup =
4342 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4343 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4344 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4345 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4346 {
4348 LayoutDocManager::Class,
4349 cd->displayName(),
4350 cd->anchor(),
4351 addToIndex,
4352 true);
4353 }
4354 }
4355 }
4356 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4357 {
4358 for (const auto &nd : gd->getNamespaces())
4359 {
4360 if (nd->isVisible())
4361 {
4363 nd->displayName(),nd->getReference(),
4364 nd->getOutputFileBase(),DString(),false,Config_getBool(SHOW_NAMESPACES));
4365 }
4366 }
4367 }
4368 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4369 {
4370 for (const auto &cd : gd->getConcepts())
4371 {
4372 if (cd->isVisible())
4373 {
4375 cd->displayName(),cd->getReference(),
4376 cd->getOutputFileBase(),DString(),false,addToIndex);
4377 }
4378 }
4379 }
4380 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4381 {
4382 for (const auto &fd : gd->getFiles())
4383 {
4384 if (fd->isVisible())
4385 {
4387 fd->displayName(),fd->getReference(),
4388 fd->getOutputFileBase(),DString(),false,fd->isLinkableViaGroup());
4389 }
4390 }
4391 }
4392 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4393 {
4394 for (const auto &dd : gd->getDirs())
4395 {
4396 if (dd->isVisible())
4397 {
4399 dd->shortName(),dd->getReference(),
4400 dd->getOutputFileBase(),DString(),false,false);
4401 }
4402 }
4403 }
4404 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4405 {
4406 for (const auto &pd : gd->getPages())
4407 {
4408 const SectionInfo *si=nullptr;
4409 if (!pd->name().empty()) si=SectionManager::instance().find(pd->name());
4410 hasSubPages = pd->hasSubPages();
4411 bool hasSections = pd->hasSections();
4412 DString pageTitle;
4413 if (pd->title().empty())
4414 pageTitle=pd->name();
4415 else
4416 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4417 DString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4419 hasSubPages || hasSections,
4420 pageTitle,
4421 gd->getReference(),
4422 gd->getOutputFileBase(),
4423 si ? si->label() : DString(),
4424 hasSubPages || hasSections,
4425 true,
4426 nullptr,
4427 pageTitleAsHtml); // addToNavIndex
4428 if (hasSections || hasSubPages)
4429 {
4431 }
4432 if (hasSections)
4433 {
4434 pd->addSectionsToIndex();
4435 }
4436 writePages(pd,nullptr);
4437 if (hasSections || hasSubPages)
4438 {
4440 }
4441 }
4442 }
4443 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4444 {
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:270

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

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1373 of file index.cpp.

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

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

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

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

4929 : lne->children())
4930 {
4931 if (entry->visible()) count++;
4932 }
4933 if (count>0)
4934 {
4935 ol.writeString("<ul>\n");
4936 for (const auto &entry: lne->children())
4937 {
4938 if (entry->visible())
4939 {
4940 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4941 HtmlGenerator::fixSpaces(entry->title())+"</span></a></li>\n");
4942 }
4943 }
4944 ol.writeString("</ul>\n");
4945 }
4946 endFile(ol);
4947 ol.popGeneratorState();
4948 }
4949}
4950
4951//----------------------------------------------------------------------------
4952
4953
4954static void writeIndex(OutputList &ol)
4955{
4956 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4957 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4958 bool disableIndex = Config_getBool(DISABLE_INDEX);
4959 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4960 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4961 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4962 DString projectName = Config_getString(PROJECT_NAME);
4963 // save old generator state
4964 ol.pushGeneratorState();
4965
4966 DString projPrefix;
4967 if (!projectName.empty())
4968 {
4969 projPrefix=projectName+" ";
4970 }
4971
4972 //--------------------------------------------------------------------
4973 // write HTML index
4974 //--------------------------------------------------------------------
4976
4977 DString defFileName =
4978 Doxygen::mainPage ? Doxygen::mainPage->docFile() : DString("[generated]");
4979 int defLine =
4980 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4981
4982 DString title, titleAsHtml;
4983 if (!mainPageHasTitle())
4984 {
4985 title = theTranslator->trMainPage();
4986 }
4987 else if (Doxygen::mainPage)
4988 {
4989 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4990 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4991 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4992 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4993 }
4994
4995 DString indexName="index";
4996 ol.startFile(indexName,false,DString(),title);
4997
4999 {
5000 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
5001 bool hasTitle = !projectName.empty() && mainPageHasTitle() && dstricmp(title,projectName)!=0;
5002 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
5003 if (hasTitle) // to avoid duplicate entries in the treeview
5004 {
5006 title,
5007 DString(),
5008 indexName,
5009 DString(),
5010 hasSubs,
5011 true,
5012 nullptr,
5013 titleAsHtml);
5014 }
5015 if (hasSubs)
5016 {
5017 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
5018 }
5019 }
5020
5021 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
5022 ol.startQuickIndices();
5023 if (!disableIndex && !quickLinksAfterSplitbar)
5024 {
5026 }
5027 ol.endQuickIndices();
5028 ol.writeSplitBar(indexName,DString());
5029 if (quickLinksAfterSplitbar)
5030 {
5032 }
5033 ol.writeSearchInfo();
5034 bool headerWritten=false;
5036 {
5037 if (!Doxygen::mainPage->title().empty())
5038 {
5039 if (Doxygen::mainPage->title().lower() != "notitle")
5040 ol.startPageDoc(Doxygen::mainPage->title());
5041 else
5042 ol.startPageDoc("");
5043 }
5044 else
5045 ol.startPageDoc(projectName);
5046 }
5047 if (Doxygen::mainPage && !Doxygen::mainPage->title().empty())
5048 {
5049 if (Doxygen::mainPage->title().lower()!="notitle")
5050 {
5051 ol.startHeaderSection();
5052 ol.startTitleHead(DString());
5053 ol.generateDoc(Doxygen::mainPage->docFile(),
5054 Doxygen::mainPage->getStartBodyLine(),
5055 Doxygen::mainPage.get(),
5056 nullptr,
5057 Doxygen::mainPage->title(),
5058 DocOptions()
5059 .setSingleLine(true));
5060 headerWritten = true;
5061 }
5062 }
5063 else
5064 {
5065 if (!projectName.empty())
5066 {
5067 ol.startHeaderSection();
5068 ol.startTitleHead(DString());
5069 ol.parseText(theTranslator->trDocumentation(projectName));
5070 headerWritten = true;
5071 }
5072 }
5073 if (headerWritten)
5074 {
5076 ol.endHeaderSection();
5077 }
5078
5079 ol.startContents();
5080 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5081 {
5083 }
5084
5086 {
5087 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5088 {
5089 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5090 }
5091
5092 ol.startTextBlock();
5093 ol.generateDoc(defFileName,
5094 defLine,
5095 Doxygen::mainPage.get(),
5096 nullptr,
5097 Doxygen::mainPage->documentation(),
5098 DocOptions()
5099 .setIndexWords(true));
5100 ol.endTextBlock();
5101 ol.endPageDoc();
5102 }
5103
5106 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5108
5109 if (Doxygen::mainPage &&
5110 generateTreeView &&
5111 pageOutlinePanel &&
5112 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5113 Doxygen::mainPage->hasSections()
5114 )
5115 {
5116 ol.writeString("</div><!-- doc-content -->\n");
5117 ol.endContents();
5118 Doxygen::mainPage->writePageNavigation(ol);
5119 ol.writeString("</div><!-- container -->\n");
5120 endFile(ol,true,true);
5121 }
5122 else
5123 {
5124 endFile(ol);
5125 }
5126
5128
5129 //--------------------------------------------------------------------
5130 // write LaTeX/RTF index
5131 //--------------------------------------------------------------------
5135
5137 {
5138 msg("Generating main page...\n");
5139 Doxygen::mainPage->writeDocumentation(ol);
5140 }
5141
5142 ol.startFile("refman",false,DString(),DString());
5146
5147 if (projPrefix.empty())
5148 {
5150 }
5151 else
5152 {
5153 ol.parseText(projPrefix);
5154 }
5155
5156 if (!Config_getString(PROJECT_NUMBER).empty())
5157 {
5158 ol.startProjectNumber();
5159 ol.generateDoc(defFileName,
5160 defLine,
5161 Doxygen::mainPage.get(),
5162 nullptr,
5163 Config_getString(PROJECT_NUMBER),
5164 DocOptions());
5165 ol.endProjectNumber();
5166 }
5173
5174 ol.lastIndexPage();
5176 {
5179 }
5180 const auto &index = Index::instance();
5181 if (index.numDocumentedPages()>0)
5182 {
5185 }
5186
5188 if (!Config_getBool(LATEX_HIDE_INDICES))
5189 {
5190 //if (indexedPages>0)
5191 //{
5192 // ol.startIndexSection(isPageIndex);
5193 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5194 // ol.endIndexSection(isPageIndex);
5195 //}
5196 if (index.numDocumentedModules()>0)
5197 {
5199 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5201 }
5202 if (index.numDocumentedGroups()>0)
5203 {
5205 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5207 }
5208 if (index.numDocumentedDirs()>0)
5209 {
5213 }
5214 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5215 {
5216 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5217 if (lne)
5218 {
5220 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5222 }
5223 }
5224 if (index.numDocumentedConcepts()>0)
5225 {
5227 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5229 }
5230 if (index.numHierarchyInterfaces()>0)
5231 {
5233 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5235 }
5236 if (index.numHierarchyClasses()>0)
5237 {
5238 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5239 if (lne)
5240 {
5242 ol.parseText(/*projPrefix+*/
5243 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5244 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5246 ));
5248 }
5249 }
5250 if (index.numHierarchyExceptions()>0)
5251 {
5253 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5255 }
5256 if (index.numAnnotatedInterfacesPrinted()>0)
5257 {
5259 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5261 }
5262 if (index.numAnnotatedClassesPrinted()>0)
5263 {
5265 ol.parseText(/*projPrefix+*/
5266 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5267 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5269 ));
5271 }
5272 if (index.numAnnotatedStructsPrinted()>0)
5273 {
5275 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5277 }
5278 if (index.numAnnotatedRecordsPrinted()>0)
5279 {
5281 ol.parseText(/*projPrefix+*/theTranslator->trRecordIndex());
5283 }
5284 if (index.numAnnotatedExceptionsPrinted()>0)
5285 {
5287 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5289 }
5290 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5291 {
5293 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5295 }
5296 }
5298
5299 if (index.numDocumentedModules()>0)
5300 {
5302 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5304 }
5305 if (index.numDocumentedGroups()>0)
5306 {
5308 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5310 }
5311 if (index.numDocumentedDirs()>0)
5312 {
5314 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5316 }
5317 if (index.numDocumentedNamespaces()>0)
5318 {
5322 }
5323 if (index.numDocumentedConcepts()>0)
5324 {
5326 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5328 }
5329 if (index.numAnnotatedInterfacesPrinted()>0)
5330 {
5332 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5334 }
5335 if (index.numAnnotatedClassesPrinted()>0)
5336 {
5340 }
5341 if (index.numAnnotatedStructsPrinted()>0)
5342 {
5344 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5346 }
5347 if (index.numAnnotatedRecordsPrinted()>0)
5348 {
5350 ol.parseText(/*projPrefix+*/theTranslator->trRecordDocumentation());
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 trRecordDocumentation()=0
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:4929
@ 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:4972
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:3940

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5902 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5354 of file index.cpp.

5354 {
5356 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5358 }
5359 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5360 {
5362 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5364 }
5365 if (!Doxygen::exampleLinkedMap->empty())
5366 {
5368 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5370 }
5372 endFile(ol);
5373
5374 ol.popGeneratorState();
5375}
5376
5377static std::vector<bool> indexWritten;
5378
5379static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5380{
5381 auto isRef = [](const DString &s)
5382 {
5383 return s.startsWith("@ref") || s.startsWith("\\ref");
5384 };
5385 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5386 const auto &index = Index::instance();
5387 for (const auto &lne : entries)
5388 {
5389 LayoutNavEntry::Kind kind = lne->kind();
5390 size_t idx = static_cast<size_t>(kind);
5391 if (idx>=indexWritten.size())
5392 {
5393 size_t oldSize = indexWritten.size();
5394 size_t newSize = idx+1;
5395 indexWritten.resize(newSize);
5396 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=false;
5397 }
5398 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5399 bool addToIndex=lne->visible();
5400 bool needsClosing=false;
5401 if (!indexWritten.at(idx))
5402 {
5403 switch(kind)
5404 {
5405 case LayoutNavEntry::MainPage:
5406 msg("Generating index page...\n");
5407 writeIndex(ol);
5408 break;
5409 case LayoutNavEntry::Pages:
5410 msg("Generating page index...\n");
5411 writePageIndex(ol);
5412 break;
5413 case LayoutNavEntry::Topics:
5414 msg("Generating topic index...\n");
5415 writeTopicIndex(ol);
5416 break;
5417 case LayoutNavEntry::Modules:
5418 {
5419 if (index.numDocumentedModules()>0 && addToIndex)
5420 {
5421 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5423 needsClosing=true;
5424 }
5425 }
5426 break;
5427 case LayoutNavEntry::ModuleList:
5428 msg("Generating module index...\n");
5429 writeModuleIndex(ol);
5430 break;
5431 case LayoutNavEntry::ModuleMembers:
5432 msg("Generating module member index...\n");
5434 break;
5435 case LayoutNavEntry::Namespaces:
5436 {
5437 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5438 if (showNamespaces)
5439 {
5440 if (index.numDocumentedNamespaces()>0 && addToIndex)
5441 {
5442 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5444 needsClosing=true;
5445 }
5446 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5447 {
5448 msg("Generating namespace index...\n");
5450 }
5451 }
5452 }
5453 break;
5454 case LayoutNavEntry::NamespaceList:
5455 {
5456 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5457 if (showNamespaces)
5458 {
5459 msg("Generating namespace index...\n");
5461 }
5462 }
5463 break;
5464 case LayoutNavEntry::NamespaceMembers:
5465 msg("Generating namespace member index...\n");
5467 break;
5468 case LayoutNavEntry::Classes:
5469 if (index.numAnnotatedClasses()>0 && addToIndex)
5470 {
5471 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5473 needsClosing=true;
5474 }
5475 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5476 {
5477 msg("Generating annotated compound index...\n");
5479 }
5480 break;
5481 case LayoutNavEntry::Concepts:
5482 msg("Generating concept index...\n");
5484 break;
5485 case LayoutNavEntry::ClassList:
5486 msg("Generating annotated compound index...\n");
5488 break;
5489 case LayoutNavEntry::ClassIndex:
5490 msg("Generating alphabetical compound index...\n");
5492 break;
5493 case LayoutNavEntry::ClassHierarchy:
5494 msg("Generating hierarchical class index...\n");
5496 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5497 {
5498 msg("Generating graphical class hierarchy...\n");
5500 }
5501 break;
5502 case LayoutNavEntry::ClassMembers:
5503 if (!sliceOpt)
5504 {
5505 msg("Generating member index...\n");
5507 }
5508 break;
5509 case LayoutNavEntry::Interfaces:
5510 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5511 {
5512 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5514 needsClosing=true;
5515 }
5516 break;
5517 case LayoutNavEntry::InterfaceList:
5518 if (sliceOpt)
5519 {
5520 msg("Generating annotated interface index...\n");
5522 }
5523 break;
5524 case LayoutNavEntry::InterfaceIndex:
5525 if (sliceOpt)
5526 {
5527 msg("Generating alphabetical interface index...\n");
5529 }
5530 break;
5531 case LayoutNavEntry::InterfaceHierarchy:
5532 if (sliceOpt)
5533 {
5534 msg("Generating hierarchical interface index...\n");
5536 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5537 {
5538 msg("Generating graphical interface hierarchy...\n");
5540 }
5541 }
5542 break;
5543 case LayoutNavEntry::Structs:
5544 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5545 {
5546 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5548 needsClosing=true;
5549 }
5550 break;
5551 case LayoutNavEntry::StructList:
5552 if (sliceOpt)
5553 {
5554 msg("Generating annotated struct index...\n");
5556 }
5557 break;
5558 case LayoutNavEntry::StructIndex:
5559 if (sliceOpt)
5560 {
5561 msg("Generating alphabetical struct index...\n");
5563 }
5564 break;
5565 case LayoutNavEntry::Records:
5566 if (sliceOpt && index.numAnnotatedRecords()>0 && addToIndex)
5567 {
5568 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5570 needsClosing=true;
5571 }
5572 break;
5573 case LayoutNavEntry::RecordList:
5574 if (sliceOpt)
5575 {
5576 msg("Generating annotated record index...\n");
5578 }
5579 break;
5580 case LayoutNavEntry::RecordIndex:
5581 if (sliceOpt)
5582 {
5583 msg("Generating alphabetical record index...\n");
5585 }
5586 break;
5587 case LayoutNavEntry::Exceptions:
5588 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5589 {
5590 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5592 needsClosing=true;
5593 }
5594 break;
5595 case LayoutNavEntry::ExceptionList:
5596 if (sliceOpt)
5597 {
5598 msg("Generating annotated exception index...\n");
5600 }
5601 break;
5602 case LayoutNavEntry::ExceptionIndex:
5603 if (sliceOpt)
5604 {
5605 msg("Generating alphabetical exception index...\n");
5607 }
5608 break;
5609 case LayoutNavEntry::ExceptionHierarchy:
5610 if (sliceOpt)
5611 {
5612 msg("Generating hierarchical exception index...\n");
5614 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5615 {
5616 msg("Generating graphical exception hierarchy...\n");
5618 }
5619 }
5620 break;
5621 case LayoutNavEntry::Files:
5622 {
5623 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5624 {
5625 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5627 needsClosing=true;
5628 }
5629 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5630 {
5631 msg("Generating file index...\n");
5632 writeFileIndex(ol);
5633 }
5634 }
5635 break;
5636 case LayoutNavEntry::FileList:
5637 msg("Generating file index...\n");
5638 writeFileIndex(ol);
5639 break;
5640 case LayoutNavEntry::FileGlobals:
5641 msg("Generating file member index...\n");
5643 break;
5644 case LayoutNavEntry::Examples:
5645 msg("Generating example index...\n");
5647 break;
5648 case LayoutNavEntry::User:
5649 if (addToIndex)
5650 {
5651 // prepend a ! or ^ marker to the URL to avoid tampering with it
5652 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5653 bool isRelative=url.at(0)=='!';
5654 if (!url.empty() && !isRelative) // absolute URL
5655 {
5656 url.prepend("^"); // prepend ^ to absolute URL
5657 }
5658 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5659 url,DString(),false,isRef(lne->baseFile()) || isRelative,
5660 nullptr,lne->titleAsHtml());
5661 }
5662 break;
5663 case LayoutNavEntry::UserGroup:
5664 if (addToIndex)
5665 {
5666 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5667 if (!url.empty())
5668 {
5669 if (url=="!") // result of a "[none]" url
5670 {
5671 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),DString(),DString(),false,false);
5672 }
5673 else
5674 {
5675 bool isRelative=url.at(0)=='!';
5676 if (!isRelative) // absolute URL
5677 {
5678 url.prepend("^"); // prepend ^ to absolute URL
5679 }
5680 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5681 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5682 }
5683 }
5684 else
5685 {
5686 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString(),true,true);
5687 }
5689 needsClosing=true;
5690 }
5691 writeUserGroupStubPage(ol,lne.get());
5692 break;
5693 case LayoutNavEntry::None:
5694 ASSERT(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5695 break;
5696 }
5697 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5698 {
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:5354
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1242
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2720
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2564
static std::vector< bool > indexWritten
Definition index.cpp:5352
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2692
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1603
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1347
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2448
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2706
static void writePageIndex(OutputList &ol)
Definition index.cpp:4076
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2061
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2748
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1268
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4892
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4470
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3908
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1452
static void writeAnnotatedRecordIndex(OutputList &ol)
Definition index.cpp:2734
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2477
static void writeAlphabeticalRecordIndex(OutputList &ol)
Definition index.cpp:2535
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2506
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4617
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1373
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3724
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1161
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3540
@ 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:152
DString correctURL(const DString &url, const DString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:4672

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

3155 {
3156 var item = navItems[i];
3157 var link = item.querySelector('a');
3158 item.classList.remove('current');
3159 if (link && link.getAttribute('href') === currentHash) {
3160 item.classList.add('current');
3161 }
3162 }
3163
3164 if (currentHash) {
3165 var target = document.querySelector(currentHash);
3166 if (target) {
3167 target.scrollIntoView();
3168 }
3169 }
3170}
3171updateNavHighlight();
3172window.addEventListener('hashchange', updateNavHighlight);
3173</script>
3174 )js");
3175}
3176
3177static void writeMemberIndex(OutputList &ol,
3178 const Index::MemberIndexMap &map, DString fullName,bool multiPage)
3179{
3180 bool first=true;
3181 ol.writeString("<br/>\n");
3182 DString alphaLinks = "<div class=\"qindex\">";
3183 StringMap usedLetters;
3184 for (const auto &[letter,list] : map)
3185 {
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 2815 of file index.cpp.

2818{
2819 int index = static_cast<int>(type);
2820 const int numIndices = 4;
2821 ASSERT(index<numIndices);
2822
2823 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const DString &separator,
2824 DString &prevNamespaceName);
2825
2826 // each index tab has its own write function
2827 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2828 {
2833 };
2834 DString prevName;
2835 DString prevDefName;
2836 bool first=true;
2837 bool firstSection=true;
2838 bool firstItem=true;
2839 const Index::MemberIndexList *mil = nullptr;
2840 std::string letter;
2841 for (const auto &kv : memberIndexMap)
2842 {
2843 if (!page.empty()) // specific page mode
2844 {
2845 auto it = memberIndexMap.find(page);
2846 if (it != memberIndexMap.end())
2847 {
2848 mil = &it->second;
2849 letter = page;
2850 }
2851 }
2852 else // do all pages
2853 {
2854 mil = &kv.second;
2855 letter = kv.first;
2856 }
2857 if (mil==nullptr || mil->empty()) continue;
2858 for (const auto &md : *mil)
2859 {
2860 const char *sep = nullptr;
2861 bool isFunc=!md->isObjCMethod() &&
2862 (md->isFunction() || md->isSlot() || md->isSignal());
2863 DString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2864 int startIndex = getPrefixIndex(name);
2865 if (name.data()+startIndex!=prevName) // new entry
2866 {
2867 if ((prevName.empty() ||
2868 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2869 useSections) // new section
2870 {
2871 if (!firstItem) ol.endItemListItem();
2872 if (!firstSection) ol.endItemList();
2873 DString cs = letterToLabel(letter);
2874 DString anchor = "index_"+convertToId(cs);
2875 DString title = "- "+letter+" -";
2876 ol.startSection(anchor,title,SectionType::Subsection);
2877 ol.docify(title);
2878 ol.endSection(anchor,SectionType::Subsection);
2879 ol.startItemList();
2880 firstSection=false;
2881 firstItem=true;
2882 }
2883 else if (!useSections && first)
2884 {
2885 ol.startItemList();
2886 first=false;
2887 }
2888
2889 // member name
2890 if (!firstItem) ol.endItemListItem();
2891 ol.startItemListItem();
2892 firstItem=false;
2893 ol.docify(name);
2894 if (isFunc) ol.docify("()");
2895 //ol.writeString("\n");
2896
2897 // link to class
2898 prevDefName="";
2899 sep = "&#160;:&#160;";
2900 prevName = name.data()+startIndex;
2901 }
2902 else // same entry
2903 {
2904 sep = ", ";
2905 // link to class for other members with the same name
2906 }
2907 if (index<numIndices)
2908 {
2909 // write the link for the specific list type
2910 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2911 }
2912 }
2913 if (!page.empty())
2914 {
2915 break;
2916 }
2917 }
2918 if (!firstItem) ol.endItemListItem();
2919 ol.endItemList();
2920}
std::vector< const MemberDef * > MemberIndexList
Definition index.h:169
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:2774
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevClassName)
Definition index.cpp:2761
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevModuleName)
Definition index.cpp:2800
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const DString &separator, DString &prevNamespaceName)
Definition index.cpp:2787
const char * name(int level)
Definition latexgen.h:368

References ASSERT, DString::at(), convertToId(), 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 478 of file index.cpp.

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

5890 {
5891 auto numDoc = [](std::size_t i) {
5893 };
5894 auto memList = [](std::size_t i) {
5896 };
5897 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5898 }
5899 else // recursive into child list
5900 {
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:140
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:149

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4617 of file index.cpp.

4619{
4620 if (ftv)
4621 {
4622 ol.pushGeneratorState();
4624 }
4625 startIndexHierarchy(ol,0);
4626 for (const auto &mod : ModuleManager::instance().modules())
4627 {
4628 if (mod->isPrimaryInterface())
4629 {
4630 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4631 }
4632 }
4633 endIndexHierarchy(ol,0);
4634 if (ftv)
4635 {
4636 ol.popGeneratorState();
4637 }
4638}
4639
4640//----------------------------------------------------------------------------
4641
4642static void writeModuleIndex(OutputList &ol)
4643{
4644 if (ModuleManager::instance().numDocumentedModules()==0) return;
4645 ol.pushGeneratorState();
4646 // 1.{
4647
4650 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4651 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4652 DString title = lne ? lne->title() : theTranslator->trModules();
4653 bool addToIndex = lne==nullptr || lne->visible();
4654
4655 startFile(ol,"modules",false,DString(),title,HighlightedItem::Modules);
4656 startTitle(ol,DString());
4657 ol.parseText(title);
4658 endTitle(ol,DString(),DString());
4659 ol.startContents();
4660 ol.startTextBlock();
4661 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4662 ol.endTextBlock();
4663
4664 // ---------------
4665 // Normal group index for Latex/RTF
4666 // ---------------
4667 // 2.{
4668 ol.pushGeneratorState();
4671
4672 writeModuleList(ol,nullptr,false);
4673
4675 ol.popGeneratorState();
4676 // 2.}
4677
4678 // ---------------
4679 // interactive group index for HTML
4680 // ---------------
4681 // 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:4539

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

2802{
2803 const ModuleDef *mod=md->getModuleDef();
2804 if (mod && prevModuleName!=mod->displayName())
2805 {
2806 ol.writeString(separator);
2807 // link to the member declaration in the module page
2808 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2809 mod->displayName());
2810 prevModuleName = mod->displayName();
2811 }
2812}
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 4593 of file index.cpp.

4598 {
4600 }
4601 if (isDir)
4602 {
4603 //ftv->incContentsDepth();
4604 writeClassTree(mod->getClasses(),nullptr,addToIndex,false,ClassDef::Class);
4605 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4606 writeModuleMembers(mod,addToIndex);
4607 //ftv->decContentsDepth();
4608 }
4609 if (addToIndex && isDir)
4610 {
4612 }
4613 ol.endIndexListItem();
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1849

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3908 of file index.cpp.

3913 ol.endTextBlock();
3914 if (dynamicMenus || disableIndex)
3915 {
3916 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3917 }
3918
3919 writeMemberList(ol,quickIndex,
3920 multiPageIndex ? letter : std::string(),
3921 index.isModuleIndexLetterUsed(hl),
3923 endFile(ol);
3924 first=false;
3925 }
3926 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3927 ol.popGeneratorState();
3928}
3929
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 3776 of file index.cpp.

3779{
3780 MmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
3781 const char *fname;
3782 DString title;
3783};
3784
3785static const MmhlInfo *getMmhlInfo(size_t hl)
3786{
3787 static MmhlInfo nmhlInfo[] =
3788 {
3789 MmhlInfo("modulemembers", theTranslator->trAll()),
3790 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3791 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3792 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3793 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3794 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3795 };
3796 return &nmhlInfo[hl];
3797}
3798
3799//----------------------------------------------------------------------------
3800
3803{
3804 const auto &index = Index::instance();
3805 if (index.numDocumentedModuleMembers(hl)==0) return;
3806
3807 bool disableIndex = Config_getBool(DISABLE_INDEX);
3808 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3809 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3810 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3811 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3812
3813 bool multiPageIndex=false;
3814 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3815 {
3816 multiPageIndex=true;
3817 }
3818
3819 ol.pushGeneratorState();
3821
3823 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3824 DString title = lne ? lne->title() : theTranslator->trModulesMembers();
3825 bool addToIndex = lne==nullptr || lne->visible();
3826
3827 if (addToIndex)
3828 {
3829 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,DString(),
3830 getMmhlInfo(hl)->fname,DString(),multiPageIndex,true);
3831 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3832 }
3833
3834 bool first=true;
3835 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3836 {
3837 DString fileName = getMmhlInfo(hl)->fname;
3838 if (multiPageIndex)
3839 {
3840 DString cs(letter);
3841 if (!first)
3842 {
3843 fileName+="_"+letterToLabel(cs);
3844 }
3845 if (addToIndex)
3846 {
3847 Doxygen::indexList->addContentsItem(false,cs,DString(),fileName,DString(),false,true);
3848 }
3849 }
3850
3851 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3852
3853 auto writeQuickLinks = [&,cap_letter=letter]()
3854 {
3856 if (!dynamicMenus)
3857 {
3859
3860 // index item for all namespace member lists
3865
3866 // index items per category member lists
3867 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3868 {
3869 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3870 {
3872 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3875 }
3876 }
3877
3879
3880 if (quickIndex)
3881 {
3882 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3883 getMmhlInfo(hl)->fname,multiPageIndex);
3884 }
3885
3886 ol.writeString("</div><!-- main-nav -->\n");
3887 }
3888 };
3889
3890 ol.startFile(fileName+extension,false,DString(),title);
3891 ol.startQuickIndices();
3892 if (!disableIndex && !quickLinksAfterSplitbar)
3893 {
3894 writeQuickLinks();
3895 }
3896 ol.endQuickIndices();
3897 ol.writeSplitBar(fileName,DString());
3898 if (quickLinksAfterSplitbar)
3899 {
3900 writeQuickLinks();
3901 if (!dynamicMenus)
3902 {
3903 ol.writeString("<div id=\"container\">\n");
Helper class representing a module member in the navigation menu.
Definition index.cpp:3754
const char * fname
Definition index.cpp:3756

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1849 of file index.cpp.

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

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

◆ writeModuleTreeNode()

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

Definition at line 4539 of file index.cpp.

4549 {
4551 }
4552 }
4553 ol.popGeneratorState();
4554 // 2.}
4555
4556 endFile(ol);
4557 ol.popGeneratorState();
4558 // 1.}
4559}
4560
4561
4562//----------------------------------------------------------------------------
4563
4564static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4565 FTVHelp* ftv, bool addToIndex)
4566{
4567 int visibleMembers = mod->countVisibleMembers();
4568 bool isDir=visibleMembers>0;
4569 if (addToIndex)
4570 {
4572 mod->getReference(),mod->getOutputFileBase(),DString(),isDir,true);
4573 }
4574 if (ftv)
4575 {
4576 ftv->addContentsItem(false,mod->name(),
4577 mod->getReference(),mod->getOutputFileBase(),DString(),
4578 false,false,mod);
4579 }
4580 ol.startIndexListItem();
4582 ol.generateDoc(mod->getDefFileName(),
4583 mod->getDefLine(),
4584 mod,
4585 nullptr,
4586 mod->qualifiedName(),
4587 DocOptions()
4588 .setSingleLine(true)
4589 .setAutolinkSupport(false));
virtual int countVisibleMembers() const =0

References Doxygen::indexList.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2061 of file index.cpp.

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

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

2789{
2790 const NamespaceDef *nd=md->getNamespaceDef();
2791 if (nd && prevNamespaceName!=nd->displayName())
2792 {
2793 ol.writeString(separator);
2795 nd->displayName());
2796 prevNamespaceName = nd->displayName();
2797 }
2798}

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

3725 {
3726 ol.writeString("<div id=\"container\">\n");
3727 ol.writeString("<div id=\"doc-content\">\n");
3728 }
3729 }
3730 ol.writeSearchInfo();
3731
3732 ol.startContents();
3733
3734 ol.startTextBlock();
3736 ol.endTextBlock();
3737
3738 writeMemberList(ol,quickIndex,
3739 multiPageIndex ? letter : std::string(),
3740 index.isNamespaceIndexLetterUsed(hl),
3742 endFile(ol);
3743 first=false;
3744 }
3745 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3746 ol.popGeneratorState();
3747}
3748
virtual DString trNamespaceMembersDescriptionTotal(NamespaceMemberHighlight::Enum hl)=0

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3599 of file index.cpp.

3601{
3602 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3603 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3604 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3605 static NmhlInfo nmhlInfo[] =
3606 {
3607 NmhlInfo("namespacemembers", theTranslator->trAll()),
3608 NmhlInfo("namespacemembers_func",
3609 fortranOpt ? theTranslator->trSubprograms() :
3610 vhdlOpt ? theTranslator->trFunctionAndProc() :
3612 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3613 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3614 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3615 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3616 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3617 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3618 };
3619 return &nmhlInfo[hl];
3620}
3621
3622//----------------------------------------------------------------------------
3623
3626{
3627 const auto &index = Index::instance();
3628 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3629
3630 bool disableIndex = Config_getBool(DISABLE_INDEX);
3631 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3632 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3633 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3634 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3635
3636 bool multiPageIndex=false;
3637 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3638 {
3639 multiPageIndex=true;
3640 }
3641
3642 ol.pushGeneratorState();
3644
3646 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3647 DString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3648 bool addToIndex = lne==nullptr || lne->visible();
3649
3650 if (addToIndex)
3651 {
3652 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,DString(),
3653 getNmhlInfo(hl)->fname,DString(),multiPageIndex,true);
3654 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3655 }
3656
3657 bool first=true;
3658 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3659 {
3660 DString fileName = getNmhlInfo(hl)->fname;
3661 if (multiPageIndex)
3662 {
3663 DString cs(letter);
3664 if (!first)
3665 {
3666 fileName+="_"+letterToLabel(cs);
3667 }
3668 if (addToIndex)
3669 {
3670 Doxygen::indexList->addContentsItem(false,cs,DString(),fileName,DString(),false,true);
3671 }
3672 }
3673
3674 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3675
3676 auto writeQuickLinks = [&,cap_letter=letter]()
3677 {
3679 if (!dynamicMenus)
3680 {
3682
3683 // index item for all namespace member lists
3688
3689 // index items per category member lists
3690 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3691 {
3692 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3693 {
3695 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,true,first);
3698 }
3699 }
3700
3702
3703 if (quickIndex)
3704 {
3705 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3706 getNmhlInfo(hl)->fname,multiPageIndex);
3707 }
3708
3709 ol.writeString("</div><!-- main-nav -->\n");
3710 }
3711 };
3712
3713 ol.startFile(fileName+extension,false,DString(),title);
3714 ol.startQuickIndices();
3715 if (!disableIndex && !quickLinksAfterSplitbar)
3716 {
3717 writeQuickLinks();
3718 }
3719 ol.endQuickIndices();
3720 ol.writeSplitBar(fileName,DString());
3721 if (quickLinksAfterSplitbar)
3722 {
virtual DString trNamespaceMembers()=0
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3599
@ NamespaceMembers
Definition index.h:79

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

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

1954{
1955 for (const auto &nd : nsLinkedMap)
1956 {
1957 if (nd->isVisibleInHierarchy())
1958 {
1959 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1960 }
1961 }
1962}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1880

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1940 of file index.cpp.

1942{
1943 for (const auto &nd : nsLinkedMap)
1944 {
1945 if (nd->isVisibleInHierarchy())
1946 {
1947 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1948 }
1949 }
1950}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1880 of file index.cpp.

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

4080 {
4082 }
4083 if (hasSections)
4084 {
4085 pd->addSectionsToIndex();
4086 }
4087 for (const auto &subPage : pd->getSubPages())
4088 {
4089 writePages(subPage,ftv);
4090 }
4091 if (hasSubPages && ftv) ftv->decContentsDepth();
4092 if (doIndent)
4093 {
4095 }
4096 //printf("end writePages()=%s\n",qPrint(pd->title()));
4097}
4098
4099//----------------------------------------------------------------------------
4100
4101static void writePageIndex(OutputList &ol)
4102{
4103 if (Index::instance().numIndexedPages()==0) return;
4104 ol.pushGeneratorState();
4106 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4107 DString title = lne ? lne->title() : theTranslator->trRelatedPages();
4108 startFile(ol,"pages",false,DString(),title,HighlightedItem::Pages);
4109 startTitle(ol,DString());
4110 ol.parseText(title);
4111 endTitle(ol,DString(),DString());
4112 ol.startContents();
4113 ol.startTextBlock();
virtual DString trRelatedPages()=0
virtual DString trRelatedPagesDescription()=0

◆ writePages()

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

Definition at line 4016 of file index.cpp.

4024{
4025 docPages=indexPages=0;
4026 for (const auto &pd : *Doxygen::pageLinkedMap)
4027 {
4028 if (pd->visibleInIndex() && !pd->hasParentPage())
4029 {
4030 indexPages++;
4031 }
4032 if (pd->documentedPage())
4033 {
4034 docPages++;
4035 }
4036 }
4037}
4038
4039//----------------------------------------------------------------------------
4040
4041static void writePages(PageDef *pd,FTVHelp *ftv,bool reuseRoot = false)
4042{
4043 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
4044 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4045 bool addToIndex = lne==nullptr || lne->visible();
4046 if (!addToIndex) return;
4047
4048 bool hasSubPages = pd->hasSubPages();
4049 bool hasSections = pd->hasSections();
4050
4051 if (pd->visibleInIndex())
4052 {
4053 DString pageTitle, pageTitleAsHtml;
4054
4055 if (pd->title().empty())
4056 pageTitle=pd->name();
4057 else
4058 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4059 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4060
4061 if (ftv)
4062 {
4063 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4064 ftv->addContentsItem(
4065 hasSubPages,pageTitle,
4066 pd->getReference(),pd->getOutputFileBase(),
4067 DString(),hasSubPages,true,pd,pageTitleAsHtml);
4068 }
4069 if (addToIndex && pd!=Doxygen::mainPage.get())
4070 {
4072 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 3125 of file index.cpp.

3128{
3129 bool first=true;
3130 startQuickIndexList(ol,true);
3131 for (const auto &[letter,list] : map)
3132 {
3133 DString ci(letter);
3134 DString is = letterToLabel(ci);
3135 DString anchor;
3137 if (!multiPage)
3138 anchor="#index_";
3139 else if (first)
3140 anchor=fullName+extension+"#index_";
3141 else
3142 anchor=fullName+"_"+is+extension+"#index_";
3143 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,true,first);
3144 ol.writeString(ci);
3146 first=false;
3147 }
3149 ol.writeString(R"js(
3150<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 1500 of file index.cpp.

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

4472{
4473 if (ftv)
4474 {
4475 ol.pushGeneratorState();
4477 }
4478 startIndexHierarchy(ol,0);
4479 for (const auto &gd : *Doxygen::groupLinkedMap)
4480 {
4481 if (gd->isVisibleInHierarchy())
4482 {
4483 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4484 }
4485 }
4486 endIndexHierarchy(ol,0);
4487 if (ftv)
4488 {
4489 ol.popGeneratorState();
4490 }
4491}
4492
4493//----------------------------------------------------------------------------
4494
4495static void writeTopicIndex(OutputList &ol)
4496{
4497 if (Index::instance().numDocumentedGroups()==0) return;
4498 ol.pushGeneratorState();
4499 // 1.{
4502 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4503 DString title = lne ? lne->title() : theTranslator->trTopics();
4504 bool addToIndex = lne==nullptr || lne->visible();
4505
4506 startFile(ol,"topics",false,DString(),title,HighlightedItem::Topics);
4507 startTitle(ol,DString());
4508 ol.parseText(title);
4509 endTitle(ol,DString(),DString());
4510 ol.startContents();
4511 ol.startTextBlock();
4513 ol.endTextBlock();
4514
4515 // ---------------
4516 // Normal group index for Latex/RTF
4517 // ---------------
4518 // 2.{
4519 ol.pushGeneratorState();
4522
4523 writeGroupHierarchy(ol,nullptr,false);
4524
4526 ol.popGeneratorState();
4527 // 2.}
4528
4529 // ---------------
4530 // interactive group index for HTML
4531 // ---------------
4532 // 2.{
4533 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:4446

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

4895 {
4896 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4897 }
4898 writeConceptRootList(&ftv,addToIndex);
4899 TextStream t;
4900 ftv.generateTreeViewInline(t);
4901 ol.writeString(t.str());
4902 if (addToIndex)
4903 {
4905 }
4906 }
4907 ol.popGeneratorState();
4908 // 2.}
4909
4910 endFile(ol);
4911 ol.popGeneratorState();
4912 // 1.}
4913}
4914
4915//----------------------------------------------------------------------------
4916
4918{
4919 if (lne->baseFile().startsWith("usergroup"))
4920 {
4921 ol.pushGeneratorState();
4923 startFile(ol,lne->baseFile(),false,DString(),lne->title(),HighlightedItem::UserGroup);
4924 startTitle(ol,DString());
bool startsWith(const char *s) const
Definition dstring.h:600
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4769
DString baseFile() const
Definition layout.h:217

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

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 351 of file index.cpp.