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

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

#include <cstdlib>
#include <array>
#include <assert.h>
#include "message.h"
#include "index.h"
#include "indexlist.h"
#include "doxygen.h"
#include "config.h"
#include "filedef.h"
#include "outputlist.h"
#include "util.h"
#include "groupdef.h"
#include "language.h"
#include "htmlgen.h"
#include "htmlhelp.h"
#include "ftvhelp.h"
#include "dot.h"
#include "dotgfxhierarchytable.h"
#include "dotlegendgraph.h"
#include "pagedef.h"
#include "dirdef.h"
#include "vhdldocgen.h"
#include "layout.h"
#include "memberlist.h"
#include "classlist.h"
#include "namespacedef.h"
#include "filename.h"
#include "tooltip.h"
#include "utf8.h"
#include "portable.h"
#include "moduledef.h"
#include "sitemap.h"
Include dependency graph for index.cpp:

Go to the source code of this file.

Classes

struct  Index::Private
struct  AnnotatedIndexContext
struct  CmhlInfo
 Helper class representing a class member in the navigation menu. More...
struct  FmhlInfo
 Helper class representing a file member in the navigation menu. More...
struct  NmhlInfo
 Helper class representing a namespace member in the navigation menu. More...
struct  MmhlInfo
 Helper class representing a module member in the navigation menu. More...

Macros

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200
#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Typedefs

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

Functions

