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:3423

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

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

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

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

4003 {
4004 ol.writeObjectLink(DString(),n,DString(),pd->name());
4005 if (addToIndex)
4006 {
4007 Doxygen::indexList->addContentsItem(false,pd->name(),pd->getReference(),n,DString(),false,true);
4008 }
4009 }
4010 ol.endItemListItem();
4011 //ol.writeString("\n");
4012 }
4013 ol.endItemList();
4014
4015 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 3200 of file index.cpp.

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

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3392 of file index.cpp.

3401 {
3403 }
3404
3405}
3406
3407//----------------------------------------------------------------------------
3408
3409/** Helper class representing a file member in the navigation menu. */
3410struct FmhlInfo
3411{
3412 FmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
3413 const char *fname;
Helper class representing a file member in the navigation menu.
Definition index.cpp:3386
DString title
Definition index.cpp:3389
FmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3387
const char * fname
Definition index.cpp:3388

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

3587 {
3589 }
3590
3591}
3592
3593//----------------------------------------------------------------------------
3594
3595/** Helper class representing a namespace member in the navigation menu. */
3596struct NmhlInfo
3597{
3598 NmhlInfo(const char *fn,const DString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3572
const char * fname
Definition index.cpp:3574
DString title
Definition index.cpp:3575
NmhlInfo(const char *fn, const DString &t)
Definition index.cpp:3573

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

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

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5814 of file index.cpp.

5824 {text:\"" << convertToJSString(ci) << "\",url:\""
5825 << convertToJSString(anchor+convertToId(is)) << "\"}";
5826 firstLetter=false;
5827 }
5828 t << "]";
5829 }
5830 t << "}";
5831 }
5832 }
5833 if (!firstMember)
5834 {
5835 t << "]";
5836 }
5837}
5838
5839static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5840{
5841 int count=0;
5842 for (const auto &entry : root->children())
5843 {
5844 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5845 }
5846 if (count>0) // at least one item is visible
5847 {
5848 bool firstChild = true;
5849 if (!first) t << ",";
5850 t << "children:[\n";
5851 for (const auto &entry : root->children())
5852 {
5853 if (entry->visible() && quickLinkVisible(entry->kind()))
5854 {
5855 if (!firstChild) t << ",\n";
5856 firstChild=false;
5857 DString url = entry->url();
5858 if (isURL(url)) url = "^" + url;
5859 t << "{text:\"" << convertToJSString(entry->titleAsHtml(),true) << "\",url:\""
5860 << convertToJSString(url) << "\"";
5861 bool hasChildren=false;
5862 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5863 {
5864 auto numDoc = [](std::size_t i) {
5866 };
5867 auto memList = [](std::size_t i) {
5869 };
5870 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5871 }
5872 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5873 {
5874 auto numDoc = [](std::size_t i) {
5876 };
5877 auto memList = [](std::size_t i) {
5879 };
5880 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5881 }
5882 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5883 {
5884 auto numDoc = [](std::size_t i) {
5886 };
5887 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:5814
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3763
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3578
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:4782
DString convertToId(const DString &s)
Definition util.cpp:3334

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:3158
int getPrefixIndex(const DString &name)
Definition util.cpp:2783
DString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition util.cpp:4765

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

3361 ol.endTextBlock();
3362 if (dynamicMenus || disableIndex)
3363 {
3364 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3365 }
3366
3367 writeMemberList(ol,quickIndex,
3368 multiPageIndex ? letter : std::string(),
3369 index.isClassIndexLetterUsed(hl),
3371 endFile(ol);
3372 first=false;
3373 }
3374
3375 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3376
3377 ol.popGeneratorState();
3378}
3379
3380static 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:3355
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3200
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, DString fullName, bool multiPage)
Definition index.cpp:3160
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 3222 of file index.cpp.

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

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

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

◆ writeConceptList()

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

Definition at line 4688 of file index.cpp.

4688 {
4689 if (addToIndex)
4690 {
4691 Doxygen::indexList->addContentsItem(true,title,DString(),"modules",DString(),true,true);
4693 }
4694 FTVHelp ftv(false);
4695 writeModuleList(ol,&ftv,addToIndex);
4696 TextStream t;
4698 ol.writeString(t.str());
4699 if (addToIndex)
4700 {
4702 }
4703 }
4704 ol.popGeneratorState();
4705 // 2.}
4706 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:889
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4596

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

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

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4711 of file index.cpp.

4714{
4715 for (const auto &cd : concepts)
4716 {
4717 if (cd->isLinkableInProject())
4718 {

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4721 of file index.cpp.

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

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

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

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

◆ writeFileMemberIndexFiltered()

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

Definition at line 3415 of file index.cpp.

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

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

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

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4449 of file index.cpp.

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

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

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

4932 : lne->children())
4933 {
4934 if (entry->visible()) count++;
4935 }
4936 if (count>0)
4937 {
4938 ol.writeString("<ul>\n");
4939 for (const auto &entry: lne->children())
4940 {
4941 if (entry->visible())
4942 {
4943 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4944 HtmlGenerator::fixSpaces(entry->title())+"</span></a></li>\n");
4945 }
4946 }
4947 ol.writeString("</ul>\n");
4948 }
4949 endFile(ol);
4950 ol.popGeneratorState();
4951 }
4952}
4953
4954//----------------------------------------------------------------------------
4955
4956
4957static void writeIndex(OutputList &ol)
4958{
4959 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4960 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4961 bool disableIndex = Config_getBool(DISABLE_INDEX);
4962 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4963 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4964 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4965 DString projectName = Config_getString(PROJECT_NAME);
4966 // save old generator state
4967 ol.pushGeneratorState();
4968
4969 DString projPrefix;
4970 if (!projectName.empty())
4971 {
4972 projPrefix=projectName+" ";
4973 }
4974
4975 //--------------------------------------------------------------------
4976 // write HTML index
4977 //--------------------------------------------------------------------
4979
4980 DString defFileName =
4981 Doxygen::mainPage ? Doxygen::mainPage->docFile() : DString("[generated]");
4982 int defLine =
4983 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4984
4985 DString title, titleAsHtml;
4986 if (!mainPageHasTitle())
4987 {
4988 title = theTranslator->trMainPage();
4989 }
4990 else if (Doxygen::mainPage)
4991 {
4992 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4993 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4994 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4995 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4996 }
4997
4998 DString indexName="index";
4999 ol.startFile(indexName,false,DString(),title);
5000
5002 {
5003 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
5004 bool hasTitle = !projectName.empty() && mainPageHasTitle() && dstricmp(title,projectName)!=0;
5005 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
5006 if (hasTitle) // to avoid duplicate entries in the treeview
5007 {
5009 title,
5010 DString(),
5011 indexName,
5012 DString(),
5013 hasSubs,
5014 true,
5015 nullptr,
5016 titleAsHtml);
5017 }
5018 if (hasSubs)
5019 {
5020 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
5021 }
5022 }
5023
5024 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
5025 ol.startQuickIndices();
5026 if (!disableIndex && !quickLinksAfterSplitbar)
5027 {
5029 }
5030 ol.endQuickIndices();
5031 ol.writeSplitBar(indexName,DString());
5032 if (quickLinksAfterSplitbar)
5033 {
5035 }
5036 ol.writeSearchInfo();
5037 bool headerWritten=false;
5039 {
5040 if (!Doxygen::mainPage->title().empty())
5041 {
5042 if (Doxygen::mainPage->title().lower() != "notitle")
5043 ol.startPageDoc(Doxygen::mainPage->title());
5044 else
5045 ol.startPageDoc("");
5046 }
5047 else
5048 ol.startPageDoc(projectName);
5049 }
5050 if (Doxygen::mainPage && !Doxygen::mainPage->title().empty())
5051 {
5052 if (Doxygen::mainPage->title().lower()!="notitle")
5053 {
5054 ol.startHeaderSection();
5055 ol.startTitleHead(DString());
5056 ol.generateDoc(Doxygen::mainPage->docFile(),
5057 Doxygen::mainPage->getStartBodyLine(),
5058 Doxygen::mainPage.get(),
5059 nullptr,
5060 Doxygen::mainPage->title(),
5061 DocOptions()
5062 .setSingleLine(true));
5063 headerWritten = true;
5064 }
5065 }
5066 else
5067 {
5068 if (!projectName.empty())
5069 {
5070 ol.startHeaderSection();
5071 ol.startTitleHead(DString());
5072 ol.parseText(theTranslator->trDocumentation(projectName));
5073 headerWritten = true;
5074 }
5075 }
5076 if (headerWritten)
5077 {
5079 ol.endHeaderSection();
5080 }
5081
5082 ol.startContents();
5083 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5084 {
5086 }
5087
5089 {
5090 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5091 {
5092 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5093 }
5094
5095 ol.startTextBlock();
5096 ol.generateDoc(defFileName,
5097 defLine,
5098 Doxygen::mainPage.get(),
5099 nullptr,
5100 Doxygen::mainPage->documentation(),
5101 DocOptions()
5102 .setIndexWords(true));
5103 ol.endTextBlock();
5104 ol.endPageDoc();
5105 }
5106
5109 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5111
5112 if (Doxygen::mainPage &&
5113 generateTreeView &&
5114 pageOutlinePanel &&
5115 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5116 Doxygen::mainPage->hasSections()
5117 )
5118 {
5119 ol.writeString("</div><!-- doc-content -->\n");
5120 ol.endContents();
5121 Doxygen::mainPage->writePageNavigation(ol);
5122 ol.writeString("</div><!-- container -->\n");
5123 endFile(ol,true,true);
5124 }
5125 else
5126 {
5127 endFile(ol);
5128 }
5129
5131
5132 //--------------------------------------------------------------------
5133 // write LaTeX/RTF index
5134 //--------------------------------------------------------------------
5138
5140 {
5141 msg("Generating main page...\n");
5142 Doxygen::mainPage->writeDocumentation(ol);
5143 }
5144
5145 ol.startFile("refman",false,DString(),DString());
5149
5150 if (projPrefix.empty())
5151 {
5153 }
5154 else
5155 {
5156 ol.parseText(projPrefix);
5157 }
5158
5159 if (!Config_getString(PROJECT_NUMBER).empty())
5160 {
5161 ol.startProjectNumber();
5162 ol.generateDoc(defFileName,
5163 defLine,
5164 Doxygen::mainPage.get(),
5165 nullptr,
5166 Config_getString(PROJECT_NUMBER),
5167 DocOptions());
5168 ol.endProjectNumber();
5169 }
5176
5177 ol.lastIndexPage();
5179 {
5182 }
5183 const auto &index = Index::instance();
5184 if (index.numDocumentedPages()>0)
5185 {
5188 }
5189
5191 if (!Config_getBool(LATEX_HIDE_INDICES))
5192 {
5193 //if (indexedPages>0)
5194 //{
5195 // ol.startIndexSection(isPageIndex);
5196 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5197 // ol.endIndexSection(isPageIndex);
5198 //}
5199 if (index.numDocumentedModules()>0)
5200 {
5202 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5204 }
5205 if (index.numDocumentedGroups()>0)
5206 {
5208 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5210 }
5211 if (index.numDocumentedDirs()>0)
5212 {
5216 }
5217 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5218 {
5219 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5220 if (lne)
5221 {
5223 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5225 }
5226 }
5227 if (index.numDocumentedConcepts()>0)
5228 {
5230 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5232 }
5233 if (index.numHierarchyInterfaces()>0)
5234 {
5236 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5238 }
5239 if (index.numHierarchyClasses()>0)
5240 {
5241 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5242 if (lne)
5243 {
5245 ol.parseText(/*projPrefix+*/
5246 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5247 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5249 ));
5251 }
5252 }
5253 if (index.numHierarchyExceptions()>0)
5254 {
5256 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5258 }
5259 if (index.numAnnotatedInterfacesPrinted()>0)
5260 {
5262 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5264 }
5265 if (index.numAnnotatedClassesPrinted()>0)
5266 {
5268 ol.parseText(/*projPrefix+*/
5269 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5270 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5272 ));
5274 }
5275 if (index.numAnnotatedStructsPrinted()>0)
5276 {
5278 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5280 }
5281 if (index.numAnnotatedRecordsPrinted()>0)
5282 {
5284 ol.parseText(/*projPrefix+*/theTranslator->trRecordIndex());
5286 }
5287 if (index.numAnnotatedExceptionsPrinted()>0)
5288 {
5290 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5292 }
5293 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5294 {
5296 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5298 }
5299 }
5301
5302 if (index.numDocumentedModules()>0)
5303 {
5305 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5307 }
5308 if (index.numDocumentedGroups()>0)
5309 {
5311 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5313 }
5314 if (index.numDocumentedDirs()>0)
5315 {
5317 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5319 }
5320 if (index.numDocumentedNamespaces()>0)
5321 {
5325 }
5326 if (index.numDocumentedConcepts()>0)
5327 {
5329 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5331 }
5332 if (index.numAnnotatedInterfacesPrinted()>0)
5333 {
5335 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5337 }
5338 if (index.numAnnotatedClassesPrinted()>0)
5339 {
5343 }
5344 if (index.numAnnotatedStructsPrinted()>0)
5345 {
5347 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5349 }
5350 if (index.numAnnotatedRecordsPrinted()>0)
5351 {
5353 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:4932
@ 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:5095
void addHtmlExtensionIfMissing(DString &fName)
Definition util.cpp:4063

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5905 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5357 of file index.cpp.

5357 {
5359 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5361 }
5362 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5363 {
5365 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5367 }
5368 if (!Doxygen::exampleLinkedMap->empty())
5369 {
5371 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5373 }
5375 endFile(ol);
5376
5377 ol.popGeneratorState();
5378}
5379
5380static std::vector<bool> indexWritten;
5381
5382static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5383{
5384 auto isRef = [](const DString &s)
5385 {
5386 return s.startsWith("@ref") || s.startsWith("\\ref");
5387 };
5388 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5389 const auto &index = Index::instance();
5390 for (const auto &lne : entries)
5391 {
5392 LayoutNavEntry::Kind kind = lne->kind();
5393 size_t idx = static_cast<size_t>(kind);
5394 if (idx>=indexWritten.size())
5395 {
5396 size_t oldSize = indexWritten.size();
5397 size_t newSize = idx+1;
5398 indexWritten.resize(newSize);
5399 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=false;
5400 }
5401 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5402 bool addToIndex=lne->visible();
5403 bool needsClosing=false;
5404 if (!indexWritten.at(idx))
5405 {
5406 switch(kind)
5407 {
5408 case LayoutNavEntry::MainPage:
5409 msg("Generating index page...\n");
5410 writeIndex(ol);
5411 break;
5412 case LayoutNavEntry::Pages:
5413 msg("Generating page index...\n");
5414 writePageIndex(ol);
5415 break;
5416 case LayoutNavEntry::Topics:
5417 msg("Generating topic index...\n");
5418 writeTopicIndex(ol);
5419 break;
5420 case LayoutNavEntry::Modules:
5421 {
5422 if (index.numDocumentedModules()>0 && addToIndex)
5423 {
5424 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5426 needsClosing=true;
5427 }
5428 }
5429 break;
5430 case LayoutNavEntry::ModuleList:
5431 msg("Generating module index...\n");
5432 writeModuleIndex(ol);
5433 break;
5434 case LayoutNavEntry::ModuleMembers:
5435 msg("Generating module member index...\n");
5437 break;
5438 case LayoutNavEntry::Namespaces:
5439 {
5440 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5441 if (showNamespaces)
5442 {
5443 if (index.numDocumentedNamespaces()>0 && addToIndex)
5444 {
5445 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5447 needsClosing=true;
5448 }
5449 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5450 {
5451 msg("Generating namespace index...\n");
5453 }
5454 }
5455 }
5456 break;
5457 case LayoutNavEntry::NamespaceList:
5458 {
5459 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5460 if (showNamespaces)
5461 {
5462 msg("Generating namespace index...\n");
5464 }
5465 }
5466 break;
5467 case LayoutNavEntry::NamespaceMembers:
5468 msg("Generating namespace member index...\n");
5470 break;
5471 case LayoutNavEntry::Classes:
5472 if (index.numAnnotatedClasses()>0 && addToIndex)
5473 {
5474 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5476 needsClosing=true;
5477 }
5478 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5479 {
5480 msg("Generating annotated compound index...\n");
5482 }
5483 break;
5484 case LayoutNavEntry::Concepts:
5485 msg("Generating concept index...\n");
5487 break;
5488 case LayoutNavEntry::ClassList:
5489 msg("Generating annotated compound index...\n");
5491 break;
5492 case LayoutNavEntry::ClassIndex:
5493 msg("Generating alphabetical compound index...\n");
5495 break;
5496 case LayoutNavEntry::ClassHierarchy:
5497 msg("Generating hierarchical class index...\n");
5499 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5500 {
5501 msg("Generating graphical class hierarchy...\n");
5503 }
5504 break;
5505 case LayoutNavEntry::ClassMembers:
5506 if (!sliceOpt)
5507 {
5508 msg("Generating member index...\n");
5510 }
5511 break;
5512 case LayoutNavEntry::Interfaces:
5513 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5514 {
5515 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5517 needsClosing=true;
5518 }
5519 break;
5520 case LayoutNavEntry::InterfaceList:
5521 if (sliceOpt)
5522 {
5523 msg("Generating annotated interface index...\n");
5525 }
5526 break;
5527 case LayoutNavEntry::InterfaceIndex:
5528 if (sliceOpt)
5529 {
5530 msg("Generating alphabetical interface index...\n");
5532 }
5533 break;
5534 case LayoutNavEntry::InterfaceHierarchy:
5535 if (sliceOpt)
5536 {
5537 msg("Generating hierarchical interface index...\n");
5539 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5540 {
5541 msg("Generating graphical interface hierarchy...\n");
5543 }
5544 }
5545 break;
5546 case LayoutNavEntry::Structs:
5547 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5548 {
5549 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5551 needsClosing=true;
5552 }
5553 break;
5554 case LayoutNavEntry::StructList:
5555 if (sliceOpt)
5556 {
5557 msg("Generating annotated struct index...\n");
5559 }
5560 break;
5561 case LayoutNavEntry::StructIndex:
5562 if (sliceOpt)
5563 {
5564 msg("Generating alphabetical struct index...\n");
5566 }
5567 break;
5568 case LayoutNavEntry::Records:
5569 if (sliceOpt && index.numAnnotatedRecords()>0 && addToIndex)
5570 {
5571 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5573 needsClosing=true;
5574 }
5575 break;
5576 case LayoutNavEntry::RecordList:
5577 if (sliceOpt)
5578 {
5579 msg("Generating annotated record index...\n");
5581 }
5582 break;
5583 case LayoutNavEntry::RecordIndex:
5584 if (sliceOpt)
5585 {
5586 msg("Generating alphabetical record index...\n");
5588 }
5589 break;
5590 case LayoutNavEntry::Exceptions:
5591 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5592 {
5593 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5595 needsClosing=true;
5596 }
5597 break;
5598 case LayoutNavEntry::ExceptionList:
5599 if (sliceOpt)
5600 {
5601 msg("Generating annotated exception index...\n");
5603 }
5604 break;
5605 case LayoutNavEntry::ExceptionIndex:
5606 if (sliceOpt)
5607 {
5608 msg("Generating alphabetical exception index...\n");
5610 }
5611 break;
5612 case LayoutNavEntry::ExceptionHierarchy:
5613 if (sliceOpt)
5614 {
5615 msg("Generating hierarchical exception index...\n");
5617 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5618 {
5619 msg("Generating graphical exception hierarchy...\n");
5621 }
5622 }
5623 break;
5624 case LayoutNavEntry::Files:
5625 {
5626 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5627 {
5628 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString());
5630 needsClosing=true;
5631 }
5632 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5633 {
5634 msg("Generating file index...\n");
5635 writeFileIndex(ol);
5636 }
5637 }
5638 break;
5639 case LayoutNavEntry::FileList:
5640 msg("Generating file index...\n");
5641 writeFileIndex(ol);
5642 break;
5643 case LayoutNavEntry::FileGlobals:
5644 msg("Generating file member index...\n");
5646 break;
5647 case LayoutNavEntry::Examples:
5648 msg("Generating example index...\n");
5650 break;
5651 case LayoutNavEntry::User:
5652 if (addToIndex)
5653 {
5654 // prepend a ! or ^ marker to the URL to avoid tampering with it
5655 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5656 bool isRelative=url.at(0)=='!';
5657 if (!url.empty() && !isRelative) // absolute URL
5658 {
5659 url.prepend("^"); // prepend ^ to absolute URL
5660 }
5661 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5662 url,DString(),false,isRef(lne->baseFile()) || isRelative,
5663 nullptr,lne->titleAsHtml());
5664 }
5665 break;
5666 case LayoutNavEntry::UserGroup:
5667 if (addToIndex)
5668 {
5669 DString url = correctURL(lne->url(),"!"); // add ! to relative URL
5670 if (!url.empty())
5671 {
5672 if (url=="!") // result of a "[none]" url
5673 {
5674 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),DString(),DString(),false,false);
5675 }
5676 else
5677 {
5678 bool isRelative=url.at(0)=='!';
5679 if (!isRelative) // absolute URL
5680 {
5681 url.prepend("^"); // prepend ^ to absolute URL
5682 }
5683 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),
5684 url,DString(),false,isRef(lne->baseFile()) || isRelative);
5685 }
5686 }
5687 else
5688 {
5689 Doxygen::indexList->addContentsItem(true,lne->title(),DString(),lne->baseFile(),DString(),true,true);
5690 }
5692 needsClosing=true;
5693 }
5694 writeUserGroupStubPage(ol,lne.get());
5695 break;
5696 case LayoutNavEntry::None:
5697 ASSERT(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5698 break;
5699 }
5700 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5701 {
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:5357
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:5355
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:4079
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:4895
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4473
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3911
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:4620
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1373
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3727
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1161
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3543
@ 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:4795

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

3163 {
3164 var item = navItems[i];
3165 var link = item.querySelector('a');
3166 item.classList.remove('current');
3167 if (link && link.getAttribute('href') === currentHash) {
3168 item.classList.add('current');
3169 }
3170 }
3171
3172 if (currentHash) {
3173 var target = document.querySelector(currentHash);
3174 if (target) {
3175 target.scrollIntoView();
3176 }
3177 }
3178}
3179updateNavHighlight();
3180window.addEventListener('hashchange', updateNavHighlight);
3181</script>
3182 )js");
3183}
3184
3185static void writeMemberIndex(OutputList &ol,
3186 const Index::MemberIndexMap &map, DString fullName,bool multiPage)
3187{
3188 bool first=true;

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 if ((prevName.empty() ||
2893 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2894 !useSections) // new letter
2895 {
2896 DString cs = letterToLabel(letter);
2897 DString anchor = "index_"+convertToId(cs);
2898 ol.writeString("<a id=\"" + anchor + "\"/>");
2899 }
2900 firstItem=false;
2901 ol.docify(name);
2902 if (isFunc) ol.docify("()");
2903 //ol.writeString("\n");
2904
2905 // link to class
2906 prevDefName="";
2907 sep = "&#160;:&#160;";
2908 prevName = name.data()+startIndex;
2909 }
2910 else // same entry
2911 {
2912 sep = ", ";
2913 // link to class for other members with the same name
2914 }
2915 if (index<numIndices)
2916 {
2917 // write the link for the specific list type
2918 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2919 }
2920 }
2921 if (!page.empty())
2922 {
2923 break;
2924 }
2925 }
2926 if (!firstItem) ol.endItemListItem();
2927 ol.endItemList();
2928}
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(), writeNamespaceLinkForMember(), and OutputList::writeString().

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

5893 {
5894 auto numDoc = [](std::size_t i) {
5896 };
5897 auto memList = [](std::size_t i) {
5899 };
5900 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5901 }
5902 else // recursive into child list
5903 {
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 4620 of file index.cpp.

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

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

4601 {
4603 }
4604 if (isDir)
4605 {
4606 //ftv->incContentsDepth();
4607 writeClassTree(mod->getClasses(),nullptr,addToIndex,false,ClassDef::Class);
4608 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4609 writeModuleMembers(mod,addToIndex);
4610 //ftv->decContentsDepth();
4611 }
4612 if (addToIndex && isDir)
4613 {
4615 }
4616 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 3911 of file index.cpp.

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

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

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

4552 {
4554 }
4555 }
4556 ol.popGeneratorState();
4557 // 2.}
4558
4559 endFile(ol);
4560 ol.popGeneratorState();
4561 // 1.}
4562}
4563
4564
4565//----------------------------------------------------------------------------
4566
4567static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4568 FTVHelp* ftv, bool addToIndex)
4569{
4570 int visibleMembers = mod->countVisibleMembers();
4571 bool isDir=visibleMembers>0;
4572 if (addToIndex)
4573 {
4575 mod->getReference(),mod->getOutputFileBase(),DString(),isDir,true);
4576 }
4577 if (ftv)
4578 {
4579 ftv->addContentsItem(false,mod->name(),
4580 mod->getReference(),mod->getOutputFileBase(),DString(),
4581 false,false,mod);
4582 }
4583 ol.startIndexListItem();
4585 ol.generateDoc(mod->getDefFileName(),
4586 mod->getDefLine(),
4587 mod,
4588 nullptr,
4589 mod->qualifiedName(),
4590 DocOptions()
4591 .setSingleLine(true)
4592 .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 3727 of file index.cpp.

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

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3602 of file index.cpp.

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

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

◆ writePages()

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

Definition at line 4019 of file index.cpp.

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

3136{
3137 bool first=true;
3138 startQuickIndexList(ol,true);
3139 for (const auto &[letter,list] : map)
3140 {
3141 DString ci(letter);
3142 DString is = letterToLabel(ci);
3143 DString anchor;
3145 if (!multiPage)
3146 anchor="#index_";
3147 else if (first)
3148 anchor=fullName+extension+"#index_";
3149 else
3150 anchor=fullName+"_"+is+extension+"#index_";
3151 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,true,first);
3152 ol.writeString(ci);
3154 first=false;
3155 }
3157 ol.writeString(R"js(
3158<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 4473 of file index.cpp.

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

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

4898 {
4899 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4900 }
4901 writeConceptRootList(&ftv,addToIndex);
4902 TextStream t;
4903 ftv.generateTreeViewInline(t);
4904 ol.writeString(t.str());
4905 if (addToIndex)
4906 {
4908 }
4909 }
4910 ol.popGeneratorState();
4911 // 2.}
4912
4913 endFile(ol);
4914 ol.popGeneratorState();
4915 // 1.}
4916}
4917
4918//----------------------------------------------------------------------------
4919
4921{
4922 if (lne->baseFile().startsWith("usergroup"))
4923 {
4924 ol.pushGeneratorState();
4926 startFile(ol,lne->baseFile(),false,DString(),lne->title(),HighlightedItem::UserGroup);
4927 startTitle(ol,DString());
bool startsWith(const char *s) const
Definition dstring.h:600
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4772
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 5355 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 351 of file index.cpp.