static int countClassHierarchy (ClassDef::CompoundType ct)
static void countFiles (int &htmlFiles, int &files)
static int countGroups ()
static int countDirs ()
static int countNamespaces ()
static int countConcepts ()
static int countAnnotatedClasses (int *cp, ClassDef::CompoundType ct)
static void countRelatedPages (int &docPages, int &indexPages)
static void MemberIndexMap_add (Index::MemberIndexMap &map, const std::string &letter, const MemberDef *md)
static void startIndexHierarchy (OutputList &ol, int level)
static void endIndexHierarchy (OutputList &ol, int level)
static void startQuickIndexList (OutputList &ol, bool letterTabs=FALSE)
static void endQuickIndexList (OutputList &ol)
static void startQuickIndexItem (OutputList &ol, const QCString &l, bool hl, bool, bool &first)
static void endQuickIndexItem (OutputList &ol)
void startTitle (OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
void endTitle (OutputList &ol, const QCString &fileName, const QCString &name)
void startFile (OutputList &ol, const QCString &name, bool isSource, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel, const QCString &allMembersFile)
void endFile (OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &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 QCString &name, const QCString &anchor, bool addToIndex=TRUE, bool preventSeparateIndex=FALSE, const ConceptLinkedRefMap *concepts=nullptr)
static void writeClassTreeToOutput (OutputList &ol, const BaseClassList &bcl, int level, FTVHelp *ftv, bool addToIndex, ClassDefSet &visitedClasses)
static bool dirHasVisibleChildren (const DirDef *dd)
static void writeDirTreeNode (OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
static void writeDirHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeClassTreeForList (OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
static void writeClassHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
static int countClassesInTreeList (const ClassLinkedMap &cl, ClassDef::CompoundType ct)
static void writeHierarchicalIndex (OutputList &ol)
static void writeGraphicalClassHierarchy (OutputList &ol)
static void writeHierarchicalInterfaceIndex (OutputList &ol)
static void writeGraphicalInterfaceHierarchy (OutputList &ol)
static void writeHierarchicalExceptionIndex (OutputList &ol)
static void writeGraphicalExceptionHierarchy (OutputList &ol)
static void writeSingleFileIndex (OutputList &ol, const FileDef *fd)
static void writeDirIndex (OutputList &ol)
static void writeFileIndex (OutputList &ol)
template<typename Ptr>
const ClassDefget_pointer (const Ptr &p)
template<>
const ClassDefget_pointer (const ClassLinkedMap::Ptr &p)
template<>
const ClassDefget_pointer (const ClassLinkedRefMap::Ptr &p)
template<class ListType>
static void writeClassTree (const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
static void writeNamespaceMembers (const NamespaceDef *nd, bool addToIndex)
static void writeModuleMembers (const ModuleDef *mod, bool addToIndex)
static void writeConceptList (const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
static void writeNamespaceTree (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeNamespaceTreeElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeNamespaceTree (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeClassTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeClassTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeClassTreeInsideNamespace (const NamespaceLinkedMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
static void writeNamespaceIndex (OutputList &ol)
static void writeAnnotatedClassList (OutputList &ol, ClassDef::CompoundType ct)
bool isId1 (int c)
static QCString letterToLabel (const QCString &startLetter)
static void writeAlphabeticalClassList (OutputList &ol, ClassDef::CompoundType ct, int)
static void writeAlphabeticalIndex (OutputList &ol)
static void writeAlphabeticalInterfaceIndex (OutputList &ol)
static void writeAlphabeticalStructIndex (OutputList &ol)
static void writeAlphabeticalExceptionIndex (OutputList &ol)
static void writeAnnotatedIndexGeneric (OutputList &ol, const AnnotatedIndexContext ctx)
static void writeAnnotatedIndex (OutputList &ol)
static void writeAnnotatedInterfaceIndex (OutputList &ol)
static void writeAnnotatedStructIndex (OutputList &ol)
static void writeAnnotatedExceptionIndex (OutputList &ol)
static void writeClassLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
static void writeFileLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
static void writeNamespaceLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
static void writeModuleLinkForMember (OutputList &ol, const MemberDef *md, const QCString &separator, QCString &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, QCString fullName, bool multiPage)
static void writeMemberIndex (OutputList &ol, const Index::MemberIndexMap &map, QCString fullName, bool multiPage)
static const CmhlInfogetCmhlInfo (size_t hl)
static void writeClassMemberIndexFiltered (OutputList &ol, ClassMemberHighlight::Enum hl)
static void writeClassMemberIndex (OutputList &ol)
static const FmhlInfogetFmhlInfo (size_t hl)
static void writeFileMemberIndexFiltered (OutputList &ol, FileMemberHighlight::Enum hl)
static void writeFileMemberIndex (OutputList &ol)
static const NmhlInfogetNmhlInfo (size_t hl)
static void writeNamespaceMemberIndexFiltered (OutputList &ol, NamespaceMemberHighlight::Enum hl)
static void writeNamespaceMemberIndex (OutputList &ol)
static const MmhlInfogetMmhlInfo (size_t hl)
static void writeModuleMemberIndexFiltered (OutputList &ol, ModuleMemberHighlight::Enum hl)
static void writeModuleMemberIndex (OutputList &ol)
static void writeExampleIndex (OutputList &ol)
static void writePages (PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
static void writePageIndex (OutputList &ol)
void writeGraphInfo (OutputList &ol)
static void writeGroupTreeNode (OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
static void writeGroupHierarchy (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeTopicIndex (OutputList &ol)
static void writeModuleTreeNode (OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
static void writeModuleList (OutputList &ol, FTVHelp *ftv, bool addToIndex)
static void writeModuleIndex (OutputList &ol)
static void writeConceptTreeInsideNamespaceElement (const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptTreeInsideNamespace (const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
static void writeConceptRootList (FTVHelp *ftv, bool addToIndex)
static void writeConceptIndex (OutputList &ol)
static void writeUserGroupStubPage (OutputList &ol, LayoutNavEntry *lne)
static void writeIndex (OutputList &ol)
static void writeIndexHierarchyEntries (OutputList &ol, const LayoutNavEntryList &entries)
static bool quickLinkVisible (LayoutNavEntry::Kind kind)
template<class T>
void renderMemberIndicesAsJs (std::ostream &t, std::function< std::size_t(std::size_t)> numDocumented, std::function< Index::MemberIndexMap(std::size_t)> getMemberList, const T *(*getInfo)(size_t hl), std::size_t total)
static bool renderQuickLinksAsJs (std::ostream &t, LayoutNavEntry *root, bool first)
static void writeMenuData ()
void writeIndexHierarchy (OutputList &ol)

Variables

constexpr auto alphaSepar = "<div class=\"alphasepar\"></div>"
const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX
static std::vector< bool > indexWritten

Detailed Description

This file contains functions for the various index pages.

Definition in file index.cpp.

Macro Definition Documentation

◆ MAX_ITEMS_BEFORE_MULTIPAGE_INDEX

#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX   200

Definition at line 55 of file index.cpp.

◆ MAX_ITEMS_BEFORE_QUICK_INDEX

#define MAX_ITEMS_BEFORE_QUICK_INDEX   30

Definition at line 56 of file index.cpp.

Typedef Documentation

◆ UsedIndexLetters

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

Definition at line 2286 of file index.cpp.

Function Documentation

◆ addMembersToIndex()

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

Definition at line 533 of file index.cpp.

538{
539 int numClasses=0;
540 for (const auto &cd : def->getClasses())
541 {
542 if (cd->isLinkable()) numClasses++;
543 }
544 int numConcepts=0;
545 if (concepts)
546 {
547 for (const auto &cd : *concepts)
548 {
549 if (cd->isLinkable()) numConcepts++;
550 }
551 }
552 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
553 Doxygen::indexList->addContentsItem(hasMembers,name,
554 def->getReference(),def->getOutputFileBase(),anchor,
555 hasMembers && !preventSeparateIndex,
556 addToIndex,
557 def,
558 convertToHtml(name));
559 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
560 if (hasMembers || numClasses>0 || numConcepts>0)
561 {
562 Doxygen::indexList->incContentsDepth();
563 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
564 {
565 auto kind = lde->kind();
566 if (kind==LayoutDocEntry::MemberDef)
567 {
568 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
569 if (lmd)
570 {
571 MemberList *ml = def->getMemberList(lmd->type);
572 if (ml)
573 {
574 for (const auto &md : *ml)
575 {
576 if (md->visibleInIndex())
577 {
578 writeMemberToIndex(def,md,addToIndex);
579 }
580 }
581 }
582 }
583 }
584 else if (kind==LayoutDocEntry::NamespaceClasses ||
585 kind==LayoutDocEntry::FileClasses ||
586 kind==LayoutDocEntry::ClassNestedClasses ||
587 kind==LayoutDocEntry::ModuleClasses
588 )
589 {
590 for (const auto &cd : def->getClasses())
591 {
592 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
593 {
594 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
595 bool isNestedClass = def->definitionType()==Definition::TypeClass;
596 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
597 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
598 preventSeparateIndex || cd->isEmbeddedInOuterScope());
599 }
600 }
601 }
602 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
603 {
604 for (const auto &cd : *concepts)
605 {
606 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
607 {
608 Doxygen::indexList->addContentsItem(false,cd->displayName(),
609 cd->getReference(),cd->getOutputFileBase(),QCString(),
610 addToIndex,
611 false,
612 cd);
613 }
614 }
615 }
616 }
617
618 Doxygen::indexList->decContentsDepth();
619 }
620}
static IndexList * indexList
Definition doxygen.h:132
static LayoutDocManager & instance()
Returns a reference to this singleton.
Definition layout.cpp:1437
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:125
This is an alternative implementation of QCString.
Definition qcstring.h:103
#define Config_getBool(name)
Definition config.h:33
static void addMembersToIndex()
Definition doxygen.cpp:8035
static void writeMemberToIndex(const Definition *def, const MemberDef *md, bool addToIndex)
Definition index.cpp:470
Represents of a member definition list with configurable title.
Definition layout.h:132
MemberListType type
Definition layout.h:137
QCString convertToHtml(const QCString &s, bool keepEntities)
Definition util.cpp:3988

References addMembersToIndex(), Config_getBool, convertToHtml(), FALSE, Doxygen::indexList, LayoutDocManager::instance(), TRUE, LayoutDocEntryMemberDef::type, Definition::TypeClass, Definition::TypeGroup, and writeMemberToIndex().

◆ countAnnotatedClasses()

int countAnnotatedClasses ( int * cp,
ClassDef::CompoundType ct )
static

Definition at line 2159 of file index.cpp.

2160{
2161 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2162 int count=0;
2163 int countPrinted=0;
2164 for (const auto &cd : *Doxygen::classLinkedMap)
2165 {
2166 if (sliceOpt && cd->compoundType() != ct)
2167 {
2168 continue;
2169 }
2170 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2171 {
2172 if (!cd->isEmbeddedInOuterScope())
2173 {
2174 countPrinted++;
2175 }
2176 count++;
2177 }
2178 }
2179 *cp = countPrinted;
2180 return count;
2181}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:95

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1128 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1152 of file index.cpp.

1153{
1154 int count=0;
1157 return count;
1158}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:96
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1128

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1743 of file index.cpp.

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

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4092 of file index.cpp.

4102{
4103 int count=0;

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1479 of file index.cpp.

1480{
1481 allFiles=0;
1482 docFiles=0;
1483 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1484 {
1485 for (const auto &fd: *fn)
1486 {
1487 bool src = false;
1488 bool doc = fileVisibleInIndex(fd.get(),src);
1489 if (doc || src)
1490 {
1491 allFiles++;
1492 }
1493 if (doc)
1494 {
1495 docFiles++;
1496 }
1497 }
1498 }
1499}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:104
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:6111

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4076 of file index.cpp.

4078 {
4079 if ((pd->getOuterScope()==nullptr ||
4080 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4081 pd->visibleInIndex()
4082 )
4083 {
4084 writePages(pd.get(),&ftv);
4085 }
4086 }
4087 TextStream t;
4088 ftv.generateTreeViewInline(t);
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:99
Text streaming class that buffers data.
Definition textstream.h:36
static void writePages(PageDef *pd, FTVHelp *ftv, bool reuseRoot=false)
Definition index.cpp:3974

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

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1732 of file index.cpp.

1733{
1734 int count=0;
1735 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1736 {
1737 if (nd->isLinkableInProject()) count++;
1738 }
1739 return count;
1740}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115

References Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3956 of file index.cpp.

3958 {
3959 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3960 if (addToIndex)
3961 {
3962 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3963 }
3964 }
3965 ol.endItemListItem();
3966 //ol.writeString("\n");
3967 }
3968 ol.endItemList();
3969
3970 if (addToIndex)
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 742 of file index.cpp.

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

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

Referenced by dirHasVisibleChildren(), and writeDirTreeNode().

◆ endFile()

void endFile ( OutputList & ol,
bool skipNavIndex,
bool skipEndContents,
const QCString & navPath )

Definition at line 429 of file index.cpp.

431{
432 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
435 if (!skipNavIndex)
436 {
437 if (!skipEndContents) ol.endContents();
438 if (generateTreeView)
439 {
440 ol.writeString("</div><!-- doc-content -->\n");
441 ol.writeString("</div><!-- container -->\n");
442 }
443 }
444
445 ol.writeFooter(navPath); // write the footer
447 ol.endFile();
448}
void writeString(const QCString &text)
Definition outputlist.h:411
void endContents()
Definition outputlist.h:620
void endFile()
Definition outputlist.h:401
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void writeFooter(const QCString &navPath)
Definition outputlist.h:399

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

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

◆ endFileWithNavPath()

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

Definition at line 450 of file index.cpp.

451{
452 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
453 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
454 QCString navPath;
455 if (generateTreeview)
456 {
459 ol.writeString("</div><!-- doc-content -->\n");
460 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
461 ol.writeString("</div><!-- container -->\n");
463 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
464 }
465 endFile(ol,generateTreeview,TRUE,navPath);
466}
virtual QCString navigationPathAsString() const =0
virtual void writePageNavigation(OutputList &) const =0
Definition * toDefinition(DefinitionMutable *dm)
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:429

References Config_getBool, OutputList::disableAllBut(), endFile(), Html, Definition::navigationPathAsString(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), toDefinition(), TRUE, 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 379 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

Definition at line 360 of file index.cpp.

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

References OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1756 of file index.cpp.

1756{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1757 of file index.cpp.

1757{ 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 3155 of file index.cpp.

3174{
3175 CmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a class member in the navigation menu.
Definition index.cpp:3149

References alphaSepar.

Referenced by writeClassMemberIndex().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3347 of file index.cpp.

3356 {
3357 Doxygen::indexList->decContentsDepth();
3358 }
3359
3360}
3361
3362//----------------------------------------------------------------------------
3363
3364/** Helper class representing a file member in the navigation menu. */
3365struct FmhlInfo
3366{
3367 FmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
3368 const char *fname;
Helper class representing a file member in the navigation menu.
Definition index.cpp:3341
FmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3342
const char * fname
Definition index.cpp:3343
QCString title
Definition index.cpp:3344

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

3542 {
3543 Doxygen::indexList->decContentsDepth();
3544 }
3545
3546}
3547
3548//----------------------------------------------------------------------------
3549
3550/** Helper class representing a namespace member in the navigation menu. */
3551struct NmhlInfo
3552{
3553 NmhlInfo(const char *fn,const QCString &t) : fname(fn), title(t) {}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3527
const char * fname
Definition index.cpp:3529
QCString title
Definition index.cpp:3530
NmhlInfo(const char *fn, const QCString &t)
Definition index.cpp:3528

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

2256{
2257 return (c<127 && c>31); // printable ASCII character
2258}

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2260 of file index.cpp.

2261{
2262 if (startLetter.isEmpty()) return startLetter;
2263 const char *p = startLetter.data();
2264 char c = *p;
2265 QCString result;
2266 if (isId1(c))
2267 {
2268 result+=c;
2269 }
2270 else
2271 {
2272 result="0x";
2273 const char hex[]="0123456789abcdef";
2274 while ((c=*p++))
2275 {
2276 result+=hex[static_cast<unsigned char>(c)>>4];
2277 result+=hex[static_cast<unsigned char>(c)&0xf];
2278 }
2279 }
2280 return result;
2281}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:167
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:176
static constexpr auto hex
bool isId1(int c)
Definition index.cpp:2255

References QCString::data(), hex, QCString::isEmpty(), 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 182 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5623 of file index.cpp.

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

◆ renderMemberIndicesAsJs()

template<class T>
void renderMemberIndicesAsJs ( std::ostream & t,
std::function< std::size_t(std::size_t)> numDocumented,
std::function< Index::MemberIndexMap(std::size_t)> getMemberList,
const T * getInfo (*)(size_t hl),
std::size_t total )

Definition at line 5671 of file index.cpp.

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

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

◆ renderQuickLinksAsJs()

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

Definition at line 5731 of file index.cpp.

5741 {text:\"" << convertToJSString(ci) << "\",url:\""
5742 << convertToJSString(anchor+convertToId(is)) << "\"}";
5743 firstLetter=FALSE;
5744 }
5745 t << "]";
5746 }
5747 t << "}";
5748 }
5749 }
5750 if (!firstMember)
5751 {
5752 t << "]";
5753 }
5754}
5755
5756static bool renderQuickLinksAsJs(std::ostream &t,LayoutNavEntry *root,bool first)
5757{
5758 int count=0;
5759 for (const auto &entry : root->children())
5760 {
5761 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5762 }
5763 if (count>0) // at least one item is visible
5764 {
5765 bool firstChild = TRUE;
5766 if (!first) t << ",";
5767 t << "children:[\n";
5768 for (const auto &entry : root->children())
5769 {
5770 if (entry->visible() && quickLinkVisible(entry->kind()))
5771 {
5772 if (!firstChild) t << ",\n";
5773 firstChild=FALSE;
5774 QCString url = entry->url();
5775 if (isURL(url)) url = "^" + url;
5776 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5777 << convertToJSString(url) << "\"";
5778 bool hasChildren=FALSE;
5779 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5780 {
5781 auto numDoc = [](std::size_t i) {
5783 };
5784 auto memList = [](std::size_t i) {
5786 };
5787 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5788 }
5789 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5790 {
5791 auto numDoc = [](std::size_t i) {
5793 };
5794 auto memList = [](std::size_t i) {
5796 };
5797 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5798 }
5799 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5800 {
5801 auto numDoc = [](std::size_t i) {
5803 };
5804 auto memList = [](std::size_t i) {
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:136
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:135
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:153
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:148
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2854
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5731
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3718
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3533
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
const LayoutNavEntryList & children() const
Definition layout.h:219
bool isURL(const QCString &url)
Checks whether the given url starts with a supported protocol.
Definition util.cpp:5935
QCString convertToId(const QCString &s)
Definition util.cpp:3893

References FALSE, and Doxygen::htmlFileExtension.

◆ startFile()

void startFile ( OutputList & ol,
const QCString & name,
bool isSource,
const QCString & manName,
const QCString & title,
HighlightedItem hli,
bool additionalIndices,
const QCString & altSidebarName,
int hierarchyLevel,
const QCString & allMembersFile )

Definition at line 403 of file index.cpp.

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

References Config_getBool, OutputList::endQuickIndices(), QCString::isEmpty(), OutputList::startFile(), OutputList::startQuickIndices(), OutputList::writeQuickLinks(), OutputList::writeSearchInfo(), and OutputList::writeSplitBar().

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

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 366 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 347 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 386 of file index.cpp.

387{
388 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
390 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
391 ol.startTitleHead(fileName);
394}
virtual void writeSummaryLinks(OutputList &) const =0
void startTitleHead(const QCString &fileName)
Definition outputlist.h:403
void startHeaderSection()
Definition outputlist.h:465

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

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

◆ writeAlphabeticalClassList()

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

Definition at line 2289 of file index.cpp.

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

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

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

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2532 of file index.cpp.

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

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

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2445 of file index.cpp.

2446{
2447 if (Index::instance().numAnnotatedClasses()==0) return;
2448 ol.pushGeneratorState();
2450 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2451 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2452 bool addToIndex = lne==nullptr || lne->visible();
2453
2454 startFile(ol,"classes",false,QCString(),title,HighlightedItem::Classes);
2455
2456 startTitle(ol,QCString());
2457 ol.parseText(title);
2458 endTitle(ol,QCString(),QCString());
2459
2460 if (addToIndex)
2461 {
2462 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2463 }
2464
2465 ol.startContents();
2466 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2467 endFile(ol); // contains ol.endContents()
2468
2469 ol.popGeneratorState();
2470}

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

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2474 of file index.cpp.

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

References OutputList::disableAllBut(), endFile(), endTitle(), FALSE, 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(), TRUE, LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2503 of file index.cpp.

2504{
2505 if (Index::instance().numAnnotatedStructs()==0) return;
2506 ol.pushGeneratorState();
2508 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2509 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2510 bool addToIndex = lne==nullptr || lne->visible();
2511
2512 startFile(ol,"structs",false,QCString(),title,HighlightedItem::Structs);
2513
2514 startTitle(ol,QCString());
2515 ol.parseText(title);
2516 endTitle(ol,QCString(),QCString());
2517
2518 if (addToIndex)
2519 {
2520 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2521 }
2522
2523 ol.startContents();
2524 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2525 endFile(ol); // contains ol.endContents()
2526
2527 ol.popGeneratorState();
2528}

References OutputList::disableAllBut(), endFile(), endTitle(), FALSE, 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(), TRUE, LayoutNavEntry::visible(), and writeAlphabeticalClassList().

◆ writeAnnotatedClassList()

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

Definition at line 2184 of file index.cpp.

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

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

Referenced by writeAnnotatedIndexGeneric().

◆ writeAnnotatedExceptionIndex()

void writeAnnotatedExceptionIndex ( OutputList & ol)
static

Definition at line 2703 of file index.cpp.

2704{
2705 const auto &index = Index::instance();
2707 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2708 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2709 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2711 "annotatedexceptions",
2713}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2586
@ AnnotatedExceptions
Definition index.h:76

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

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2661 of file index.cpp.

2662{
2663 const auto &index = Index::instance();
2665 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2666 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2667 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2669 "annotated",
2671}
@ AnnotatedClasses
Definition index.h:73

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

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2586 of file index.cpp.

2587{
2588 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2589 // annotatedClasses,annotatedClassesPrinted);
2590 if (ctx.numAnnotated==0) return;
2591
2592 ol.pushGeneratorState();
2594 if (ctx.numPrinted==0)
2595 {
2598 }
2600 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2601 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2602 bool addToIndex = lne==nullptr || lne->visible();
2603
2604 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2605
2606 startTitle(ol,QCString());
2607 ol.parseText(title);
2608 endTitle(ol,QCString(),QCString());
2609
2610 ol.startContents();
2611
2612 ol.startTextBlock();
2613 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2614 ol.endTextBlock();
2615
2616 // ---------------
2617 // Linear class index for Latex/RTF
2618 // ---------------
2619 ol.pushGeneratorState();
2621 Doxygen::indexList->disable();
2622
2624
2625 Doxygen::indexList->enable();
2626 ol.popGeneratorState();
2627
2628 // ---------------
2629 // Hierarchical class index for HTML
2630 // ---------------
2631 ol.pushGeneratorState();
2633
2634 {
2635 if (addToIndex)
2636 {
2637 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2638 Doxygen::indexList->incContentsDepth();
2639 }
2640 FTVHelp ftv(false);
2643 TextStream t;
2644 ftv.generateTreeViewInline(t);
2645 ol.writeString(t.str());
2646 if (addToIndex)
2647 {
2648 Doxygen::indexList->decContentsDepth();
2649 }
2650 }
2651
2652 ol.popGeneratorState();
2653 // ------
2654
2655 endFile(ol); // contains ol.endContents()
2656 ol.popGeneratorState();
2657}
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:672
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:670
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:216
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2184
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2040
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1760
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2578
const ClassDef::CompoundType compoundType
Definition index.cpp:2581
const HighlightedItem hiItem
Definition index.cpp:2583
const QCString fileBaseName
Definition index.cpp:2582
const LayoutNavEntry::Kind listKind
Definition index.cpp:2577
const QCString listDefaultTitleText
Definition index.cpp:2579
const int numAnnotated
Definition index.cpp:2575
const QCString listDefaultIntroText
Definition index.cpp:2580
QCString intro() const
Definition layout.h:217

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

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

◆ writeAnnotatedInterfaceIndex()

void writeAnnotatedInterfaceIndex ( OutputList & ol)
static

Definition at line 2675 of file index.cpp.

2676{
2677 const auto &index = Index::instance();
2679 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2680 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2681 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2683 "annotatedinterfaces",
2685}
@ AnnotatedInterfaces
Definition index.h:74

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

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2689 of file index.cpp.

2690{
2691 const auto &index = Index::instance();
2693 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2694 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2695 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2697 "annotatedstructs",
2699}
@ AnnotatedStructs
Definition index.h:75

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

◆ writeClassHierarchy()

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

Definition at line 1101 of file index.cpp.

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

References Doxygen::classLinkedMap, OutputList::disable(), endIndexHierarchy(), FALSE, 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 QCString & separator,
QCString & prevClassName )
static

Definition at line 2716 of file index.cpp.

2718{
2719 const ClassDef *cd=md->getClassDef();
2720 if ( cd && prevClassName!=cd->displayName())
2721 {
2722 ol.writeString(separator);
2724 cd->displayName());
2725 prevClassName = cd->displayName();
2726 }
2727}
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual QCString anchor() const =0
virtual QCString displayName(bool includeScope=TRUE) 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 3310 of file index.cpp.

3315 : theTranslator->trCompoundMembersDescriptionTotal(hl));
3316 ol.endTextBlock();
3317 if (dynamicMenus || disableIndex)
3318 {
3319 writeMemberIndex(ol,index.isClassIndexLetterUsed(hl),getCmhlInfo(hl)->fname,multiPageIndex);
3320 }
3321
3322 writeMemberList(ol,quickIndex,
3323 multiPageIndex ? letter : std::string(),
3324 index.isClassIndexLetterUsed(hl),
3326 endFile(ol);
3327 first=FALSE;
3328 }
3329
3330 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3331
3332 ol.popGeneratorState();
3333}
3334
3335static void writeClassMemberIndex(OutputList &ol)
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3310
static void writeMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, QCString fullName, bool multiPage)
Definition index.cpp:3110
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3155
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2770

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

◆ writeClassMemberIndexFiltered()

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

Definition at line 3177 of file index.cpp.

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

◆ writeClassTree()

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

Definition at line 1760 of file index.cpp.

1761{
1762 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1763 for (const auto &cdi : cl)
1764 {
1765 const ClassDef *cd = get_pointer(cdi);
1766 if (cd->getLanguage()==SrcLangExt::VHDL)
1767 {
1770 )// no architecture
1771 {
1772 continue;
1773 }
1774 }
1775
1776 if (sliceOpt && cd->compoundType() != ct)
1777 {
1778 continue;
1779 }
1780
1781 if (!globalOnly ||
1782 cd->getOuterScope()==nullptr ||
1784 )
1785 {
1786 int count=0;
1787 for (const auto &ccd : cd->getClasses())
1788 {
1789 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1790 {
1791 count++;
1792 }
1793 }
1795 {
1796 QCString displayName = cd->displayName(false);
1797 if (ftv)
1798 {
1799 ftv->addContentsItem(count>0,displayName,cd->getReference(),
1800 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd,convertToHtml(displayName));
1801 }
1802 if (addToIndex &&
1803 (cd->getOuterScope()==nullptr ||
1805 )
1806 )
1807 {
1808 addMembersToIndex(cd,LayoutDocManager::Class,
1809 displayName,
1810 cd->anchor(),
1811 cd->partOfGroups().empty() && !cd->isSimple());
1812 }
1813 if (count>0)
1814 {
1815 if (ftv) ftv->incContentsDepth();
1816 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1817 if (ftv) ftv->decContentsDepth();
1818 }
1819 }
1820 }
1821 }
1822}
virtual bool isSimple() const =0
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
virtual bool isImplicitTemplateInstance() const =0
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e. class/struct/union/...
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual DefType definitionType() const =0
virtual const GroupList & partOfGroups() const =0
virtual Definition * getOuterScope() const =0
static NamespaceDefMutable * globalScope
Definition doxygen.h:121
void decContentsDepth()
Definition ftvhelp.cpp:154
void incContentsDepth()
Definition ftvhelp.cpp:143
void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def, const QCString &nameAsHtml=QCString())
Definition ftvhelp.cpp:186
bool classVisibleInIndex(const ClassDef *cd)
const ClassDef * get_pointer(const Ptr &p)

References FTVHelp::addContentsItem(), addMembersToIndex(), Definition::anchor(), classVisibleInIndex(), ClassDef::compoundType(), Config_getBool, VhdlDocGen::convert(), convertToHtml(), FTVHelp::decContentsDepth(), Definition::definitionType(), Definition::displayName(), FALSE, 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(), TRUE, 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 992 of file index.cpp.

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

References FTVHelp::addContentsItem(), classHasVisibleChildren(), classHasVisibleRoot(), Config_getBool, VhdlDocGen::convert(), convertToHtml(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, FALSE, OutputList::generateDoc(), Doxygen::indexList, OutputList::parseText(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), TRUE, 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 2049 of file index.cpp.

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2040 of file index.cpp.

2042{
2043 for (const auto &nd : nsLinkedMap)
2044 {
2045 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2046 }
2047}

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

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

References FTVHelp::addContentsItem(), Config_getBool, FTVHelp::decContentsDepth(), ClassDef::Exception, FALSE, NamespaceDef::getClasses(), NamespaceDef::getExceptions(), NamespaceDef::getInterfaces(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), NamespaceDef::getStructs(), Doxygen::globalScope, FTVHelp::incContentsDepth(), Doxygen::indexList, ClassDef::Interface, Definition::isAnonymous(), Definition::isLinkableInProject(), Definition::localName(), namespaceHasNestedClass(), qstrlen(), QCString::replace(), ClassDef::Struct, TRUE, 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 626 of file index.cpp.

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

References FTVHelp::addContentsItem(), Definition::anchor(), ClassDef::baseClasses(), classHasVisibleChildren(), classHasVisibleRoot(), VhdlDocGen::convert(), convertToHtml(), FTVHelp::decContentsDepth(), Definition::displayName(), OutputList::docify(), endIndexHierarchy(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, FALSE, OutputList::generateDoc(), Definition::getDefFileName(), Definition::getDefLine(), Definition::getLanguage(), Definition::getOutputFileBase(), Definition::getReference(), FTVHelp::incContentsDepth(), Doxygen::indexList, Definition::isLinkable(), Definition::isReference(), ClassDef::isVisibleInHierarchy(), Definition::name(), OutputList::parseText(), ClassDef::protection(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), ClassDef::subClasses(), TRUE, and writeClassTreeToOutput().

Referenced by writeClassTreeForList(), and writeClassTreeToOutput().

◆ writeConceptIndex()

void writeConceptIndex ( OutputList & ol)
static

Definition at line 4749 of file index.cpp.

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

◆ writeConceptList()

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

Definition at line 4643 of file index.cpp.

4643 {
4644 if (addToIndex)
4645 {
4646 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4647 Doxygen::indexList->incContentsDepth();
4648 }
4649 FTVHelp ftv(false);
4650 writeModuleList(ol,&ftv,addToIndex);
4651 TextStream t;
4653 ol.writeString(t.str());
4654 if (addToIndex)
4655 {
4656 Doxygen::indexList->decContentsDepth();
4657 }
4658 }
4659 ol.popGeneratorState();
4660 // 2.}
4661 endFile(ol);
void generateTreeViewInline(TextStream &t)
Definition ftvhelp.cpp:881
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4551

References FTVHelp::generateTreeViewInline(), Doxygen::indexList, TextStream::str(), TRUE, writeModuleList(), and OutputList::writeString().

Referenced by writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4727 of file index.cpp.

4735 {
4736 Doxygen::indexList->incContentsDepth();
4737 }
4738
4739 ftv->incContentsDepth();
4740 writeConceptTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex);
4741 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4742 ftv->decContentsDepth();
4743
4744 if (addToIndex)
4745 {
4746 Doxygen::indexList->decContentsDepth();
4747 }
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4666
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4643

References Doxygen::indexList.

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4666 of file index.cpp.

4669{
4670 for (const auto &cd : concepts)
4671 {
4672 if (cd->isLinkableInProject())
4673 {

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4676 of file index.cpp.

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

References FALSE.

◆ writeDirHierarchy()

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

Definition at line 928 of file index.cpp.

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

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

Referenced by writeFileIndex().

◆ writeDirIndex()

void writeDirIndex ( OutputList & ol)
static

Definition at line 1575 of file index.cpp.

1576{
1577 if (Index::instance().numDocumentedDirs()==0) return;
1578 ol.pushGeneratorState();
1580
1581 QCString title = theTranslator->trDirectories();
1582 startFile(ol,"dirs",false,QCString(),title,HighlightedItem::Files);
1583 startTitle(ol,title);
1584 ol.parseText(title);
1585 endTitle(ol,QCString(),QCString());
1586
1587 ol.startIndexList();
1588 for (const auto &dir : *Doxygen::dirLinkedMap)
1589 {
1590 if (dir->hasDocumentation())
1591 {
1592 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1593 }
1594 }
1595
1596 ol.endIndexList();
1597
1598 endFile(ol);
1599 ol.popGeneratorState();
1600}

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

◆ writeDirTreeNode()

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

Definition at line 770 of file index.cpp.

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

References FTVHelp::addContentsItem(), addMembersToIndex(), FTVHelp::decContentsDepth(), dirHasVisibleChildren(), OutputList::docify(), endIndexHierarchy(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), FALSE, fileVisibleInIndex(), OutputList::generateDoc(), Definition::getDefFileName(), Definition::getDefLine(), DirDef::getFiles(), Definition::getOutputFileBase(), Definition::getReference(), FTVHelp::incContentsDepth(), Doxygen::indexList, Definition::isReference(), Definition::name(), DirDef::shortName(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), DirDef::subDirs(), TRUE, warn, and writeDirTreeNode().

Referenced by writeDirHierarchy(), writeDirIndex(), and writeDirTreeNode().

◆ writeExampleIndex()

void writeExampleIndex ( OutputList & ol)
static

Definition at line 3891 of file index.cpp.

3892{
3893 const auto &index = Index::instance();
3894 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3895 bool addToIndex = lne==nullptr || lne->visible();
3896 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3897 {
3898 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3899 Doxygen::indexList->incContentsDepth();
3900 }
3901 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3908 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3909 {
3910 Doxygen::indexList->decContentsDepth();
3911 }
3912}
3913
3914//----------------------------------------------------------------------------
3915
3916static void writeExampleIndex(OutputList &ol)
3917{
3918 if (Doxygen::exampleLinkedMap->empty()) return;
3919 ol.pushGeneratorState();
3922 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3923 QCString title = lne ? lne->title() : theTranslator->trExamples();
3924 bool addToIndex = lne==nullptr || lne->visible();
3925
3926 startFile(ol,"examples",false,QCString(),title,HighlightedItem::Examples);
3927
3928 startTitle(ol,QCString());
3929 ol.parseText(title);
3930 endTitle(ol,QCString(),QCString());
3931
3932 ol.startContents();
3933
3934 if (addToIndex)
3935 {
3936 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3937 Doxygen::indexList->incContentsDepth();
3938 }
3939
3940 ol.startTextBlock();
3941 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3942 ol.endTextBlock();
3943
3944 ol.startItemList();
3945 for (const auto &pd : *Doxygen::exampleLinkedMap)
3946 {
3947 ol.startItemListItem();
3948 QCString n=pd->getOutputFileBase();
3949 if (!pd->title().isEmpty())
3950 {
3951 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
void startItemListItem()
Definition outputlist.h:457
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3891
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3734

References ModuleMemberHighlight::All, ModuleMemberHighlight::Enums, ModuleMemberHighlight::EnumValues, LayoutNavEntry::find(), ModuleMemberHighlight::Functions, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutDocManager::rootNavEntry(), theTranslator, LayoutNavEntry::title(), ModuleMemberHighlight::Typedefs, ModuleMemberHighlight::Variables, LayoutNavEntry::visible(), and writeModuleMemberIndexFiltered().

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1604 of file index.cpp.

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

References compareFileDefs(), Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endIndexList(), OutputList::endTextBlock(), endTitle(), Files, LayoutNavEntry::find(), QCString::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Doxygen::inputNameLinkedMap, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), QCString::isEmpty(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexList(), OutputList::startTextBlock(), startTitle(), QCString::str(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeDirHierarchy(), writeSingleFileIndex(), and OutputList::writeString().

◆ writeFileLinkForMember()

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

Definition at line 2729 of file index.cpp.

2731{
2732 const FileDef *fd=md->getFileDef();
2733 if (fd && prevFileName!=fd->name())
2734 {
2735 ol.writeString(separator);
2737 fd->name());
2738 prevFileName = fd->name();
2739 }
2740}
A model of a file symbol.
Definition filedef.h:99
virtual const FileDef * getFileDef() const =0

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

Referenced by writeMemberList().

◆ writeFileMemberIndex()

void writeFileMemberIndex ( OutputList & ol)
static

Definition at line 3498 of file index.cpp.

3505 : theTranslator->trFileMembersDescriptionTotal(hl));
3506 ol.endTextBlock();
3507 if (dynamicMenus || disableIndex)
3508 {
3509 writeMemberIndex(ol,index.isFileIndexLetterUsed(hl),getFmhlInfo(hl)->fname,multiPageIndex);
3510 }
3511
3512 writeMemberList(ol,quickIndex,
3513 multiPageIndex ? letter : std::string(),
3514 index.isFileIndexLetterUsed(hl),
3516 endFile(ol);
3517 first=FALSE;
3518 }
3519 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3520 ol.popGeneratorState();
3521}
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3347

◆ writeFileMemberIndexFiltered()

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

Definition at line 3370 of file index.cpp.

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

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1243 of file index.cpp.

1244{
1245 if (Index::instance().numHierarchyClasses()==0) return;
1247 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1248 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1249 startFile(ol,"inherits",false,QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1250 startTitle(ol,QCString());
1251 ol.parseText(title);
1252 endTitle(ol,QCString(),QCString());
1253 ol.startContents();
1254 ol.startTextBlock();
1255 ol.startParagraph();
1256 ol.startTextLink("hierarchy",QCString());
1257 ol.parseText(theTranslator->trGotoTextualHierarchy());
1258 ol.endTextLink();
1259 ol.endParagraph();
1260 ol.endTextBlock();
1263 endFile(ol);
1264 ol.enableAll();
1265}
Represents a graphical class hierarchy.
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:668
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:407
void endParagraph()
Definition outputlist.h:409
void endTextLink()
Definition outputlist.h:444
void enableAll()
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:442

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

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1453 of file index.cpp.

1454{
1455 if (Index::instance().numHierarchyExceptions()==0) return;
1457 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1458 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1459 startFile(ol,"exceptioninherits",false,QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1460 startTitle(ol,QCString());
1461 ol.parseText(title);
1462 endTitle(ol,QCString(),QCString());
1463 ol.startContents();
1464 ol.startTextBlock();
1465 ol.startParagraph();
1466 ol.startTextLink("exceptionhierarchy",QCString());
1467 ol.parseText(theTranslator->trGotoTextualHierarchy());
1468 ol.endTextLink();
1469 ol.endParagraph();
1470 ol.endTextBlock();
1473 endFile(ol);
1474 ol.enableAll();
1475}
@ ExceptionHierarchy
Definition index.h:67

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

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1348 of file index.cpp.

1349{
1350 if (Index::instance().numHierarchyInterfaces()==0) return;
1352 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1353 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1354 startFile(ol,"interfaceinherits",false,QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1355 startTitle(ol,QCString());
1356 ol.parseText(title);
1357 endTitle(ol,QCString(),QCString());
1358 ol.startContents();
1359 ol.startTextBlock();
1360 ol.startParagraph();
1361 ol.startTextLink("interfacehierarchy",QCString());
1362 ol.parseText(theTranslator->trGotoTextualHierarchy());
1363 ol.endTextLink();
1364 ol.endParagraph();
1365 ol.endTextBlock();
1368 endFile(ol);
1369 ol.enableAll();
1370}
@ InterfaceHierarchy
Definition index.h:66

References OutputList::disableAllBut(), OutputList::enableAll(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), FALSE, 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(), and OutputList::writeGraphicalHierarchy().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4108 of file index.cpp.

4118{
4119 int count=0;
4120 for (const auto &dd : *Doxygen::dirLinkedMap)
4121 {
4122 if (dd->isLinkableInProject())
4123 {
4124 count++;
4125 }
4126 }
4127 return count;
4128}
4129
4130
4131//----------------------------------------------------------------------------
4132
4133void writeGraphInfo(OutputList &ol)
4134{
4135 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4136 ol.pushGeneratorState();
4138
4139 DotLegendGraph gd;
4140 gd.writeGraph(Config_getString(HTML_OUTPUT));
4141
4142 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4143 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4144 // temporarily disable the stripping of comments for our own code example!
4145 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4146 // temporarily disable create subdirs for linking to our example
4147 Config_updateBool(CREATE_SUBDIRS,FALSE);
4148
4149 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4150 startTitle(ol,QCString());
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const QCString &path)
#define Config_updateBool(name, value)
Definition config.h:40
#define Config_getString(name)
Definition config.h:32
void writeGraphInfo(OutputList &ol)
Definition index.cpp:4108

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4404 of file index.cpp.

4404 {
4405 startIndexHierarchy(ol,level+1);
4406 for (const auto &subgd : gd->getSubGroups())
4407 {
4408 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4409 }
4410 endIndexHierarchy(ol,level+1);
4411 }
4412 }
4413 }
4414
4415 ol.endIndexListItem();
4416
4417 if (addToIndex)
4418 {
4419 Doxygen::indexList->decContentsDepth();
4420 }
4421 if (ftv)
4422 {
4423 ftv->decContentsDepth();
4424 }
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4158

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

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

References QCString::left(), and QCString::mid().

Referenced by writeGroupHierarchy(), and writeTopicIndex().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1374 of file index.cpp.

1375{
1376 if (Index::instance().numHierarchyExceptions()==0) return;
1377 ol.pushGeneratorState();
1378 //1.{
1380
1381 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1382 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1383 bool addToIndex = lne==nullptr || lne->visible();
1384
1385 startFile(ol,"exceptionhierarchy",false,QCString(), title, HighlightedItem::ExceptionHierarchy);
1386 startTitle(ol,QCString());
1387 ol.parseText(title);
1388 endTitle(ol,QCString(),QCString());
1389 ol.startContents();
1390 ol.startTextBlock();
1391
1392 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1393 {
1396 ol.startParagraph();
1397 ol.startTextLink("exceptioninherits",QCString());
1398 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1399 ol.endTextLink();
1400 ol.endParagraph();
1403 }
1404 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1405 ol.endTextBlock();
1406
1407 // ---------------
1408 // Static exception hierarchy for Latex/RTF
1409 // ---------------
1410 ol.pushGeneratorState();
1411 //2.{
1413 Doxygen::indexList->disable();
1414
1415 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1416
1417 Doxygen::indexList->enable();
1418 ol.popGeneratorState();
1419 //2.}
1420
1421 // ---------------
1422 // Dynamic exception hierarchical index for HTML
1423 // ---------------
1424 ol.pushGeneratorState();
1425 //2.{
1427
1428 {
1429 if (addToIndex)
1430 {
1431 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1432 }
1433 FTVHelp ftv(false);
1434 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1435 TextStream t;
1436 ftv.generateTreeViewInline(t);
1437 ol.pushGeneratorState();
1439 ol.writeString(t.str());
1440 ol.popGeneratorState();
1441 }
1442 ol.popGeneratorState();
1443 //2.}
1444 // ------
1445
1446 endFile(ol);
1447 ol.popGeneratorState();
1448 //1.}
1449}
void enable(OutputType o)
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1101

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), 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(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1162 of file index.cpp.

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

References ClassDef::Class, ClassHierarchy, Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, 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(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1269 of file index.cpp.

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

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), 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(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4887 of file index.cpp.

4887 : lne->children())
4888 {
4889 if (entry->visible()) count++;
4890 }
4891 if (count>0)
4892 {
4893 ol.writeString("<ul>\n");
4894 for (const auto &entry: lne->children())
4895 {
4896 if (entry->visible())
4897 {
4898 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4899 fixSpaces(entry->title())+"</span></a></li>\n");
4900 }
4901 }
4902 ol.writeString("</ul>\n");
4903 }
4904 endFile(ol);
4905 ol.popGeneratorState();
4906 }
4907}
4908
4909//----------------------------------------------------------------------------
4910
4911
4912static void writeIndex(OutputList &ol)
4913{
4914 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4915 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4916 bool disableIndex = Config_getBool(DISABLE_INDEX);
4917 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4918 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4919 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4920 QCString projectName = Config_getString(PROJECT_NAME);
4921 // save old generator state
4922 ol.pushGeneratorState();
4923
4924 QCString projPrefix;
4925 if (!projectName.isEmpty())
4926 {
4927 projPrefix=projectName+" ";
4928 }
4929
4930 //--------------------------------------------------------------------
4931 // write HTML index
4932 //--------------------------------------------------------------------
4934
4935 QCString defFileName =
4936 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4937 int defLine =
4938 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4939
4940 QCString title, titleAsHtml;
4941 if (!mainPageHasTitle())
4942 {
4943 title = theTranslator->trMainPage();
4944 }
4945 else if (Doxygen::mainPage)
4946 {
4947 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4948 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4949 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4950 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4951 }
4952
4953 QCString indexName="index";
4954 ol.startFile(indexName,false,QCString(),title);
4955
4957 {
4958 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4959 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4960 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4961 if (hasTitle) // to avoid duplicate entries in the treeview
4962 {
4963 Doxygen::indexList->addContentsItem(hasSubs,
4964 title,
4965 QCString(),
4966 indexName,
4967 QCString(),
4968 hasSubs,
4969 TRUE,
4970 nullptr,
4971 titleAsHtml);
4972 }
4973 if (hasSubs)
4974 {
4975 writePages(Doxygen::mainPage.get(),nullptr,!hasTitle);
4976 }
4977 }
4978
4979 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4980 ol.startQuickIndices();
4981 if (!disableIndex && !quickLinksAfterSplitbar)
4982 {
4984 }
4985 ol.endQuickIndices();
4986 ol.writeSplitBar(indexName,QCString());
4987 if (quickLinksAfterSplitbar)
4988 {
4990 }
4991 ol.writeSearchInfo();
4992 bool headerWritten=FALSE;
4994 {
4995 if (!Doxygen::mainPage->title().isEmpty())
4996 {
4997 if (Doxygen::mainPage->title().lower() != "notitle")
4998 ol.startPageDoc(Doxygen::mainPage->title());
4999 else
5000 ol.startPageDoc("");
5001 }
5002 else
5003 ol.startPageDoc(projectName);
5004 }
5005 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
5006 {
5007 if (Doxygen::mainPage->title().lower()!="notitle")
5008 {
5009 ol.startHeaderSection();
5011 ol.generateDoc(Doxygen::mainPage->docFile(),
5012 Doxygen::mainPage->getStartBodyLine(),
5013 Doxygen::mainPage.get(),
5014 nullptr,
5015 Doxygen::mainPage->title(),
5016 DocOptions()
5017 .setSingleLine(true));
5018 headerWritten = TRUE;
5019 }
5020 }
5021 else
5022 {
5023 if (!projectName.isEmpty())
5024 {
5025 ol.startHeaderSection();
5027 ol.parseText(theTranslator->trDocumentation(projectName));
5028 headerWritten = TRUE;
5029 }
5030 }
5031 if (headerWritten)
5032 {
5034 ol.endHeaderSection();
5035 }
5036
5037 ol.startContents();
5038 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
5039 {
5041 }
5042
5044 {
5045 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
5046 {
5047 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
5048 }
5049
5050 ol.startTextBlock();
5051 ol.generateDoc(defFileName,
5052 defLine,
5053 Doxygen::mainPage.get(),
5054 nullptr,
5055 Doxygen::mainPage->documentation(),
5056 DocOptions()
5057 .setIndexWords(true));
5058 ol.endTextBlock();
5059 ol.endPageDoc();
5060 }
5061
5064 ol.writeString("<a href=\"" + fn + "\"></a>\n");
5065 Doxygen::indexList->addIndexFile(fn);
5066
5067 if (Doxygen::mainPage &&
5068 generateTreeView &&
5069 pageOutlinePanel &&
5070 Doxygen::mainPage->localToc().isHtmlEnabled() &&
5071 Doxygen::mainPage->hasSections()
5072 )
5073 {
5074 ol.writeString("</div><!-- doc-content -->\n");
5075 ol.endContents();
5076 Doxygen::mainPage->writePageNavigation(ol);
5077 ol.writeString("</div><!-- container -->\n");
5078 endFile(ol,true,true);
5079 }
5080 else
5081 {
5082 endFile(ol);
5083 }
5084
5086
5087 //--------------------------------------------------------------------
5088 // write LaTeX/RTF index
5089 //--------------------------------------------------------------------
5093
5095 {
5096 msg("Generating main page...\n");
5097 Doxygen::mainPage->writeDocumentation(ol);
5098 }
5099
5100 ol.startFile("refman",false,QCString(),QCString());
5104
5105 if (projPrefix.isEmpty())
5106 {
5107 ol.parseText(theTranslator->trReferenceManual());
5108 }
5109 else
5110 {
5111 ol.parseText(projPrefix);
5112 }
5113
5114 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5115 {
5116 ol.startProjectNumber();
5117 ol.generateDoc(defFileName,
5118 defLine,
5119 Doxygen::mainPage.get(),
5120 nullptr,
5121 Config_getString(PROJECT_NUMBER),
5122 DocOptions());
5123 ol.endProjectNumber();
5124 }
5127 ol.parseText(theTranslator->trGeneratedBy());
5131
5132 ol.lastIndexPage();
5134 {
5137 }
5138 const auto &index = Index::instance();
5139 if (index.numDocumentedPages()>0)
5140 {
5143 }
5144
5146 if (!Config_getBool(LATEX_HIDE_INDICES))
5147 {
5148 //if (indexedPages>0)
5149 //{
5150 // ol.startIndexSection(isPageIndex);
5151 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5152 // ol.endIndexSection(isPageIndex);
5153 //}
5154 if (index.numDocumentedModules()>0)
5155 {
5157 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5159 }
5160 if (index.numDocumentedGroups()>0)
5161 {
5163 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5165 }
5166 if (index.numDocumentedDirs()>0)
5167 {
5169 ol.parseText(theTranslator->trDirIndex());
5171 }
5172 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5173 {
5174 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5175 if (lne)
5176 {
5178 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5180 }
5181 }
5182 if (index.numDocumentedConcepts()>0)
5183 {
5185 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5187 }
5188 if (index.numHierarchyInterfaces()>0)
5189 {
5191 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5193 }
5194 if (index.numHierarchyClasses()>0)
5195 {
5196 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5197 if (lne)
5198 {
5200 ol.parseText(/*projPrefix+*/
5201 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5202 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5203 theTranslator->trHierarchicalIndex()
5204 ));
5206 }
5207 }
5208 if (index.numHierarchyExceptions()>0)
5209 {
5211 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5213 }
5214 if (index.numAnnotatedInterfacesPrinted()>0)
5215 {
5217 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5219 }
5220 if (index.numAnnotatedClassesPrinted()>0)
5221 {
5223 ol.parseText(/*projPrefix+*/
5224 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5225 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5226 theTranslator->trCompoundIndex()
5227 ));
5229 }
5230 if (index.numAnnotatedStructsPrinted()>0)
5231 {
5233 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5235 }
5236 if (index.numAnnotatedExceptionsPrinted()>0)
5237 {
5239 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5241 }
5242 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5243 {
5245 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5247 }
5248 }
5250
5251 if (index.numDocumentedModules()>0)
5252 {
5254 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5256 }
5257 if (index.numDocumentedGroups()>0)
5258 {
5260 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5262 }
5263 if (index.numDocumentedDirs()>0)
5264 {
5266 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5268 }
5269 if (index.numDocumentedNamespaces()>0)
5270 {
5272 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5274 }
5275 if (index.numDocumentedConcepts()>0)
5276 {
5278 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5280 }
5281 if (index.numAnnotatedInterfacesPrinted()>0)
5282 {
5284 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5286 }
5287 if (index.numAnnotatedClassesPrinted()>0)
5288 {
5290 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5292 }
5293 if (index.numAnnotatedStructsPrinted()>0)
5294 {
5296 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
static const QCString crawlFileName
Definition sitemap.h:75
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:100
void endPageDoc()
Definition outputlist.h:624
void endIndexSection(IndexSection is)
Definition outputlist.h:387
void startProjectNumber()
Definition outputlist.h:391
void lastIndexPage()
Definition outputlist.h:674
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:622
void endProjectNumber()
Definition outputlist.h:393
void startIndexSection(IndexSection is)
Definition outputlist.h:385
static void writeIndex(OutputList &ol)
Definition index.cpp:4887
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ isPageDocumentation
Definition index.h:53
@ isDirDocumentation
Definition index.h:47
@ isModuleDocumentation
Definition index.h:45
@ isClassHierarchyIndex
Definition index.h:41
@ isModuleIndex
Definition index.h:36
@ isTopicIndex
Definition index.h:37
@ isConceptIndex
Definition index.h:40
@ isClassDocumentation
Definition index.h:49
@ isCompoundIndex
Definition index.h:42
@ isConceptDocumentation
Definition index.h:50
@ isDirIndex
Definition index.h:38
@ isNamespaceIndex
Definition index.h:39
@ isNamespaceDocumentation
Definition index.h:48
@ isTitlePageStart
Definition index.h:33
@ isTopicDocumentation
Definition index.h:46
#define msg(fmt,...)
Definition message.h:94
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:530
bool mainPageHasTitle()
Definition util.cpp:6306
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4946

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5822 of file index.cpp.

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5300 of file index.cpp.

5300 {
5302 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5304 }
5305 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5306 {
5308 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5310 }
5311 if (!Doxygen::exampleLinkedMap->empty())
5312 {
5314 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5316 }
5318 endFile(ol);
5319
5320 ol.popGeneratorState();
5321}
5322
5323static std::vector<bool> indexWritten;
5324
5325static void writeIndexHierarchyEntries(OutputList &ol,const LayoutNavEntryList &entries)
5326{
5327 auto isRef = [](const QCString &s)
5328 {
5329 return s.startsWith("@ref") || s.startsWith("\\ref");
5330 };
5331 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5332 const auto &index = Index::instance();
5333 for (const auto &lne : entries)
5334 {
5335 LayoutNavEntry::Kind kind = lne->kind();
5336 size_t idx = static_cast<size_t>(kind);
5337 if (idx>=indexWritten.size())
5338 {
5339 size_t oldSize = indexWritten.size();
5340 size_t newSize = idx+1;
5341 indexWritten.resize(newSize);
5342 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5343 }
5344 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5345 bool addToIndex=lne->visible();
5346 bool needsClosing=FALSE;
5347 if (!indexWritten.at(idx))
5348 {
5349 switch(kind)
5350 {
5351 case LayoutNavEntry::MainPage:
5352 msg("Generating index page...\n");
5353 writeIndex(ol);
5354 break;
5355 case LayoutNavEntry::Pages:
5356 msg("Generating page index...\n");
5357 writePageIndex(ol);
5358 break;
5359 case LayoutNavEntry::Topics:
5360 msg("Generating topic index...\n");
5361 writeTopicIndex(ol);
5362 break;
5363 case LayoutNavEntry::Modules:
5364 {
5365 if (index.numDocumentedModules()>0 && addToIndex)
5366 {
5367 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5368 Doxygen::indexList->incContentsDepth();
5369 needsClosing=TRUE;
5370 }
5371 }
5372 break;
5373 case LayoutNavEntry::ModuleList:
5374 msg("Generating module index...\n");
5375 writeModuleIndex(ol);
5376 break;
5377 case LayoutNavEntry::ModuleMembers:
5378 msg("Generating module member index...\n");
5380 break;
5381 case LayoutNavEntry::Namespaces:
5382 {
5383 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5384 if (showNamespaces)
5385 {
5386 if (index.numDocumentedNamespaces()>0 && addToIndex)
5387 {
5388 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5389 Doxygen::indexList->incContentsDepth();
5390 needsClosing=TRUE;
5391 }
5392 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5393 {
5394 msg("Generating namespace index...\n");
5396 }
5397 }
5398 }
5399 break;
5400 case LayoutNavEntry::NamespaceList:
5401 {
5402 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5403 if (showNamespaces)
5404 {
5405 msg("Generating namespace index...\n");
5407 }
5408 }
5409 break;
5410 case LayoutNavEntry::NamespaceMembers:
5411 msg("Generating namespace member index...\n");
5413 break;
5414 case LayoutNavEntry::Classes:
5415 if (index.numAnnotatedClasses()>0 && addToIndex)
5416 {
5417 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5418 Doxygen::indexList->incContentsDepth();
5419 needsClosing=TRUE;
5420 }
5421 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5422 {
5423 msg("Generating annotated compound index...\n");
5425 }
5426 break;
5427 case LayoutNavEntry::Concepts:
5428 msg("Generating concept index...\n");
5430 break;
5431 case LayoutNavEntry::ClassList:
5432 msg("Generating annotated compound index...\n");
5434 break;
5435 case LayoutNavEntry::ClassIndex:
5436 msg("Generating alphabetical compound index...\n");
5438 break;
5439 case LayoutNavEntry::ClassHierarchy:
5440 msg("Generating hierarchical class index...\n");
5442 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5443 {
5444 msg("Generating graphical class hierarchy...\n");
5446 }
5447 break;
5448 case LayoutNavEntry::ClassMembers:
5449 if (!sliceOpt)
5450 {
5451 msg("Generating member index...\n");
5453 }
5454 break;
5455 case LayoutNavEntry::Interfaces:
5456 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5457 {
5458 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5459 Doxygen::indexList->incContentsDepth();
5460 needsClosing=TRUE;
5461 }
5462 break;
5463 case LayoutNavEntry::InterfaceList:
5464 if (sliceOpt)
5465 {
5466 msg("Generating annotated interface index...\n");
5468 }
5469 break;
5470 case LayoutNavEntry::InterfaceIndex:
5471 if (sliceOpt)
5472 {
5473 msg("Generating alphabetical interface index...\n");
5475 }
5476 break;
5477 case LayoutNavEntry::InterfaceHierarchy:
5478 if (sliceOpt)
5479 {
5480 msg("Generating hierarchical interface index...\n");
5482 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5483 {
5484 msg("Generating graphical interface hierarchy...\n");
5486 }
5487 }
5488 break;
5489 case LayoutNavEntry::Structs:
5490 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5491 {
5492 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5493 Doxygen::indexList->incContentsDepth();
5494 needsClosing=TRUE;
5495 }
5496 break;
5497 case LayoutNavEntry::StructList:
5498 if (sliceOpt)
5499 {
5500 msg("Generating annotated struct index...\n");
5502 }
5503 break;
5504 case LayoutNavEntry::StructIndex:
5505 if (sliceOpt)
5506 {
5507 msg("Generating alphabetical struct index...\n");
5509 }
5510 break;
5511 case LayoutNavEntry::Exceptions:
5512 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5513 {
5514 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5515 Doxygen::indexList->incContentsDepth();
5516 needsClosing=TRUE;
5517 }
5518 break;
5519 case LayoutNavEntry::ExceptionList:
5520 if (sliceOpt)
5521 {
5522 msg("Generating annotated exception index...\n");
5524 }
5525 break;
5526 case LayoutNavEntry::ExceptionIndex:
5527 if (sliceOpt)
5528 {
5529 msg("Generating alphabetical exception index...\n");
5531 }
5532 break;
5533 case LayoutNavEntry::ExceptionHierarchy:
5534 if (sliceOpt)
5535 {
5536 msg("Generating hierarchical exception index...\n");
5538 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5539 {
5540 msg("Generating graphical exception hierarchy...\n");
5542 }
5543 }
5544 break;
5545 case LayoutNavEntry::Files:
5546 {
5547 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5548 {
5549 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5550 Doxygen::indexList->incContentsDepth();
5551 needsClosing=TRUE;
5552 }
5553 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5554 {
5555 msg("Generating file index...\n");
5556 writeFileIndex(ol);
5557 }
5558 }
5559 break;
5560 case LayoutNavEntry::FileList:
5561 msg("Generating file index...\n");
5562 writeFileIndex(ol);
5563 break;
5564 case LayoutNavEntry::FileGlobals:
5565 msg("Generating file member index...\n");
5567 break;
5568 case LayoutNavEntry::Examples:
5569 msg("Generating example index...\n");
5571 break;
5572 case LayoutNavEntry::User:
5573 if (addToIndex)
5574 {
5575 // prepend a ! or ^ marker to the URL to avoid tampering with it
5576 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5577 bool isRelative=url.at(0)=='!';
5578 if (!url.isEmpty() && !isRelative) // absolute URL
5579 {
5580 url.prepend("^"); // prepend ^ to absolute URL
5581 }
5582 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5583 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5584 }
5585 break;
5586 case LayoutNavEntry::UserGroup:
5587 if (addToIndex)
5588 {
5589 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5590 if (!url.isEmpty())
5591 {
5592 if (url=="!") // result of a "[none]" url
5593 {
5594 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5595 }
5596 else
5597 {
5598 bool isRelative=url.at(0)=='!';
5599 if (!isRelative) // absolute URL
5600 {
5601 url.prepend("^"); // prepend ^ to absolute URL
5602 }
5603 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5604 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5605 }
5606 }
5607 else
5608 {
5609 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5610 }
5611 Doxygen::indexList->incContentsDepth();
5612 needsClosing=TRUE;
5613 }
5614 writeUserGroupStubPage(ol,lne.get());
5615 break;
5616 case LayoutNavEntry::None:
5617 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5618 break;
5619 }
5620 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5621 {
QCString & prepend(const char *s)
Definition qcstring.h:426
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:597
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5300
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1243
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2689
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2532
static std::vector< bool > indexWritten
Definition index.cpp:5298
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2661
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1604
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1348
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2445
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2675
static void writePageIndex(OutputList &ol)
Definition index.cpp:4034
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2058
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2703
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1269
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4850
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4428
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3866
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1453
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2474
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2503
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4575
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1374
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3682
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1162
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3498
@ isFileDocumentation
Definition index.h:51
@ isExampleDocumentation
Definition index.h:52
@ isEndIndex
Definition index.h:55
std::vector< std::unique_ptr< LayoutNavEntry > > LayoutNavEntryList
Definition layout.h:152
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5947

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

◆ writeMemberIndex()

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

Definition at line 3110 of file index.cpp.

3113 {
3114 var item = navItems[i];
3115 var link = item.querySelector('a');
3116 item.classList.remove('current');
3117 if (link && link.getAttribute('href') === currentHash) {
3118 item.classList.add('current');
3119 }
3120 }
3121
3122 if (currentHash) {
3123 var target = document.querySelector(currentHash);
3124 if (target) {
3125 target.scrollIntoView();
3126 }
3127 }
3128}
3129updateNavHighlight();
3130window.addEventListener('hashchange', updateNavHighlight);
3131</script>
3132 )js");
3133}
3134
3135static void writeMemberIndex(OutputList &ol,
3136 const Index::MemberIndexMap &map, QCString fullName,bool multiPage)
3137{
3138 bool first=true;
3139 ol.writeString("<br/>\n");
3140 QCString alphaLinks = "<div class=\"qindex\">";
3141 StringMap usedLetters;
3142 for (const auto &[letter,list] : map)
3143 {
std::map< std::string, std::string > StringMap
Definition containers.h:30

Referenced by writeClassMemberIndex(), and writeModuleMemberIndex().

◆ writeMemberList()

void writeMemberList ( OutputList & ol,
bool useSections,
const std::string & page,
const Index::MemberIndexMap & memberIndexMap,
Definition::DefType type )
static

Definition at line 2770 of file index.cpp.

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

References ASSERT, QCString::at(), convertToId(), QCString::data(), OutputList::docify(), OutputList::endItemList(), OutputList::endItemListItem(), OutputList::endSection(), FALSE, getPrefixIndex(), QCString::isEmpty(), letterToLabel(), OutputList::startItemList(), OutputList::startItemListItem(), OutputList::startSection(), SectionType::Subsection, TRUE, Definition::TypeModule, writeClassLinkForMember(), writeFileLinkForMember(), writeModuleLinkForMember(), and writeNamespaceLinkForMember().

◆ writeMemberToIndex()

void writeMemberToIndex ( const Definition * def,
const MemberDef * md,
bool addToIndex )
static

Definition at line 470 of file index.cpp.

471{
472 bool isAnonymous = md->isAnonymous();
473 const MemberVector &enumList = md->enumFieldList();
474 bool isDir = md->isEnumerate() && std::any_of(enumList.begin(),enumList.end(),[](const auto &emd) { return emd->hasDocumentation(); });
475 auto defType = def->definitionType();
476 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
477 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
478 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
479 md->qualifiedName() : md->name();
480 if (md->toAnonymousMember())
481 {
483 }
484 if (md->getOuterScope()==def ||
485 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
487 {
488 Doxygen::indexList->addContentsItem(isDir,
489 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
490 }
491 else // inherited member
492 {
493 Doxygen::indexList->addContentsItem(isDir,
494 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
495 }
496 if (isDir)
497 {
498 if (!isAnonymous)
499 {
500 Doxygen::indexList->incContentsDepth();
501 }
502 for (const auto &emd : enumList)
503 {
504 if (emd->hasDocumentation())
505 {
506 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
507 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
508 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
509 emd->qualifiedName() : emd->name();
510 if (emd->getOuterScope()==def ||
511 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
512 emd->getOuterScope()==Doxygen::globalScope)
513 {
514 Doxygen::indexList->addContentsItem(FALSE,
515 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
516 }
517 else // inherited member
518 {
519 Doxygen::indexList->addContentsItem(FALSE,
520 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
521 }
522 }
523 }
524 if (!isAnonymous)
525 {
526 Doxygen::indexList->decContentsDepth();
527 }
528 }
529}
virtual QCString qualifiedName() const =0
virtual GroupDef * getGroupDef()=0
virtual const MemberVector & enumFieldList() const =0
virtual QCString anonymousMemberPrefix() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0
virtual MemberDef * toAnonymousMember() const =0
iterator end() noexcept
Definition memberlist.h:56
iterator begin() noexcept
Definition memberlist.h:54

References Definition::anchor(), MemberDef::anonymousMemberPrefix(), MemberVector::begin(), Definition::definitionType(), MemberVector::end(), MemberDef::enumFieldList(), FALSE, MemberDef::getGroupDef(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::globalScope, Doxygen::indexList, Definition::isAnonymous(), MemberDef::isEnumerate(), Definition::name(), QCString::prepend(), Definition::qualifiedName(), MemberDef::toAnonymousMember(), Definition::TypeFile, and Definition::TypeModule.

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5806 of file index.cpp.

5810 {
5811 auto numDoc = [](std::size_t i) {
5813 };
5814 auto memList = [](std::size_t i) {
5816 };
5817 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5818 }
5819 else // recursive into child list
5820 {
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:134
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:143

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4575 of file index.cpp.

4577{
4578 if (ftv)
4579 {
4580 ol.pushGeneratorState();
4582 }
4583 startIndexHierarchy(ol,0);
4584 for (const auto &mod : ModuleManager::instance().modules())
4585 {
4586 if (mod->isPrimaryInterface())
4587 {
4588 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4589 }
4590 }
4591 endIndexHierarchy(ol,0);
4592 if (ftv)
4593 {
4594 ol.popGeneratorState();
4595 }
4596}
4597
4598//----------------------------------------------------------------------------
4599
4600static void writeModuleIndex(OutputList &ol)
4601{
4602 if (ModuleManager::instance().numDocumentedModules()==0) return;
4603 ol.pushGeneratorState();
4604 // 1.{
4605
4608 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4609 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4610 QCString title = lne ? lne->title() : theTranslator->trModules();
4611 bool addToIndex = lne==nullptr || lne->visible();
4612
4613 startFile(ol,"modules",false,QCString(),title,HighlightedItem::Modules);
4614 startTitle(ol,QCString());
4615 ol.parseText(title);
4616 endTitle(ol,QCString(),QCString());
4617 ol.startContents();
4618 ol.startTextBlock();
4619 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4620 ol.endTextBlock();
4621
4622 // ---------------
4623 // Normal group index for Latex/RTF
4624 // ---------------
4625 // 2.{
4626 ol.pushGeneratorState();
4628 Doxygen::indexList->disable();
4629
4630 writeModuleList(ol,nullptr,FALSE);
4631
4632 Doxygen::indexList->enable();
4633 ol.popGeneratorState();
4634 // 2.}
4635
4636 // ---------------
4637 // interactive group index for HTML
4638 // ---------------
4639 // 2.{
static ModuleManager & instance()
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4497

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 QCString & separator,
QCString & prevModuleName )
static

Definition at line 2755 of file index.cpp.

2757{
2758 const ModuleDef *mod=md->getModuleDef();
2759 if (mod && prevModuleName!=mod->displayName())
2760 {
2761 ol.writeString(separator);
2762 // link to the member declaration in the module page
2763 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2764 mod->displayName());
2765 prevModuleName = mod->displayName();
2766 }
2767}
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 4551 of file index.cpp.

4556 {
4557 Doxygen::indexList->incContentsDepth();
4558 }
4559 if (isDir)
4560 {
4561 //ftv->incContentsDepth();
4562 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4563 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4564 writeModuleMembers(mod,addToIndex);
4565 //ftv->decContentsDepth();
4566 }
4567 if (addToIndex && isDir)
4568 {
4569 Doxygen::indexList->decContentsDepth();
4570 }
4571 ol.endIndexListItem();
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1850

Referenced by writeConceptList().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3866 of file index.cpp.

3870 : theTranslator->trModuleMembersDescriptionTotal(hl));
3871 ol.endTextBlock();
3872 if (dynamicMenus || disableIndex)
3873 {
3874 writeMemberIndex(ol,index.isModuleIndexLetterUsed(hl),getMmhlInfo(hl)->fname,multiPageIndex);
3875 }
3876
3877 writeMemberList(ol,quickIndex,
3878 multiPageIndex ? letter : std::string(),
3879 index.isModuleIndexLetterUsed(hl),
3881 endFile(ol);
3882 first=FALSE;
3883 }
3884 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3885 ol.popGeneratorState();
3886}
3887

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

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3734 of file index.cpp.

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

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

Referenced by writeExampleIndex().

◆ writeModuleMembers()

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

Definition at line 1850 of file index.cpp.

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

4507 {
4508 Doxygen::indexList->decContentsDepth();
4509 }
4510 }
4511 ol.popGeneratorState();
4512 // 2.}
4513
4514 endFile(ol);
4515 ol.popGeneratorState();
4516 // 1.}
4517}
4518
4519
4520//----------------------------------------------------------------------------
4521
4522static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod,
4523 FTVHelp* ftv, bool addToIndex)
4524{
4525 int visibleMembers = mod->countVisibleMembers();
4526 bool isDir=visibleMembers>0;
4527 if (addToIndex)
4528 {
4529 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4530 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4531 }
4532 if (ftv)
4533 {
4534 ftv->addContentsItem(false,mod->name(),
4535 mod->getReference(),mod->getOutputFileBase(),QCString(),
4536 false,false,mod);
4537 }
4538 ol.startIndexListItem();
4540 ol.generateDoc(mod->getDefFileName(),
4541 mod->getDefLine(),
4542 mod,
4543 nullptr,
4544 mod->qualifiedName(),
4545 DocOptions()
4546 .setSingleLine(true)
4547 .setAutolinkSupport(false));
virtual int countVisibleMembers() const =0

References Doxygen::indexList, and TRUE.

Referenced by writeModuleIndex().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2058 of file index.cpp.

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

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endIndexKey(), OutputList::endIndexList(), OutputList::endIndexValue(), OutputList::endTextBlock(), endTitle(), FALSE, LayoutNavEntry::find(), OutputList::generateDoc(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Man, Doxygen::namespaceLinkedMap, Namespaces, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), qstrlen(), QCString::replace(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexKey(), OutputList::startIndexList(), OutputList::startIndexValue(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeNamespaceTree(), OutputList::writeObjectLink(), and OutputList::writeString().

◆ writeNamespaceLinkForMember()

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

Definition at line 2742 of file index.cpp.

2744{
2745 const NamespaceDef *nd=md->getNamespaceDef();
2746 if (nd && prevNamespaceName!=nd->displayName())
2747 {
2748 ol.writeString(separator);
2750 nd->displayName());
2751 prevNamespaceName = nd->displayName();
2752 }
2753}

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

3683 {
3684 ol.writeString("<div id=\"container\">\n");
3685 ol.writeString("<div id=\"doc-content\">\n");
3686 }
3687 }
3688 ol.writeSearchInfo();
3689
3690 ol.startContents();
3691
3692 ol.startTextBlock();
3693 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3694 ol.endTextBlock();
3695
3696 writeMemberList(ol,quickIndex,
3697 multiPageIndex ? letter : std::string(),
3698 index.isNamespaceIndexLetterUsed(hl),
3700 endFile(ol);
3701 first=FALSE;
3702 }
3703 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3704 ol.popGeneratorState();
3705}
3706

References OutputList::writeString().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3557 of file index.cpp.

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

References Config_getBool, and theTranslator.

◆ writeNamespaceMembers()

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

Definition at line 1824 of file index.cpp.

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

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1941 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1881 of file index.cpp.

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

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

Referenced by writeNamespaceTree(), and writeNamespaceTree().

◆ writePageIndex()

void writePageIndex ( OutputList & ol)
static

Definition at line 4034 of file index.cpp.

4038 {
4039 Doxygen::indexList->incContentsDepth();
4040 }
4041 if (hasSections)
4042 {
4043 pd->addSectionsToIndex();
4044 }
4045 for (const auto &subPage : pd->getSubPages())
4046 {
4047 writePages(subPage,ftv);
4048 }
4049 if (hasSubPages && ftv) ftv->decContentsDepth();
4050 if (doIndent)
4051 {
4052 Doxygen::indexList->decContentsDepth();
4053 }
4054 //printf("end writePages()=%s\n",qPrint(pd->title()));
4055}
4056
4057//----------------------------------------------------------------------------
4058
4059static void writePageIndex(OutputList &ol)
4060{
4061 if (Index::instance().numIndexedPages()==0) return;
4062 ol.pushGeneratorState();
4064 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4065 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
4066 startFile(ol,"pages",false,QCString(),title,HighlightedItem::Pages);
4067 startTitle(ol,QCString());
4068 ol.parseText(title);
4069 endTitle(ol,QCString(),QCString());
4070 ol.startContents();
4071 ol.startTextBlock();
4072 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());

◆ writePages()

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

Definition at line 3974 of file index.cpp.

3982{
3983 docPages=indexPages=0;
3984 for (const auto &pd : *Doxygen::pageLinkedMap)
3985 {
3986 if (pd->visibleInIndex() && !pd->hasParentPage())
3987 {
3988 indexPages++;
3989 }
3990 if (pd->documentedPage())
3991 {
3992 docPages++;
3993 }
3994 }
3995}
3996
3997//----------------------------------------------------------------------------
3998
3999static void writePages(PageDef *pd,FTVHelp *ftv,bool reuseRoot = false)
4000{
4001 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
4002 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
4003 bool addToIndex = lne==nullptr || lne->visible();
4004 if (!addToIndex) return;
4005
4006 bool hasSubPages = pd->hasSubPages();
4007 bool hasSections = pd->hasSections();
4008
4009 if (pd->visibleInIndex())
4010 {
4011 QCString pageTitle, pageTitleAsHtml;
4012
4013 if (pd->title().isEmpty())
4014 pageTitle=pd->name();
4015 else
4016 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4017 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4018
4019 if (ftv)
4020 {
4021 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4022 ftv->addContentsItem(
4023 hasSubPages,pageTitle,
4024 pd->getReference(),pd->getOutputFileBase(),
4025 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
4026 }
4027 if (addToIndex && pd!=Doxygen::mainPage.get())
4028 {
4029 Doxygen::indexList->addContentsItem(
4030 hasSubPages || hasSections,pageTitle,
virtual bool hasSections() const =0
A model of a page symbol.
Definition pagedef.h:26
virtual bool documentedPage() const =0
virtual bool hasParentPage() const =0
virtual bool visibleInIndex() const =0
virtual bool hasSubPages() const =0
virtual QCString title() const =0

◆ writeQuickMemberIndex()

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

Definition at line 3083 of file index.cpp.

3086{
3087 bool first=TRUE;
3089 for (const auto &[letter,list] : map)
3090 {
3091 QCString ci(letter);
3092 QCString is = letterToLabel(ci);
3093 QCString anchor;
3095 if (!multiPage)
3096 anchor="#index_";
3097 else if (first)
3098 anchor=fullName+extension+"#index_";
3099 else
3100 anchor=fullName+"_"+is+extension+"#index_";
3101 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3102 ol.writeString(ci);
3104 first=FALSE;
3105 }
3107 ol.writeString(R"js(
3108<script type="text/javascript">

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

◆ writeSingleFileIndex()

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

Definition at line 1501 of file index.cpp.

1502{
1503 //printf("Found filedef %s\n",qPrint(fd->name()));
1504 bool doc = fd->isLinkableInProject();
1505 bool src = fd->generateSourceFile();
1506 bool nameOk = !fd->isDocumentationFile();
1507 if (nameOk && (doc || src) && !fd->isReference())
1508 {
1509 QCString path;
1510 if (Config_getBool(FULL_PATH_NAMES))
1511 {
1512 path=stripFromPath(fd->getPath());
1513 }
1514 QCString fullName=fd->name();
1515 if (!path.isEmpty())
1516 {
1517 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1518 fullName.prepend(path);
1519 }
1520
1521 ol.startIndexKey();
1522 ol.docify(path);
1523 if (doc)
1524 {
1526 //if (addToIndex)
1527 //{
1528 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1529 //}
1530 }
1531 else if (src)
1532 {
1534 }
1535 if (doc && src)
1536 {
1537 ol.pushGeneratorState();
1539 ol.docify(" ");
1541 ol.docify("[");
1542 ol.parseText(theTranslator->trCode());
1543 ol.docify("]");
1544 ol.endTextLink();
1545 ol.popGeneratorState();
1546 }
1547 ol.endIndexKey();
1548 bool hasBrief = !fd->briefDescription().isEmpty();
1549 ol.startIndexValue(hasBrief);
1550 if (hasBrief)
1551 {
1552 ol.generateDoc(fd->briefFile(),
1553 fd->briefLine(),
1554 fd,
1555 nullptr,
1556 fd->briefDescription(true),
1557 DocOptions()
1558 .setSingleLine(true)
1559 .setLinkFromIndex(true));
1560 }
1561 if (doc)
1562 {
1563 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1564 }
1565 else // src
1566 {
1567 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1568 }
1569 //ol.popGeneratorState();
1570 // --------------------------------------------------------
1571 }
1572}
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getSourceFileBase() const =0
virtual QCString briefFile() const =0
virtual QCString includeName() const =0
virtual QCString getPath() const =0
virtual bool generateSourceFile() const =0
virtual bool isDocumentationFile() const =0
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:170
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:298

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

Referenced by writeFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4428 of file index.cpp.

4430{
4431 if (ftv)
4432 {
4433 ol.pushGeneratorState();
4435 }
4436 startIndexHierarchy(ol,0);
4437 for (const auto &gd : *Doxygen::groupLinkedMap)
4438 {
4439 if (gd->isVisibleInHierarchy())
4440 {
4441 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4442 }
4443 }
4444 endIndexHierarchy(ol,0);
4445 if (ftv)
4446 {
4447 ol.popGeneratorState();
4448 }
4449}
4450
4451//----------------------------------------------------------------------------
4452
4453static void writeTopicIndex(OutputList &ol)
4454{
4455 if (Index::instance().numDocumentedGroups()==0) return;
4456 ol.pushGeneratorState();
4457 // 1.{
4460 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4461 QCString title = lne ? lne->title() : theTranslator->trTopics();
4462 bool addToIndex = lne==nullptr || lne->visible();
4463
4464 startFile(ol,"topics",false,QCString(),title,HighlightedItem::Topics);
4465 startTitle(ol,QCString());
4466 ol.parseText(title);
4467 endTitle(ol,QCString(),QCString());
4468 ol.startContents();
4469 ol.startTextBlock();
4470 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4471 ol.endTextBlock();
4472
4473 // ---------------
4474 // Normal group index for Latex/RTF
4475 // ---------------
4476 // 2.{
4477 ol.pushGeneratorState();
4479 Doxygen::indexList->disable();
4480
4481 writeGroupHierarchy(ol,nullptr,FALSE);
4482
4483 Doxygen::indexList->enable();
4484 ol.popGeneratorState();
4485 // 2.}
4486
4487 // ---------------
4488 // interactive group index for HTML
4489 // ---------------
4490 // 2.{
4491 ol.pushGeneratorState();
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4404

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

4853 {
4854 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4855 }
4856 writeConceptRootList(&ftv,addToIndex);
4857 TextStream t;
4858 ftv.generateTreeViewInline(t);
4859 ol.writeString(t.str());
4860 if (addToIndex)
4861 {
4862 Doxygen::indexList->decContentsDepth();
4863 }
4864 }
4865 ol.popGeneratorState();
4866 // 2.}
4867
4868 endFile(ol);
4869 ol.popGeneratorState();
4870 // 1.}
4871}
4872
4873//----------------------------------------------------------------------------
4874
4876{
4877 if (lne->baseFile().startsWith("usergroup"))
4878 {
4879 ol.pushGeneratorState();
4882 startTitle(ol,QCString());
bool startsWith(const char *s) const
Definition qcstring.h:511
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4727
QCString baseFile() const
Definition layout.h:214

Variable Documentation

◆ alphaSepar

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

Definition at line 58 of file index.cpp.

Referenced by getCmhlInfo(), and writeAlphabeticalClassList().

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5298 of file index.cpp.

◆ maxItemsBeforeQuickIndex

const int maxItemsBeforeQuickIndex = MAX_ITEMS_BEFORE_QUICK_INDEX

Definition at line 343 of file index.cpp.