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
class  AlphaIndexTableCell
 Class representing a cell in the alphabetical class index. More...
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 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 bool mainPageHasOwnTitle ()
static void writePages (PageDef *pd, FTVHelp *ftv)
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

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

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

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

References addMembersToIndex(), Config_getBool, 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 2120 of file index.cpp.

2121{
2122 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2123 int count=0;
2124 int countPrinted=0;
2125 for (const auto &cd : *Doxygen::classLinkedMap)
2126 {
2127 if (sliceOpt && cd->compoundType() != ct)
2128 {
2129 continue;
2130 }
2131 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2132 {
2133 if (!cd->isEmbeddedInOuterScope())
2134 {
2135 countPrinted++;
2136 }
2137 count++;
2138 }
2139 }
2140 *cp = countPrinted;
2141 return count;
2142}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1090 of file index.cpp.

1091{
1092 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1093 int count=0;
1094 for (const auto &cd : cl)
1095 {
1096 if (sliceOpt && cd->compoundType() != ct)
1097 {
1098 continue;
1099 }
1100 if (!classHasVisibleRoot(cd->baseClasses())) // filter on root classes
1101 {
1102 if (cd->isVisibleInHierarchy()) // should it be visible
1103 {
1104 if (!cd->subClasses().empty()) // should have sub classes
1105 {
1106 count++;
1107 }
1108 }
1109 }
1110 }
1111 return count;
1112}
bool classHasVisibleRoot(const BaseClassList &bcl)

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1114 of file index.cpp.

1115{
1116 int count=0;
1119 return count;
1120}
static ClassLinkedMap * hiddenClassLinkedMap
Definition doxygen.h:97
static int countClassesInTreeList(const ClassLinkedMap &cl, ClassDef::CompoundType ct)
Definition index.cpp:1090

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1705 of file index.cpp.

1706{
1707 int count=0;
1708 for (const auto &cd : *Doxygen::conceptLinkedMap)
1709 {
1710 if (cd->isLinkableInProject()) count++;
1711 }
1712 return count;
1713}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4037 of file index.cpp.

4038{
4039 int count=0;
4040 for (const auto &dd : *Doxygen::dirLinkedMap)
4041 {
4042 if (dd->isLinkableInProject())
4043 {
4044 count++;
4045 }
4046 }
4047 return count;
4048}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129

References Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1441 of file index.cpp.

1442{
1443 allFiles=0;
1444 docFiles=0;
1445 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1446 {
1447 for (const auto &fd: *fn)
1448 {
1449 bool src = false;
1450 bool doc = fileVisibleInIndex(fd.get(),src);
1451 if (doc || src)
1452 {
1453 allFiles++;
1454 }
1455 if (doc)
1456 {
1457 docFiles++;
1458 }
1459 }
1460 }
1461}
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
bool fileVisibleInIndex(const FileDef *fd, bool &genSourceFile)
Definition util.cpp:5999

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4021 of file index.cpp.

4022{
4023 int count=0;
4024 for (const auto &gd : *Doxygen::groupLinkedMap)
4025 {
4026 if (!gd->isReference())
4027 {
4028 //gd->visited=FALSE;
4029 count++;
4030 }
4031 }
4032 return count;
4033}
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1694 of file index.cpp.

1695{
1696 int count=0;
1697 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1698 {
1699 if (nd->isLinkableInProject()) count++;
1700 }
1701 return count;
1702}
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 3889 of file index.cpp.

3890{
3891 docPages=indexPages=0;
3892 for (const auto &pd : *Doxygen::pageLinkedMap)
3893 {
3894 if (pd->visibleInIndex() && !pd->hasParentPage())
3895 {
3896 indexPages++;
3897 }
3898 if (pd->documentedPage())
3899 {
3900 docPages++;
3901 }
3902 }
3903}
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 728 of file index.cpp.

729{
730 if (dd->hasDocumentation()) return TRUE;
731
732 for (const auto &fd : dd->getFiles())
733 {
734 bool genSourceFile = false;
735 if (fileVisibleInIndex(fd,genSourceFile))
736 {
737 return TRUE;
738 }
739 if (genSourceFile)
740 {
741 return TRUE;
742 }
743 }
744
745 for(const auto &subdd : dd->subDirs())
746 {
747 if (dirHasVisibleChildren(subdd))
748 {
749 return TRUE;
750 }
751 }
752 return FALSE;
753}
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:728
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34

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

429{
430 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
433 if (!skipNavIndex)
434 {
435 if (!skipEndContents) ol.endContents();
436 if (generateTreeView)
437 {
438 ol.writeString("</div><!-- doc-content -->\n");
439 ol.writeString("</div><!-- container -->\n");
440 }
441 }
442
443 ol.writeFooter(navPath); // write the footer
445 ol.endFile();
446}
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(), writeClassMemberIndexFiltered(), writeConceptIndex(), writeDirIndex(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeExampleIndex(), writeFileIndex(), writeFileMemberIndexFiltered(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeGraphInfo(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), writeIndex(), ClassDefImpl::writeMemberList(), writeModuleIndex(), writeModuleMemberIndexFiltered(), writeNamespaceIndex(), writeNamespaceMemberIndexFiltered(), writePageIndex(), writeTopicIndex(), and writeUserGroupStubPage().

◆ endFileWithNavPath()

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

Definition at line 448 of file index.cpp.

449{
450 bool generateTreeview = Config_getBool(GENERATE_TREEVIEW);
451 bool generateOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
452 QCString navPath;
453 if (generateTreeview)
454 {
457 ol.writeString("</div><!-- doc-content -->\n");
458 if (generateOutlinePanel && showPageNavigation) d->writePageNavigation(ol);
459 ol.writeString("</div><!-- container -->\n");
461 navPath = toDefinition(const_cast<DefinitionMutable*>(d))->navigationPathAsString();
462 }
463 endFile(ol,generateTreeview,TRUE,navPath);
464}
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:427

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

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1718 of file index.cpp.

1718{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1719 of file index.cpp.

1719{ 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 3100 of file index.cpp.

3101{
3102 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3103 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3104 static CmhlInfo cmhlInfo[] =
3105 {
3106 CmhlInfo("functions", theTranslator->trAll()),
3107 CmhlInfo("functions_func",
3108 fortranOpt ? theTranslator->trSubprograms() :
3109 vhdlOpt ? theTranslator->trFunctionAndProc() :
3110 theTranslator->trFunctions()),
3111 CmhlInfo("functions_vars",theTranslator->trVariables()),
3112 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3113 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3114 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3115 CmhlInfo("functions_prop",theTranslator->trProperties()),
3116 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3117 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3118 };
3119 return &cmhlInfo[hl];
3120}
Translator * theTranslator
Definition language.cpp:71
Helper class representing a class member in the navigation menu.
Definition index.cpp:3094

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeClassMemberIndexFiltered().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3288 of file index.cpp.

3289{
3290 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3291 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3292 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3293 static FmhlInfo fmhlInfo[] =
3294 {
3295 FmhlInfo("globals", theTranslator->trAll()),
3296 FmhlInfo("globals_func",
3297 fortranOpt ? theTranslator->trSubprograms() :
3298 vhdlOpt ? theTranslator->trFunctionAndProc() :
3299 theTranslator->trFunctions()),
3300 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3301 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3302 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3303 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3304 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3305 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3306 FmhlInfo("globals_defs",theTranslator->trDefines())
3307 };
3308 return &fmhlInfo[hl];
3309}
Helper class representing a file member in the navigation menu.
Definition index.cpp:3282

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3655 of file index.cpp.

3656{
3657 static MmhlInfo nmhlInfo[] =
3658 {
3659 MmhlInfo("modulemembers", theTranslator->trAll()),
3660 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3661 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3662 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3663 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3664 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3665 };
3666 return &nmhlInfo[hl];
3667}
Helper class representing a module member in the navigation menu.
Definition index.cpp:3649

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3470 of file index.cpp.

3471{
3472 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3473 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3474 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3475 static NmhlInfo nmhlInfo[] =
3476 {
3477 NmhlInfo("namespacemembers", theTranslator->trAll()),
3478 NmhlInfo("namespacemembers_func",
3479 fortranOpt ? theTranslator->trSubprograms() :
3480 vhdlOpt ? theTranslator->trFunctionAndProc() :
3481 theTranslator->trFunctions()),
3482 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3483 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3484 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3485 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3486 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3487 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3488 };
3489 return &nmhlInfo[hl];
3490}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3464

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2216 of file index.cpp.

2217{
2218 return (c<127 && c>31); // printable ASCII character
2219}

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2221 of file index.cpp.

2222{
2223 if (startLetter.isEmpty()) return startLetter;
2224 const char *p = startLetter.data();
2225 char c = *p;
2226 QCString result;
2227 if (isId1(c))
2228 {
2229 result+=c;
2230 }
2231 else
2232 {
2233 result="0x";
2234 const char hex[]="0123456789abcdef";
2235 while ((c=*p++))
2236 {
2237 result+=hex[static_cast<unsigned char>(c)>>4];
2238 result+=hex[static_cast<unsigned char>(c)&0xf];
2239 }
2240 }
2241 return result;
2242}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
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:172
static constexpr auto hex
bool isId1(int c)
Definition index.cpp:2216

References QCString::data(), hex, QCString::isEmpty(), and isId1().

Referenced by renderMemberIndicesAsJs(), writeAlphabeticalClassList(), writeClassMemberIndexFiltered(), writeFileMemberIndexFiltered(), writeMemberList(), writeModuleMemberIndexFiltered(), writeNamespaceMemberIndexFiltered(), and writeQuickMemberIndex().

◆ mainPageHasOwnTitle()

bool mainPageHasOwnTitle ( )
static

Definition at line 3907 of file index.cpp.

3908{
3909 QCString projectName = Config_getString(PROJECT_NAME);
3910 QCString title;
3912 {
3913 title = filterTitle(Doxygen::mainPage->title());
3914 }
3915 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3916}
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
#define Config_getString(name)
Definition config.h:32
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:447
bool mainPageHasTitle()
Definition util.cpp:6194
QCString filterTitle(const QCString &title)
Definition util.cpp:5526

References Config_getString, filterTitle(), QCString::isEmpty(), Doxygen::mainPage, mainPageHasTitle(), and qstricmp().

Referenced by writePages().

◆ MemberIndexMap_add()

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

Definition at line 180 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5560 of file index.cpp.

5561{
5562 const auto &index = Index::instance();
5563 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5564 bool showFiles = Config_getBool(SHOW_FILES);
5565 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5566 switch (kind)
5567 {
5568 case LayoutNavEntry::MainPage: return TRUE;
5569 case LayoutNavEntry::User: return TRUE;
5570 case LayoutNavEntry::UserGroup: return TRUE;
5571 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5572 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5573 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5574 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5575 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5576 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5577 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5578 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5579 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5580 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5581 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5582 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5583 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5584 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5585 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5586 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5587 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5588 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5589 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5590 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5591 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5592 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5593 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5594 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5595 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5596 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5597 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5598 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5599 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5600 case LayoutNavEntry::None: // should never happen, means not properly initialized
5601 assert(kind != LayoutNavEntry::None);
5602 return FALSE;
5603 }
5604 return FALSE;
5605}
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:99
static Index & instance()
Definition index.cpp:106

References ClassMemberHighlight::All, FileMemberHighlight::All, ModuleMemberHighlight::All, NamespaceMemberHighlight::All, Config_getBool, Doxygen::exampleLinkedMap, FALSE, Index::instance(), and TRUE.

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

5613{
5614 // index items per category member lists
5615 bool firstMember=TRUE;
5616 for (std::size_t i=0;i<total;i++)
5617 {
5618 if (numDocumented(i)>0)
5619 {
5620 t << ",";
5621 if (firstMember)
5622 {
5623 t << "children:[";
5624 firstMember=FALSE;
5625 }
5626 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5627 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5628
5629 // Check if we have many members, then add sub entries per letter...
5630 // quick alphabetical index
5631 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5632 if (quickIndex)
5633 {
5634 bool multiPageIndex=FALSE;
5635 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5636 {
5637 multiPageIndex=TRUE;
5638 }
5639 t << ",children:[\n";
5640 bool firstLetter=TRUE;
5641 for (const auto &[letter,list] : getMemberList(i))
5642 {
5643 if (!firstLetter) t << ",\n";
5644 QCString ci(letter);
5645 QCString is(letterToLabel(ci));
5646 QCString anchor;
5648 QCString fullName = getInfo(i)->fname;
5649 if (!multiPageIndex || firstLetter)
5650 anchor=fullName+extension+"#index_";
5651 else // other pages of multi page index
5652 anchor=fullName+"_"+is+extension+"#index_";
5653 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5654 << convertToJSString(anchor+convertToId(is)) << "\"}";
5655 firstLetter=FALSE;
5656 }
5657 t << "]";
5658 }
5659 t << "}";
5660 }
5661 }
5662 if (!firstMember)
5663 {
5664 t << "]";
5665 }
5666}
static QCString htmlFileExtension
Definition doxygen.h:122
#define MAX_ITEMS_BEFORE_MULTIPAGE_INDEX
Definition index.cpp:55
const int maxItemsBeforeQuickIndex
Definition index.cpp:341
static QCString letterToLabel(const QCString &startLetter)
Definition index.cpp:2221
QCString convertToJSString(const QCString &s, bool keepEntities, bool singleQuotes)
Definition util.cpp:3944
QCString convertToId(const QCString &s)
Definition util.cpp:3793

References convertToId(), convertToJSString(), FALSE, Doxygen::htmlFileExtension, letterToLabel(), MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, and TRUE.

Referenced by renderQuickLinksAsJs().

◆ renderQuickLinksAsJs()

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

Definition at line 5668 of file index.cpp.

5669{
5670 int count=0;
5671 for (const auto &entry : root->children())
5672 {
5673 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5674 }
5675 if (count>0) // at least one item is visible
5676 {
5677 bool firstChild = TRUE;
5678 if (!first) t << ",";
5679 t << "children:[\n";
5680 for (const auto &entry : root->children())
5681 {
5682 if (entry->visible() && quickLinkVisible(entry->kind()))
5683 {
5684 if (!firstChild) t << ",\n";
5685 firstChild=FALSE;
5686 QCString url = entry->url();
5687 if (isURL(url)) url = "^" + url;
5688 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5689 << convertToJSString(url) << "\"";
5690 bool hasChildren=FALSE;
5691 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5692 {
5693 auto numDoc = [](std::size_t i) {
5695 };
5696 auto memList = [](std::size_t i) {
5698 };
5699 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5700 }
5701 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5702 {
5703 auto numDoc = [](std::size_t i) {
5705 };
5706 auto memList = [](std::size_t i) {
5708 };
5709 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5710 }
5711 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5712 {
5713 auto numDoc = [](std::size_t i) {
5715 };
5716 auto memList = [](std::size_t i) {
5718 };
5719 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5720 }
5721 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5722 {
5723 auto numDoc = [](std::size_t i) {
5725 };
5726 auto memList = [](std::size_t i) {
5728 };
5729 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5730 }
5731 else // recursive into child list
5732 {
5733 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5734 }
5735 if (hasChildren) t << "]";
5736 t << "}";
5737 }
5738 }
5739 }
5740 return count>0;
5741}
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
Definition index.cpp:136
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:131
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:134
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:132
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:141
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:151
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:146
static bool quickLinkVisible(LayoutNavEntry::Kind kind)
Definition htmlgen.cpp:2790
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5668
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:5608
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3288
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3655
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3470
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3100
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:5825

References LayoutNavEntry::children(), convertToJSString(), FALSE, getCmhlInfo(), getFmhlInfo(), getMmhlInfo(), getNmhlInfo(), Index::instance(), Index::isClassIndexLetterUsed(), Index::isFileIndexLetterUsed(), Index::isModuleIndexLetterUsed(), Index::isNamespaceIndexLetterUsed(), isURL(), Index::numDocumentedClassMembers(), Index::numDocumentedFileMembers(), Index::numDocumentedModuleMembers(), Index::numDocumentedNamespaceMembers(), quickLinkVisible(), renderMemberIndicesAsJs(), renderQuickLinksAsJs(), ClassMemberHighlight::Total, FileMemberHighlight::Total, ModuleMemberHighlight::Total, NamespaceMemberHighlight::Total, and TRUE.

Referenced by renderQuickLinksAsJs(), and writeMenuData().

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

404{
405 bool disableIndex = Config_getBool(DISABLE_INDEX);
406 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
407 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
408 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
409 ol.startFile(name,isSource,manName,title,hierarchyLevel);
411 if (!disableIndex && !quickLinksAfterSplitbar)
412 {
413 ol.writeQuickLinks(hli,name);
414 }
415 if (!additionalIndices)
416 {
417 ol.endQuickIndices();
418 }
419 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name, allMembersFile);
420 if (quickLinksAfterSplitbar)
421 {
422 ol.writeQuickLinks(hli,name);
423 }
424 ol.writeSearchInfo();
425}
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(), writeConceptIndex(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), DirRelation::writeDocumentation(), FileDefImpl::writeDocumentation(), GroupDefImpl::writeDocumentation(), ModuleDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), PageDefImpl::writeDocumentation(), MemberList::writeDocumentationPage(), writeExampleIndex(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeGraphInfo(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeModuleIndex(), writeNamespaceIndex(), writePageIndex(), FileDefImpl::writeSourceHeader(), writeTopicIndex(), and writeUserGroupStubPage().

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 364 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeClassMemberIndexFiltered(), writeFileMemberIndexFiltered(), writeModuleMemberIndexFiltered(), writeNamespaceMemberIndexFiltered(), and writeQuickMemberIndex().

◆ startQuickIndexList()

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

Definition at line 345 of file index.cpp.

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

References FALSE, and OutputList::writeString().

Referenced by writeClassMemberIndexFiltered(), writeFileMemberIndexFiltered(), writeModuleMemberIndexFiltered(), writeNamespaceMemberIndexFiltered(), and writeQuickMemberIndex().

◆ startTitle()

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

Definition at line 384 of file index.cpp.

385{
386 bool generateOutlinePanel = Config_getBool(GENERATE_TREEVIEW) && Config_getBool(PAGE_OUTLINE_PANEL);
388 if (!generateOutlinePanel && def) def->writeSummaryLinks(ol);
389 ol.startTitleHead(fileName);
392}
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(), writeConceptIndex(), writeDirIndex(), ClassDefImpl::writeDocumentation(), ConceptDefImpl::writeDocumentation(), DirDefImpl::writeDocumentation(), FileDefImpl::writeDocumentation(), NamespaceDefImpl::writeDocumentation(), writeExampleIndex(), writeFileIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeGraphInfo(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), ClassDefImpl::writeMemberList(), writeModuleIndex(), writeNamespaceIndex(), writePageIndex(), FileDefImpl::writeSourceHeader(), writeTopicIndex(), and writeUserGroupStubPage().

◆ writeAlphabeticalClassList()

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

Definition at line 2270 of file index.cpp.

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

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

2514{
2515 if (Index::instance().numAnnotatedExceptions()==0) return;
2516 ol.pushGeneratorState();
2518 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2519 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2520 bool addToIndex = lne==nullptr || lne->visible();
2521
2522 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2523
2524 startTitle(ol,QCString());
2525 ol.parseText(title);
2526 endTitle(ol,QCString(),QCString());
2527
2528 if (addToIndex)
2529 {
2530 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2531 }
2532
2533 ol.startContents();
2534 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2535 endFile(ol); // contains ol.endContents()
2536
2537 ol.popGeneratorState();
2538}
@ Exception
Definition classdef.h:115
LayoutNavEntry * rootNavEntry() const
returns the (invisible) root of the navigation tree.
Definition layout.cpp:1446
void startContents()
Definition outputlist.h:618
void parseText(const QCString &textStr)
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def)
Definition index.cpp:384
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:394
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:401
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2270
Base class for the layout of a navigation item at the top of the HTML pages.
Definition layout.h:156
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().

Referenced by writeIndexHierarchyEntries().

◆ writeAlphabeticalIndex()

void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2426 of file index.cpp.

2427{
2428 if (Index::instance().numAnnotatedClasses()==0) return;
2429 ol.pushGeneratorState();
2431 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2432 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2433 bool addToIndex = lne==nullptr || lne->visible();
2434
2435 startFile(ol,"classes",false,QCString(),title,HighlightedItem::Classes);
2436
2437 startTitle(ol,QCString());
2438 ol.parseText(title);
2439 endTitle(ol,QCString(),QCString());
2440
2441 if (addToIndex)
2442 {
2443 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2444 }
2445
2446 ol.startContents();
2447 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2448 endFile(ol); // contains ol.endContents()
2449
2450 ol.popGeneratorState();
2451}

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().

Referenced by writeIndexHierarchyEntries().

◆ writeAlphabeticalInterfaceIndex()

void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2455 of file index.cpp.

2456{
2457 if (Index::instance().numAnnotatedInterfaces()==0) return;
2458 ol.pushGeneratorState();
2460 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2461 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2462 bool addToIndex = lne==nullptr || lne->visible();
2463
2464 startFile(ol,"interfaces",false,QCString(),title,HighlightedItem::Interfaces);
2465
2466 startTitle(ol,QCString());
2467 ol.parseText(title);
2468 endTitle(ol,QCString(),QCString());
2469
2470 if (addToIndex)
2471 {
2472 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2473 }
2474
2475 ol.startContents();
2476 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2477 endFile(ol); // contains ol.endContents()
2478
2479 ol.popGeneratorState();
2480}
@ 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().

Referenced by writeIndexHierarchyEntries().

◆ writeAlphabeticalStructIndex()

void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2484 of file index.cpp.

2485{
2486 if (Index::instance().numAnnotatedStructs()==0) return;
2487 ol.pushGeneratorState();
2489 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2490 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2491 bool addToIndex = lne==nullptr || lne->visible();
2492
2493 startFile(ol,"structs",false,QCString(),title,HighlightedItem::Structs);
2494
2495 startTitle(ol,QCString());
2496 ol.parseText(title);
2497 endTitle(ol,QCString(),QCString());
2498
2499 if (addToIndex)
2500 {
2501 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2502 }
2503
2504 ol.startContents();
2505 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2506 endFile(ol); // contains ol.endContents()
2507
2508 ol.popGeneratorState();
2509}

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().

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedClassList()

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

Definition at line 2145 of file index.cpp.

2146{
2147 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2148 //bool addToIndex = lne==nullptr || lne->visible();
2149 bool first=TRUE;
2150
2151 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2152
2153 for (const auto &cd : *Doxygen::classLinkedMap)
2154 {
2155 if (cd->getLanguage()==SrcLangExt::VHDL &&
2156 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2158 ) // no architecture
2159 {
2160 continue;
2161 }
2162 if (first)
2163 {
2164 ol.startIndexList();
2165 first=FALSE;
2166 }
2167
2168 if (sliceOpt && cd->compoundType() != ct)
2169 {
2170 continue;
2171 }
2172
2173 ol.pushGeneratorState();
2174 if (cd->isEmbeddedInOuterScope())
2175 {
2179 }
2180 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2181 {
2182 ol.startIndexKey();
2183 if (cd->getLanguage()==SrcLangExt::VHDL)
2184 {
2186 ol.docify(prot);
2187 ol.writeString(" ");
2188 }
2189 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2190 ol.endIndexKey();
2191 bool hasBrief = !cd->briefDescription().isEmpty();
2192 ol.startIndexValue(hasBrief);
2193 if (hasBrief)
2194 {
2195 ol.generateDoc(cd->briefFile(),
2196 cd->briefLine(),
2197 cd.get(),
2198 nullptr,
2199 cd->briefDescription(true),
2200 DocOptions()
2201 .setSingleLine(true)
2202 .setLinkFromIndex(true));
2203 }
2204 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2205
2206 //if (addToIndex)
2207 //{
2208 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2209 //}
2210 }
2211 ol.popGeneratorState();
2212 }
2213 if (!first) ol.endIndexList();
2214}
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 2684 of file index.cpp.

2685{
2686 const auto &index = Index::instance();
2688 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2689 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2690 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2692 "annotatedexceptions",
2694}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2567
@ AnnotatedExceptions
Definition index.h:76

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndex()

void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2642 of file index.cpp.

2643{
2644 const auto &index = Index::instance();
2646 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2647 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2648 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2650 "annotated",
2652}
@ AnnotatedClasses
Definition index.h:73

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2567 of file index.cpp.

2568{
2569 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2570 // annotatedClasses,annotatedClassesPrinted);
2571 if (ctx.numAnnotated==0) return;
2572
2573 ol.pushGeneratorState();
2575 if (ctx.numPrinted==0)
2576 {
2579 }
2581 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2582 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2583 bool addToIndex = lne==nullptr || lne->visible();
2584
2585 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2586
2587 startTitle(ol,QCString());
2588 ol.parseText(title);
2589 endTitle(ol,QCString(),QCString());
2590
2591 ol.startContents();
2592
2593 ol.startTextBlock();
2594 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2595 ol.endTextBlock();
2596
2597 // ---------------
2598 // Linear class index for Latex/RTF
2599 // ---------------
2600 ol.pushGeneratorState();
2602 Doxygen::indexList->disable();
2603
2605
2606 Doxygen::indexList->enable();
2607 ol.popGeneratorState();
2608
2609 // ---------------
2610 // Hierarchical class index for HTML
2611 // ---------------
2612 ol.pushGeneratorState();
2614
2615 {
2616 if (addToIndex)
2617 {
2618 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2619 Doxygen::indexList->incContentsDepth();
2620 }
2621 FTVHelp ftv(false);
2624 TextStream t;
2625 ftv.generateTreeViewInline(t);
2626 ol.writeString(t.str());
2627 if (addToIndex)
2628 {
2629 Doxygen::indexList->decContentsDepth();
2630 }
2631 }
2632
2633 ol.popGeneratorState();
2634 // ------
2635
2636 endFile(ol); // contains ol.endContents()
2637 ol.popGeneratorState();
2638}
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
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229
static void writeAnnotatedClassList(OutputList &ol, ClassDef::CompoundType ct)
Definition index.cpp:2145
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2001
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1722
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2559
const ClassDef::CompoundType compoundType
Definition index.cpp:2562
const HighlightedItem hiItem
Definition index.cpp:2564
const QCString fileBaseName
Definition index.cpp:2563
const LayoutNavEntry::Kind listKind
Definition index.cpp:2558
const QCString listDefaultTitleText
Definition index.cpp:2560
const int numAnnotated
Definition index.cpp:2556
const QCString listDefaultIntroText
Definition index.cpp:2561
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 2656 of file index.cpp.

2657{
2658 const auto &index = Index::instance();
2660 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2661 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2662 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2664 "annotatedinterfaces",
2666}
@ AnnotatedInterfaces
Definition index.h:74

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedStructIndex()

void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2670 of file index.cpp.

2671{
2672 const auto &index = Index::instance();
2674 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2675 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2676 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2678 "annotatedstructs",
2680}
@ AnnotatedStructs
Definition index.h:75

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

Referenced by writeIndexHierarchyEntries().

◆ writeClassHierarchy()

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

Definition at line 1063 of file index.cpp.

1064{
1065 ClassDefSet visitedClasses;
1066 if (ftv)
1067 {
1068 ol.pushGeneratorState();
1070 }
1071 bool started=FALSE;
1072 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1073 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1074 if (started)
1075 {
1076 endIndexHierarchy(ol,0);
1077 if (addToIndex)
1078 {
1079 Doxygen::indexList->decContentsDepth();
1080 }
1081 }
1082 if (ftv)
1083 {
1084 ol.popGeneratorState();
1085 }
1086}
std::unordered_set< const ClassDef * > ClassDefSet
Definition classdef.h:95
static void endIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:323
static void writeClassTreeForList(OutputList &ol, const ClassLinkedMap &cl, bool &started, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct, ClassDefSet &visitedClasses)
Definition index.cpp:964

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

2699{
2700 const ClassDef *cd=md->getClassDef();
2701 if ( cd && prevClassName!=cd->displayName())
2702 {
2703 ol.writeString(separator);
2705 cd->displayName());
2706 prevClassName = cd->displayName();
2707 }
2708}
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 3251 of file index.cpp.

3252{
3253 const auto &index = Index::instance();
3254 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3255 bool addToIndex = lne==nullptr || lne->visible();
3256
3257 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3258 {
3259 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3260 Doxygen::indexList->incContentsDepth();
3261 }
3271 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3272 {
3273 Doxygen::indexList->decContentsDepth();
3274 }
3275
3276}
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3122

References ClassMemberHighlight::All, ClassMemberHighlight::Enums, ClassMemberHighlight::EnumValues, ClassMemberHighlight::Events, LayoutNavEntry::find(), ClassMemberHighlight::Functions, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), ClassMemberHighlight::Properties, ClassMemberHighlight::Related, LayoutDocManager::rootNavEntry(), theTranslator, LayoutNavEntry::title(), TRUE, ClassMemberHighlight::Typedefs, ClassMemberHighlight::Variables, LayoutNavEntry::visible(), and writeClassMemberIndexFiltered().

Referenced by writeIndexHierarchyEntries().

◆ writeClassMemberIndexFiltered()

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

Definition at line 3122 of file index.cpp.

3123{
3124 const auto &index = Index::instance();
3125 if (index.numDocumentedClassMembers(hl)==0) return;
3126
3127 bool disableIndex = Config_getBool(DISABLE_INDEX);
3128 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3129 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3130 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3131 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3132
3133 bool multiPageIndex=FALSE;
3134 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3135 {
3136 multiPageIndex=TRUE;
3137 }
3138
3139 ol.pushGeneratorState();
3141
3143 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3144 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3145 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3146 bool addToIndex = lne==nullptr || lne->visible();
3147
3148 if (addToIndex)
3149 {
3150 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3151 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3152 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3153 }
3154
3155 bool first=TRUE;
3156 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3157 {
3158 QCString fileName = getCmhlInfo(hl)->fname;
3159 if (multiPageIndex)
3160 {
3161 QCString cs(letter);
3162 if (!first)
3163 {
3164 fileName+="_"+letterToLabel(cs);
3165 }
3166 if (addToIndex)
3167 {
3168 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3169 }
3170 }
3171
3172 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3173
3174 auto writeQuickLinks = [&,cap_letter=letter]()
3175 {
3177 if (!dynamicMenus)
3178 {
3180
3181 // index item for global member list
3184 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3186
3187 // index items per category member lists
3188 for (int i=1;i<ClassMemberHighlight::Total;i++)
3189 {
3190 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3191 {
3193 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3194 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3195 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3197 }
3198 }
3199
3201
3202 // quick alphabetical index
3203 if (quickIndex)
3204 {
3205 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3206 getCmhlInfo(hl)->fname,multiPageIndex);
3207 }
3208
3209 ol.writeString("</div><!-- main-nav -->\n");
3210 }
3211 };
3212
3213 ol.startFile(fileName+extension,false,QCString(),title);
3214 ol.startQuickIndices();
3215 if (!disableIndex && !quickLinksAfterSplitbar)
3216 {
3217 writeQuickLinks();
3218 }
3219 ol.endQuickIndices();
3220 ol.writeSplitBar(fileName,QCString());
3221 if (quickLinksAfterSplitbar)
3222 {
3223 writeQuickLinks();
3224 if (!dynamicMenus)
3225 {
3226 ol.writeString("<div id=\"container\">\n");
3227 ol.writeString("<div id=\"doc-content\">\n");
3228 }
3229 }
3230 ol.writeSearchInfo();
3231
3232 ol.startContents();
3233
3234 ol.startTextBlock();
3235 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3236 ol.endTextBlock();
3237
3238 writeMemberList(ol,quickIndex,
3239 multiPageIndex ? letter : std::string(),
3240 index.isClassIndexLetterUsed(hl),
3242 endFile(ol);
3243 first=FALSE;
3244 }
3245
3246 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3247
3248 ol.popGeneratorState();
3249}
static void endQuickIndexList(OutputList &ol)
Definition index.cpp:358
static void startQuickIndexItem(OutputList &ol, const QCString &l, bool hl, bool, bool &first)
Definition index.cpp:364
static void endQuickIndexItem(OutputList &ol)
Definition index.cpp:377
static void writeQuickMemberIndex(OutputList &ol, const Index::MemberIndexMap &map, const std::string &page, QCString fullName, bool multiPage)
Definition index.cpp:3064
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2751
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition index.cpp:345
QCString title
Definition index.cpp:3097
const char * fname
Definition index.cpp:3096
QCString fixSpaces(const QCString &s)
Definition util.h:470

References ClassMemberHighlight::All, Config_getBool, OutputList::disableAllBut(), endFile(), endQuickIndexItem(), endQuickIndexList(), OutputList::endQuickIndices(), OutputList::endTextBlock(), FALSE, LayoutNavEntry::find(), fixSpaces(), CmhlInfo::fname, Functions, getCmhlInfo(), Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), letterToLabel(), MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), OutputList::startFile(), startQuickIndexItem(), startQuickIndexList(), OutputList::startQuickIndices(), OutputList::startTextBlock(), theTranslator, CmhlInfo::title, LayoutNavEntry::title(), ClassMemberHighlight::Total, TRUE, Definition::TypeClass, LayoutNavEntry::visible(), writeMemberList(), OutputList::writeQuickLinks(), writeQuickMemberIndex(), OutputList::writeSearchInfo(), OutputList::writeSplitBar(), and OutputList::writeString().

Referenced by writeClassMemberIndex().

◆ writeClassTree()

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

Definition at line 1722 of file index.cpp.

1723{
1724 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1725 for (const auto &cdi : cl)
1726 {
1727 const ClassDef *cd = get_pointer(cdi);
1728 if (cd->getLanguage()==SrcLangExt::VHDL)
1729 {
1732 )// no architecture
1733 {
1734 continue;
1735 }
1736 }
1737
1738 if (sliceOpt && cd->compoundType() != ct)
1739 {
1740 continue;
1741 }
1742
1743 if (!globalOnly ||
1744 cd->getOuterScope()==nullptr ||
1746 )
1747 {
1748 int count=0;
1749 for (const auto &ccd : cd->getClasses())
1750 {
1751 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1752 {
1753 count++;
1754 }
1755 }
1757 {
1758 if (ftv)
1759 {
1760 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1761 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1762 }
1763 if (addToIndex &&
1764 (cd->getOuterScope()==nullptr ||
1766 )
1767 )
1768 {
1769 addMembersToIndex(cd,LayoutDocManager::Class,
1770 cd->displayName(FALSE),
1771 cd->anchor(),
1772 cd->partOfGroups().empty() && !cd->isSimple());
1773 }
1774 if (count>0)
1775 {
1776 if (ftv) ftv->incContentsDepth();
1777 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1778 if (ftv) ftv->decContentsDepth();
1779 }
1780 }
1781 }
1782 }
1783}
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.
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(), 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(), writeModuleTreeNode(), 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 964 of file index.cpp.

966{
967 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
968 for (const auto &cd : cl)
969 {
970 //printf("class %s classHasVisibleRoot=%d isVisibleInHierarchy=%d\n",
971 // qPrint(cd->name()),
972 // classHasVisibleRoot(cd->baseClasses()),
973 // cd->isVisibleInHierarchy()
974 // );
975 bool b = false;
976 if (cd->getLanguage()==SrcLangExt::VHDL)
977 {
978 if (VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
979 {
980 continue;
981 }
982 b=!classHasVisibleRoot(cd->subClasses());
983 }
984 else if (sliceOpt && cd->compoundType() != ct)
985 {
986 continue;
987 }
988 else
989 {
990 b=!classHasVisibleRoot(cd->baseClasses());
991 }
992
993 if (b) //filter on root classes
994 {
995 if (cd->isVisibleInHierarchy()) // should it be visible
996 {
997 if (!started)
998 {
1000 if (addToIndex)
1001 {
1002 Doxygen::indexList->incContentsDepth();
1003 }
1004 started=TRUE;
1005 }
1006 ol.startIndexListItem();
1007 bool hasChildren = visitedClasses.find(cd.get())==visitedClasses.end() &&
1008 classHasVisibleChildren(cd.get());
1009 //printf("list: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
1010 if (cd->isLinkable())
1011 {
1012 //printf("Writing class %s isLinkable()=%d isLinkableInProject()=%d cd->isImplicitTemplateinstance()=%d\n",
1013 // qPrint(cd->displayName()),cd->isLinkable(),cd->isLinkableInProject(),cd->isImplicitTemplateInstance());
1014 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
1015 ol.parseText(cd->displayName());
1016 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
1017 if (cd->isReference())
1018 {
1019 ol.startTypewriter();
1020 ol.docify(" [external]");
1021 ol.endTypewriter();
1022 }
1023 if (addToIndex)
1024 {
1025 if (cd->getLanguage()!=SrcLangExt::VHDL) // prevents double insertion in Design Unit List
1026 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE);
1027 }
1028 if (ftv)
1029 {
1030 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd.get());
1031 }
1032 }
1033 else
1034 {
1036 ol.parseText(cd->displayName());
1038 if (addToIndex)
1039 {
1040 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE);
1041 }
1042 if (ftv)
1043 {
1044 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd.get());
1045 }
1046 }
1047 if (cd->getLanguage()==SrcLangExt::VHDL && hasChildren)
1048 {
1049 writeClassTreeToOutput(ol,cd->baseClasses(),1,ftv,addToIndex,visitedClasses);
1050 visitedClasses.insert(cd.get());
1051 }
1052 else if (hasChildren)
1053 {
1054 writeClassTreeToOutput(ol,cd->subClasses(),1,ftv,addToIndex,visitedClasses);
1055 visitedClasses.insert(cd.get());
1056 }
1057 ol.endIndexListItem();
1058 }
1059 }
1060 }
1061}
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:620
static void startIndexHierarchy(OutputList &ol, int level)
Definition index.cpp:307

References FTVHelp::addContentsItem(), classHasVisibleChildren(), classHasVisibleRoot(), Config_getBool, VhdlDocGen::convert(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, FALSE, 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 2010 of file index.cpp.

2012{
2013 for (const auto &nd : nsLinkedMap)
2014 {
2015 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
2016 }
2017}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1929

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2001 of file index.cpp.

2003{
2004 for (const auto &nd : nsLinkedMap)
2005 {
2006 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
2007 }
2008}

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

1931{
1932 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1933 if (!nd->isAnonymous() &&
1934 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1935 {
1936 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1937 bool isLinkable = nd->isLinkableInProject();
1938
1939 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1940
1941 QCString ref;
1942 QCString file;
1943 if (isLinkable)
1944 {
1945 ref = nd->getReference();
1946 file = nd->getOutputFileBase();
1947 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1948 {
1949 file=file.replace(0,qstrlen("namespace"),"class");
1950 }
1951 }
1952
1953 if (isDir)
1954 {
1955 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1956
1957 if (addToIndex)
1958 {
1959 // the namespace entry is already shown under the namespace list so don't
1960 // add it to the nav index and don't create a separate index file for it otherwise
1961 // it will overwrite the one written for the namespace list.
1962 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1963 false, // separateIndex
1964 false // addToNavIndex
1965 );
1966 }
1967 if (addToIndex)
1968 {
1969 Doxygen::indexList->incContentsDepth();
1970 }
1971
1972 ftv->incContentsDepth();
1973 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1974 ClassLinkedRefMap d = nd->getClasses();
1975 if (sliceOpt)
1976 {
1977 if (ct == ClassDef::Interface)
1978 {
1979 d = nd->getInterfaces();
1980 }
1981 else if (ct == ClassDef::Struct)
1982 {
1983 d = nd->getStructs();
1984 }
1985 else if (ct == ClassDef::Exception)
1986 {
1987 d = nd->getExceptions();
1988 }
1989 }
1990 writeClassTree(d,ftv,addToIndex,FALSE,ct);
1991 ftv->decContentsDepth();
1992
1993 if (addToIndex)
1994 {
1995 Doxygen::indexList->decContentsDepth();
1996 }
1997 }
1998 }
1999}
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 620 of file index.cpp.

621{
622 if (bcl.empty()) return;
623 bool started=FALSE;
624 for (const auto &bcd : bcl)
625 {
626 ClassDef *cd=bcd.classDef;
627 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
628 {
629 continue;
630 }
631
632 bool b = cd->getLanguage()==SrcLangExt::VHDL ? classHasVisibleRoot(cd->subClasses()) : classHasVisibleRoot(cd->baseClasses());
633
634 if (cd->isVisibleInHierarchy() && b) // classHasVisibleRoot(cd->baseClasses()))
635 {
636 if (!started)
637 {
638 startIndexHierarchy(ol,level);
639 if (addToIndex)
640 {
641 Doxygen::indexList->incContentsDepth();
642 }
643 if (ftv)
644 {
645 ftv->incContentsDepth();
646 }
647 started=TRUE;
648 }
650 //printf("Passed...\n");
651 bool hasChildren = visitedClasses.find(cd)==visitedClasses.end() &&
653 //printf("tree4: Has children %s: %d\n",qPrint(cd->name()),hasChildren);
654 if (cd->isLinkable())
655 {
656 //printf("Writing class %s\n",qPrint(cd->displayName()));
657 ol.startIndexItem(cd->getReference(),cd->getOutputFileBase());
658 ol.parseText(cd->displayName());
659 ol.endIndexItem(cd->getReference(),cd->getOutputFileBase());
660 if (cd->isReference())
661 {
662 ol.startTypewriter();
663 ol.docify(" [external]");
664 ol.endTypewriter();
665 }
666 if (addToIndex)
667 {
668 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor());
669 }
670 if (ftv)
671 {
672 if (cd->getLanguage()==SrcLangExt::VHDL)
673 {
674 ftv->addContentsItem(hasChildren,bcd.usedName,cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
675 }
676 else
677 {
678 ftv->addContentsItem(hasChildren,cd->displayName(),cd->getReference(),cd->getOutputFileBase(),cd->anchor(),FALSE,FALSE,cd);
679 }
680 }
681 }
682 else
683 {
685 ol.parseText(cd->name());
687 if (addToIndex)
688 {
689 Doxygen::indexList->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString());
690 }
691 if (ftv)
692 {
693 ftv->addContentsItem(hasChildren,cd->displayName(),QCString(),QCString(),QCString(),FALSE,FALSE,cd);
694 }
695 }
696 if (hasChildren)
697 {
698 //printf("Class %s at %p visited=%d\n",qPrint(cd->name()),cd,cd->visited);
699 visitedClasses.insert(cd);
700 if (cd->getLanguage()==SrcLangExt::VHDL)
701 {
702 writeClassTreeToOutput(ol,cd->baseClasses(),level+1,ftv,addToIndex,visitedClasses);
703 }
704 else
705 {
706 writeClassTreeToOutput(ol,cd->subClasses(),level+1,ftv,addToIndex,visitedClasses);
707 }
708 }
709 ol.endIndexListItem();
710 }
711 }
712 if (started)
713 {
714 endIndexHierarchy(ol,level);
715 if (addToIndex)
716 {
717 Doxygen::indexList->decContentsDepth();
718 }
719 if (ftv)
720 {
721 ftv->decContentsDepth();
722 }
723 }
724}
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 const QCString & name() const =0

References FTVHelp::addContentsItem(), Definition::anchor(), ClassDef::baseClasses(), classHasVisibleChildren(), classHasVisibleRoot(), VhdlDocGen::convert(), FTVHelp::decContentsDepth(), Definition::displayName(), OutputList::docify(), endIndexHierarchy(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, FALSE, 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 4686 of file index.cpp.

4687{
4688 if (Index::instance().numDocumentedConcepts()==0) return;
4689 ol.pushGeneratorState();
4690 // 1.{
4693 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4694 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4695 bool addToIndex = lne==nullptr || lne->visible();
4696
4697 startFile(ol,"concepts",false,QCString(),title,HighlightedItem::Concepts);
4698 startTitle(ol,QCString());
4699 ol.parseText(title);
4700 endTitle(ol,QCString(),QCString());
4701 ol.startContents();
4702 ol.startTextBlock();
4703 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4704 ol.endTextBlock();
4705
4706 // ---------------
4707 // Normal group index for Latex/RTF
4708 // ---------------
4709 // 2.{
4710 ol.pushGeneratorState();
4712
4713 bool first=TRUE;
4714 for (const auto &cd : *Doxygen::conceptLinkedMap)
4715 {
4716 if (cd->isLinkableInProject())
4717 {
4718 if (first)
4719 {
4720 ol.startIndexList();
4721 first=FALSE;
4722 }
4723 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4724 ol.startIndexKey();
4725 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4726 ol.endIndexKey();
4727
4728 bool hasBrief = !cd->briefDescription().isEmpty();
4729 ol.startIndexValue(hasBrief);
4730 if (hasBrief)
4731 {
4732 ol.generateDoc(cd->briefFile(),
4733 cd->briefLine(),
4734 cd.get(),
4735 nullptr,
4736 cd->briefDescription(true),
4737 DocOptions()
4738 .setSingleLine(true)
4739 .setLinkFromIndex(true));
4740 }
4741 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4742
4743 }
4744 }
4745 if (!first) ol.endIndexList();
4746
4747 ol.popGeneratorState();
4748 // 2.}
4749
4750 // ---------------
4751 // interactive group index for HTML
4752 // ---------------
4753 // 2.{
4754 ol.pushGeneratorState();
4756
4757 {
4758 if (addToIndex)
4759 {
4760 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4761 Doxygen::indexList->incContentsDepth();
4762 }
4763 FTVHelp ftv(false);
4764 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4765 {
4766 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4767 }
4768 writeConceptRootList(&ftv,addToIndex);
4769 TextStream t;
4770 ftv.generateTreeViewInline(t);
4771 ol.writeString(t.str());
4772 if (addToIndex)
4773 {
4774 Doxygen::indexList->decContentsDepth();
4775 }
4776 }
4777 ol.popGeneratorState();
4778 // 2.}
4779
4780 endFile(ol);
4781 ol.popGeneratorState();
4782 // 1.}
4783}
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4664
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4613

References Doxygen::conceptLinkedMap, Concepts, 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, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startIndexKey(), OutputList::startIndexList(), OutputList::startIndexValue(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeConceptRootList(), writeConceptTreeInsideNamespaceElement(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeConceptList()

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

Definition at line 4580 of file index.cpp.

4581{
4582 for (const auto &cd : concepts)
4583 {
4584 if (cd->isLinkableInProject())
4585 {
4586 if (ftv)
4587 {
4588 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4589 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4590 }
4591 if (addToIndex)
4592 {
4593 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4594 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4595 }
4596 }
4597 }
4598}

References FTVHelp::addContentsItem(), FALSE, and Doxygen::indexList.

Referenced by writeConceptTreeInsideNamespaceElement(), writeModuleTreeNode(), and writeNamespaceTreeElement().

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4664 of file index.cpp.

4665{
4666 for (const auto &cd : *Doxygen::conceptLinkedMap)
4667 {
4668 if ((cd->getOuterScope()==nullptr ||
4669 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4670 )
4671 {
4672 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4673 ftv->addContentsItem(
4674 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4675 QCString(),false,cd->partOfGroups().empty(),cd.get());
4676 if (addToIndex)
4677 {
4678 Doxygen::indexList->addContentsItem(
4679 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4680 QCString(),false,cd->partOfGroups().empty(),cd.get());
4681 }
4682 }
4683 }
4684}

References FTVHelp::addContentsItem(), Doxygen::conceptLinkedMap, Doxygen::globalScope, and Doxygen::indexList.

Referenced by writeConceptIndex().

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4603 of file index.cpp.

4605{
4606 for (const auto &nd : nsLinkedMap)
4607 {
4608 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4609 }
4610}

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4613 of file index.cpp.

4615{
4616 if (!nd->isAnonymous() &&
4617 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4618 {
4619 bool isDir = namespaceHasNestedConcept(nd);
4620 bool isLinkable = nd->isLinkableInProject();
4621
4622 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4623
4624 QCString ref;
4625 QCString file;
4626 if (isLinkable)
4627 {
4628 ref = nd->getReference();
4629 file = nd->getOutputFileBase();
4630 }
4631
4632 if (isDir)
4633 {
4634 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4635
4636 if (addToIndex)
4637 {
4638 // the namespace entry is already shown under the namespace list so don't
4639 // add it to the nav index and don't create a separate index file for it otherwise
4640 // it will overwrite the one written for the namespace list.
4641 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4642 false, // separateIndex
4643 false // addToNavIndex
4644 );
4645 }
4646 if (addToIndex)
4647 {
4648 Doxygen::indexList->incContentsDepth();
4649 }
4650
4651 ftv->incContentsDepth();
4653 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4654 ftv->decContentsDepth();
4655
4656 if (addToIndex)
4657 {
4658 Doxygen::indexList->decContentsDepth();
4659 }
4660 }
4661 }
4662}
virtual ConceptLinkedRefMap getConcepts() const =0
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4603
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4580
bool namespaceHasNestedConcept(const NamespaceDef *nd)

References FTVHelp::addContentsItem(), FTVHelp::decContentsDepth(), FALSE, NamespaceDef::getConcepts(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::globalScope, FTVHelp::incContentsDepth(), Doxygen::indexList, Definition::isAnonymous(), Definition::isLinkableInProject(), Definition::localName(), namespaceHasNestedConcept(), TRUE, writeConceptList(), and writeConceptTreeInsideNamespace().

Referenced by writeConceptIndex(), and writeConceptTreeInsideNamespace().

◆ writeDirHierarchy()

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

Definition at line 900 of file index.cpp.

901{
902 if (ftv)
903 {
906 }
908 for (const auto &dd : *Doxygen::dirLinkedMap)
909 {
910 if (dd->getOuterScope()==Doxygen::globalScope)
911 {
912 writeDirTreeNode(ol,dd.get(),0,ftv,addToIndex);
913 }
914 }
915 if (ftv)
916 {
917 for (const auto &fn : *Doxygen::inputNameLinkedMap)
918 {
919 for (const auto &fd : *fn)
920 {
921 if (fd->getDirDef()==nullptr) // top level file
922 {
923 bool src = false;
924 bool doc = fileVisibleInIndex(fd.get(),src);
925 QCString reference, outputBase;
926 if (doc)
927 {
928 reference = fd->getReference();
929 outputBase = fd->getOutputFileBase();
930 }
931 if (doc || src)
932 {
933 ftv->addContentsItem(FALSE,fd->displayName(),
934 reference, outputBase, QCString(),
935 FALSE,FALSE,fd.get());
936 }
937 if (addToIndex)
938 {
939 if (doc)
940 {
941 addMembersToIndex(fd.get(),LayoutDocManager::File,fd->displayName(),QCString(),TRUE,FALSE,&fd->getConcepts());
942 }
943 else if (src)
944 {
945 Doxygen::indexList->addContentsItem(
946 FALSE, fd->displayName(), QCString(),
947 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd.get());
948 }
949 }
950 }
951 }
952 }
953 }
954 endIndexHierarchy(ol,0);
955 if (ftv)
956 {
958 }
959}
static void writeDirTreeNode(OutputList &ol, const DirDef *dd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:756

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

1538{
1539 if (Index::instance().numDocumentedDirs()==0) return;
1540 ol.pushGeneratorState();
1542
1543 QCString title = theTranslator->trDirectories();
1544 startFile(ol,"dirs",false,QCString(),title,HighlightedItem::Files);
1545 startTitle(ol,title);
1546 ol.parseText(title);
1547 endTitle(ol,QCString(),QCString());
1548
1549 ol.startIndexList();
1550 for (const auto &dir : *Doxygen::dirLinkedMap)
1551 {
1552 if (dir->hasDocumentation())
1553 {
1554 writeDirTreeNode(ol, dir.get(), 1, nullptr, false);
1555 }
1556 }
1557
1558 ol.endIndexList();
1559
1560 endFile(ol);
1561 ol.popGeneratorState();
1562}

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().

Referenced by writeIndexHierarchyEntries().

◆ writeDirTreeNode()

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

Definition at line 756 of file index.cpp.

757{
758 if (level>20)
759 {
760 warn(dd->getDefFileName(),dd->getDefLine(),
761 "maximum nesting level exceeded for directory {}: "
762 "check for possible recursive directory relation!",dd->name());
763 return;
764 }
765
766 if (!dirHasVisibleChildren(dd))
767 {
768 return;
769 }
770
771 bool tocExpand = TRUE; //Config_getBool(TOC_EXPAND);
772 bool isDir = !dd->subDirs().empty() || // there are subdirs
773 (tocExpand && // or toc expand and
774 !dd->getFiles().empty() // there are files
775 );
776 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
777 if (addToIndex)
778 {
779 Doxygen::indexList->addContentsItem(isDir,dd->shortName(),dd->getReference(),dd->getOutputFileBase(),QCString(),TRUE,TRUE);
780 Doxygen::indexList->incContentsDepth();
781 }
782 if (ftv)
783 {
784 ftv->addContentsItem(isDir,dd->shortName(),dd->getReference(),
786 ftv->incContentsDepth();
787 }
788
791 ol.parseText(dd->shortName());
793 if (dd->isReference())
794 {
795 ol.startTypewriter();
796 ol.docify(" [external]");
797 ol.endTypewriter();
798 }
799
800 // write sub directories
801 if (dd->subDirs().size()>0)
802 {
803 startIndexHierarchy(ol,level+1);
804 for(const auto &subdd : dd->subDirs())
805 {
806 writeDirTreeNode(ol,subdd,level+1,ftv,addToIndex);
807 }
808 endIndexHierarchy(ol,level+1);
809 }
810
811 int fileCount=0;
812 if (!dd->getFiles().empty())
813 {
814 for (const auto &fd : dd->getFiles())
815 {
816 //bool allExternals = Config_getBool(ALLEXTERNALS);
817 //if ((allExternals && fd->isLinkable()) || fd->isLinkableInProject())
818 //{
819 // fileCount++;
820 //}
821 bool genSourceFile = false;
822 if (fileVisibleInIndex(fd,genSourceFile))
823 {
824 fileCount++;
825 }
826 else if (genSourceFile)
827 {
828 fileCount++;
829 }
830 }
831 if (fileCount>0)
832 {
833 startIndexHierarchy(ol,level+1);
834 for (const auto &fd : dd->getFiles())
835 {
836 bool src = false;
837 bool doc = fileVisibleInIndex(fd,src);
838 QCString reference;
839 QCString outputBase;
840 if (doc)
841 {
842 reference = fd->getReference();
843 outputBase = fd->getOutputFileBase();
844 }
845 if (doc || src)
846 {
848 ol.startIndexItem(reference,outputBase);
849 ol.parseText(fd->displayName());
850 ol.endIndexItem(reference,outputBase);
851 ol.endIndexListItem();
852 if (ftv && (src || doc))
853 {
855 fd->displayName(),
856 reference,outputBase,
857 QCString(),FALSE,FALSE,fd);
858 }
859 }
860 }
861 endIndexHierarchy(ol,level+1);
862 }
863 }
864
865 if (tocExpand && addToIndex)
866 {
867 // write files of this directory
868 if (fileCount>0)
869 {
870 for (const auto &fd : dd->getFiles())
871 {
872 bool src = false;
873 bool doc = fileVisibleInIndex(fd,src);
874 if (doc)
875 {
876 addMembersToIndex(fd,LayoutDocManager::File,fd->displayName(),QCString(),
877 !fd->isLinkableViaGroup(),FALSE,&fd->getConcepts());
878 }
879 else if (src)
880 {
881 Doxygen::indexList->addContentsItem(
882 FALSE, fd->name(), QCString(),
883 fd->getSourceFileBase(), QCString(), FALSE, TRUE, fd);
884 }
885 }
886 }
887 }
888 ol.endIndexListItem();
889
890 if (addToIndex)
891 {
892 Doxygen::indexList->decContentsDepth();
893 }
894 if (ftv)
895 {
896 ftv->decContentsDepth();
897 }
898}
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual bool isReference() const =0
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(), Definition::getDefFileName(), Definition::getDefLine(), DirDef::getFiles(), Definition::getOutputFileBase(), Definition::getReference(), FTVHelp::incContentsDepth(), Doxygen::indexList, Definition::isReference(), Definition::name(), OutputList::parseText(), 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 3824 of file index.cpp.

3825{
3826 if (Doxygen::exampleLinkedMap->empty()) return;
3827 ol.pushGeneratorState();
3830 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3831 QCString title = lne ? lne->title() : theTranslator->trExamples();
3832 bool addToIndex = lne==nullptr || lne->visible();
3833
3834 startFile(ol,"examples",false,QCString(),title,HighlightedItem::Examples);
3835
3836 startTitle(ol,QCString());
3837 ol.parseText(title);
3838 endTitle(ol,QCString(),QCString());
3839
3840 ol.startContents();
3841
3842 if (addToIndex)
3843 {
3844 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3845 Doxygen::indexList->incContentsDepth();
3846 }
3847
3848 ol.startTextBlock();
3849 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3850 ol.endTextBlock();
3851
3852 ol.startItemList();
3853 for (const auto &pd : *Doxygen::exampleLinkedMap)
3854 {
3855 ol.startItemListItem();
3856 QCString n=pd->getOutputFileBase();
3857 if (!pd->title().isEmpty())
3858 {
3859 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3860 if (addToIndex)
3861 {
3862 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3863 }
3864 }
3865 else
3866 {
3867 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3868 if (addToIndex)
3869 {
3870 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3871 }
3872 }
3873 ol.endItemListItem();
3874 //ol.writeString("\n");
3875 }
3876 ol.endItemList();
3877
3878 if (addToIndex)
3879 {
3880 Doxygen::indexList->decContentsDepth();
3881 }
3882 endFile(ol);
3883 ol.popGeneratorState();
3884}
void startItemListItem()
Definition outputlist.h:457
void endItemListItem()
Definition outputlist.h:459

References OutputList::disable(), Docbook, endFile(), OutputList::endItemList(), OutputList::endItemListItem(), OutputList::endTextBlock(), endTitle(), Doxygen::exampleLinkedMap, Examples, FALSE, filterTitle(), LayoutNavEntry::find(), Doxygen::indexList, LayoutDocManager::instance(), LayoutNavEntry::intro(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startItemList(), OutputList::startItemListItem(), OutputList::startTextBlock(), startTitle(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), and OutputList::writeObjectLink().

Referenced by writeIndexHierarchyEntries().

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 1566 of file index.cpp.

1567{
1568 if (Index::instance().numDocumentedFiles()==0 || !Config_getBool(SHOW_FILES)) return;
1569
1570 ol.pushGeneratorState();
1573
1574 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileList);
1575 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files); // fall back
1576 QCString title = lne ? lne->title() : theTranslator->trFileList();
1577 bool addToIndex = lne==nullptr || lne->visible();
1578
1579 startFile(ol,"files",false,QCString(),title,HighlightedItem::Files);
1580 startTitle(ol,QCString());
1581 //if (!Config_getString(PROJECT_NAME).isEmpty())
1582 //{
1583 // title.prepend(Config_getString(PROJECT_NAME)+" ");
1584 //}
1585 ol.parseText(title);
1586 endTitle(ol,QCString(),QCString());
1587 ol.startContents();
1588 ol.startTextBlock();
1589
1590 if (addToIndex)
1591 {
1592 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"files",QCString(),TRUE,TRUE);
1593 Doxygen::indexList->incContentsDepth();
1594 }
1595
1596 ol.parseText(lne ? lne->intro() : theTranslator->trFileListDescription(Config_getBool(EXTRACT_ALL)));
1597 ol.endTextBlock();
1598
1599 // ---------------
1600 // Flat file index
1601 // ---------------
1602
1603 // 1. {
1604 ol.pushGeneratorState();
1606
1607 ol.startIndexList();
1608 if (Config_getBool(FULL_PATH_NAMES))
1609 {
1610 std::unordered_map<std::string,size_t> pathMap;
1611 std::vector<FilesInDir> outputFiles;
1612
1613 // re-sort input files in (dir,file) output order instead of (file,dir) input order
1614 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1615 {
1616 for (const auto &fd : *fn)
1617 {
1618 QCString path=fd->getPath();
1619 if (path.isEmpty()) path="[external]";
1620 auto it = pathMap.find(path.str());
1621 if (it!=pathMap.end()) // existing path -> append
1622 {
1623 outputFiles.at(it->second).files.push_back(fd.get());
1624 }
1625 else // new path -> create path entry + append
1626 {
1627 pathMap.emplace(path.str(),outputFiles.size());
1628 outputFiles.emplace_back(path);
1629 outputFiles.back().files.push_back(fd.get());
1630 }
1631 }
1632 }
1633
1634 // sort the files by path
1635 std::stable_sort(outputFiles.begin(),
1636 outputFiles.end(),
1637 [](const auto &fp1,const auto &fp2) { return qstricmp_sort(fp1.path,fp2.path)<0; });
1638 // sort the files inside the directory by name
1639 for (auto &fp : outputFiles)
1640 {
1641 std::stable_sort(fp.files.begin(), fp.files.end(), compareFileDefs);
1642 }
1643 // write the results
1644 for (const auto &fp : outputFiles)
1645 {
1646 for (const auto &fd : fp.files)
1647 {
1648 writeSingleFileIndex(ol,fd);
1649 }
1650 }
1651 }
1652 else
1653 {
1654 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1655 {
1656 for (const auto &fd : *fn)
1657 {
1658 writeSingleFileIndex(ol,fd.get());
1659 }
1660 }
1661 }
1662 ol.endIndexList();
1663
1664 // 1. }
1665 ol.popGeneratorState();
1666
1667 // ---------------
1668 // Hierarchical file index for HTML
1669 // ---------------
1670 ol.pushGeneratorState();
1672
1673 {
1674 FTVHelp ftv(false);
1675 writeDirHierarchy(ol,&ftv,addToIndex);
1676 TextStream t;
1677 ftv.generateTreeViewInline(t);
1678 ol.writeString(t.str());
1679 }
1680
1681 ol.popGeneratorState();
1682 // ------
1683
1684 if (addToIndex)
1685 {
1686 Doxygen::indexList->decContentsDepth();
1687 }
1688
1689 endFile(ol);
1690 ol.popGeneratorState();
1691}
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:1947
static void writeSingleFileIndex(OutputList &ol, const FileDef *fd)
Definition index.cpp:1463
static void writeDirHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:900

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().

Referenced by writeIndexHierarchyEntries().

◆ writeFileLinkForMember()

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

Definition at line 2710 of file index.cpp.

2712{
2713 const FileDef *fd=md->getFileDef();
2714 if (fd && prevFileName!=fd->name())
2715 {
2716 ol.writeString(separator);
2718 fd->name());
2719 prevFileName = fd->name();
2720 }
2721}
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 3435 of file index.cpp.

3436{
3437 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3438 bool addToIndex = lne==nullptr || lne->visible();
3439 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3440 {
3441 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3442 Doxygen::indexList->incContentsDepth();
3443 }
3453 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3454 {
3455 Doxygen::indexList->decContentsDepth();
3456 }
3457
3458}
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3311

References FileMemberHighlight::All, FileMemberHighlight::Defines, FileMemberHighlight::Dictionaries, FileMemberHighlight::Enums, FileMemberHighlight::EnumValues, LayoutNavEntry::find(), FileMemberHighlight::Functions, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutDocManager::rootNavEntry(), FileMemberHighlight::Sequences, theTranslator, LayoutNavEntry::title(), FileMemberHighlight::Typedefs, FileMemberHighlight::Variables, LayoutNavEntry::visible(), and writeFileMemberIndexFiltered().

Referenced by writeIndexHierarchyEntries().

◆ writeFileMemberIndexFiltered()

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

Definition at line 3311 of file index.cpp.

3312{
3313 const auto &index = Index::instance();
3314 if (index.numDocumentedFileMembers(hl)==0) return;
3315
3316 bool disableIndex = Config_getBool(DISABLE_INDEX);
3317 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3318 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3319 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3320 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3321
3322 bool multiPageIndex=FALSE;
3323 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3324 {
3325 multiPageIndex=TRUE;
3326 }
3327
3328 ol.pushGeneratorState();
3330
3332 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3333 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3334 bool addToIndex = lne==nullptr || lne->visible();
3335
3336 if (addToIndex)
3337 {
3338 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3339 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3340 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3341 }
3342
3343 bool first=TRUE;
3344 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3345 {
3346 QCString fileName = getFmhlInfo(hl)->fname;
3347 if (multiPageIndex)
3348 {
3349 QCString cs(letter);
3350 if (!first)
3351 {
3352 fileName+="_"+letterToLabel(cs);
3353 }
3354 if (addToIndex)
3355 {
3356 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3357 }
3358 }
3359
3360 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3361
3362 auto writeQuickLinks = [&,cap_letter=letter]()
3363 {
3365 if (!dynamicMenus)
3366 {
3368
3369 // index item for all file member lists
3372 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3374
3375 // index items for per category member lists
3376 for (int i=1;i<FileMemberHighlight::Total;i++)
3377 {
3378 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3379 {
3381 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3382 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3384 }
3385 }
3386
3388
3389 if (quickIndex)
3390 {
3391 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3392 getFmhlInfo(hl)->fname,multiPageIndex);
3393 }
3394
3395 ol.writeString("</div><!-- main-nav -->\n");
3396 }
3397 };
3398
3399 ol.startFile(fileName+extension,false,QCString(),title);
3400 ol.startQuickIndices();
3401 if (!disableIndex && !quickLinksAfterSplitbar)
3402 {
3403 writeQuickLinks();
3404 }
3405 ol.endQuickIndices();
3406 ol.writeSplitBar(fileName,QCString());
3407 if (quickLinksAfterSplitbar)
3408 {
3409 writeQuickLinks();
3410 if (!dynamicMenus)
3411 {
3412 ol.writeString("<div id=\"container\">\n");
3413 ol.writeString("<div id=\"doc-content\">\n");
3414 }
3415 }
3416 ol.writeSearchInfo();
3417
3418 ol.startContents();
3419
3420 ol.startTextBlock();
3421 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3422 ol.endTextBlock();
3423
3424 writeMemberList(ol,quickIndex,
3425 multiPageIndex ? letter : std::string(),
3426 index.isFileIndexLetterUsed(hl),
3428 endFile(ol);
3429 first=FALSE;
3430 }
3431 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3432 ol.popGeneratorState();
3433}
const char * fname
Definition index.cpp:3284

References FileMemberHighlight::All, Config_getBool, OutputList::disableAllBut(), endFile(), endQuickIndexItem(), endQuickIndexList(), OutputList::endQuickIndices(), OutputList::endTextBlock(), FALSE, LayoutNavEntry::find(), fixSpaces(), FmhlInfo::fname, getFmhlInfo(), Globals, Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), letterToLabel(), MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), OutputList::startFile(), startQuickIndexItem(), startQuickIndexList(), OutputList::startQuickIndices(), OutputList::startTextBlock(), theTranslator, LayoutNavEntry::title(), FileMemberHighlight::Total, TRUE, Definition::TypeFile, LayoutNavEntry::visible(), writeMemberList(), OutputList::writeQuickLinks(), writeQuickMemberIndex(), OutputList::writeSearchInfo(), OutputList::writeSplitBar(), and OutputList::writeString().

Referenced by writeFileMemberIndex().

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1205 of file index.cpp.

1206{
1207 if (Index::instance().numHierarchyClasses()==0) return;
1209 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1210 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1211 startFile(ol,"inherits",false,QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1212 startTitle(ol,QCString());
1213 ol.parseText(title);
1214 endTitle(ol,QCString(),QCString());
1215 ol.startContents();
1216 ol.startTextBlock();
1217 ol.startParagraph();
1218 ol.startTextLink("hierarchy",QCString());
1219 ol.parseText(theTranslator->trGotoTextualHierarchy());
1220 ol.endTextLink();
1221 ol.endParagraph();
1222 ol.endTextBlock();
1225 endFile(ol);
1226 ol.enableAll();
1227}
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().

Referenced by writeIndexHierarchyEntries().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1415 of file index.cpp.

1416{
1417 if (Index::instance().numHierarchyExceptions()==0) return;
1419 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1420 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1421 startFile(ol,"exceptioninherits",false,QCString(),title,HighlightedItem::ExceptionHierarchy,FALSE,"exceptionhierarchy");
1422 startTitle(ol,QCString());
1423 ol.parseText(title);
1424 endTitle(ol,QCString(),QCString());
1425 ol.startContents();
1426 ol.startTextBlock();
1427 ol.startParagraph();
1428 ol.startTextLink("exceptionhierarchy",QCString());
1429 ol.parseText(theTranslator->trGotoTextualHierarchy());
1430 ol.endTextLink();
1431 ol.endParagraph();
1432 ol.endTextBlock();
1435 endFile(ol);
1436 ol.enableAll();
1437}
@ 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().

Referenced by writeIndexHierarchyEntries().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1310 of file index.cpp.

1311{
1312 if (Index::instance().numHierarchyInterfaces()==0) return;
1314 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1315 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1316 startFile(ol,"interfaceinherits",false,QCString(),title,HighlightedItem::InterfaceHierarchy,FALSE,"interfacehierarchy");
1317 startTitle(ol,QCString());
1318 ol.parseText(title);
1319 endTitle(ol,QCString(),QCString());
1320 ol.startContents();
1321 ol.startTextBlock();
1322 ol.startParagraph();
1323 ol.startTextLink("interfacehierarchy",QCString());
1324 ol.parseText(theTranslator->trGotoTextualHierarchy());
1325 ol.endTextLink();
1326 ol.endParagraph();
1327 ol.endTextBlock();
1330 endFile(ol);
1331 ol.enableAll();
1332}
@ 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().

Referenced by writeIndexHierarchyEntries().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4053 of file index.cpp.

4054{
4055 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4056 ol.pushGeneratorState();
4058
4059 DotLegendGraph gd;
4060 gd.writeGraph(Config_getString(HTML_OUTPUT));
4061
4062 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4063 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4064 // temporarily disable the stripping of comments for our own code example!
4065 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4066 // temporarily disable create subdirs for linking to our example
4067 Config_updateBool(CREATE_SUBDIRS,FALSE);
4068
4069 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4070 startTitle(ol,QCString());
4071 ol.parseText(theTranslator->trLegendTitle());
4072 endTitle(ol,QCString(),QCString());
4073 ol.startContents();
4074 QCString legendDocs = theTranslator->trLegendDocs();
4075 int s = legendDocs.find("<center>");
4076 int e = legendDocs.find("</center>");
4077 QCString imgExt = getDotImageExtension();
4078 if (imgExt=="svg" && s!=-1 && e!=-1)
4079 {
4080 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4081 //printf("legendDocs=%s\n",qPrint(legendDocs));
4082 }
4083
4084 {
4085 auto fd = createFileDef("","graph_legend.dox");
4086 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4087 }
4088
4089 // restore config settings
4090 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4091 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4092
4093 endFile(ol);
4094 ol.popGeneratorState();
4095}
Representation of a legend explaining the meaning of boxes, arrows, and colors.
void writeGraph(const QCString &path)
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
QCString left(size_t len) const
Definition qcstring.h:229
#define Config_updateBool(name, value)
Definition config.h:40
std::unique_ptr< FileDef > createFileDef(const QCString &p, const QCString &n, const QCString &ref, const QCString &dn)
Definition filedef.cpp:268
QCString getDotImageExtension()
Definition util.cpp:6199

References Config_getBool, Config_getString, Config_updateBool, createFileDef(), OutputList::disableAllBut(), endFile(), endTitle(), FALSE, QCString::find(), OutputList::generateDoc(), getDotImageExtension(), Html, QCString::left(), QCString::mid(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startContents(), startFile(), startTitle(), theTranslator, and DotLegendGraph::writeGraph().

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4348 of file index.cpp.

4349{
4350 if (ftv)
4351 {
4352 ol.pushGeneratorState();
4354 }
4355 startIndexHierarchy(ol,0);
4356 for (const auto &gd : *Doxygen::groupLinkedMap)
4357 {
4358 if (gd->isVisibleInHierarchy())
4359 {
4360 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4361 }
4362 }
4363 endIndexHierarchy(ol,0);
4364 if (ftv)
4365 {
4366 ol.popGeneratorState();
4367 }
4368}
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4103

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

Referenced by writeTopicIndex().

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4103 of file index.cpp.

4104{
4105 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4106 //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4107 if (level>20)
4108 {
4109 warn(gd->getDefFileName(),gd->getDefLine(),
4110 "maximum nesting level exceeded for group {}: check for possible recursive group relation!",gd->name());
4111 return;
4112 }
4113
4114 /* Some groups should appear twice under different parent-groups.
4115 * That is why we should not check if it was visited
4116 */
4117 if ((!gd->isASubGroup() || level>0) && gd->isVisible() && gd->isVisibleInHierarchy())
4118 {
4119 //printf("gd->name()=%s #members=%d\n",qPrint(gd->name()),gd->countMembers());
4120 // write group info
4121 bool hasSubGroups = !gd->getSubGroups().empty();
4122 bool hasSubPages = !gd->getPages().empty();
4123 size_t numSubItems = 0;
4124 for (const auto &ml : gd->getMemberLists())
4125 {
4126 if (ml->listType().isDocumentation())
4127 {
4128 numSubItems += ml->size();
4129 }
4130 }
4131 numSubItems += gd->getNamespaces().size();
4132 numSubItems += gd->getClasses().size();
4133 numSubItems += gd->getFiles().size();
4134 numSubItems += gd->getConcepts().size();
4135 numSubItems += gd->getDirs().size();
4136 numSubItems += gd->getPages().size();
4137
4138 bool isDir = hasSubGroups || hasSubPages || numSubItems>0;
4139 QCString title = parseCommentAsText(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4140 QCString titleAsHtml = parseCommentAsHtml(gd,nullptr,gd->groupTitle(),gd->getDefFileName(),gd->getDefLine());
4141
4142 //printf("gd='%s': pageDict=%d\n",qPrint(gd->name()),gd->pageDict->count());
4143 if (addToIndex)
4144 {
4145 Doxygen::indexList->addContentsItem(isDir,title,
4147 isDir,TRUE,nullptr,titleAsHtml);
4148 Doxygen::indexList->incContentsDepth();
4149 }
4150 if (ftv)
4151 {
4152 ftv->addContentsItem(hasSubGroups,title,
4154 FALSE,FALSE,gd,titleAsHtml);
4155 ftv->incContentsDepth();
4156 }
4157
4158 ol.startIndexListItem();
4160 ol.generateDoc(gd->getDefFileName(),
4161 gd->getDefLine(),
4162 gd,
4163 nullptr,
4164 gd->groupTitle(),
4165 DocOptions()
4166 .setSingleLine(true));
4168
4169 if (gd->isReference())
4170 {
4171 ol.startTypewriter();
4172 ol.docify(" [external]");
4173 ol.endTypewriter();
4174 }
4175
4176 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Group))
4177 {
4178 if (lde->kind()==LayoutDocEntry::MemberDef && addToIndex)
4179 {
4180 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
4181 if (lmd)
4182 {
4183 MemberList *ml = gd->getMemberList(lmd->type);
4184 if (ml)
4185 {
4186 for (const auto &md : *ml)
4187 {
4188 const MemberVector &enumList = md->enumFieldList();
4189 isDir = !enumList.empty() && md->isEnumerate();
4190 if (md->isVisible() && !md->isAnonymous())
4191 {
4192 Doxygen::indexList->addContentsItem(isDir,
4193 md->qualifiedName(),md->getReference(),
4194 md->getOutputFileBase(),md->anchor(),FALSE,addToIndex);
4195 }
4196 if (isDir)
4197 {
4198 Doxygen::indexList->incContentsDepth();
4199 for (const auto &emd : enumList)
4200 {
4201 if (emd->isVisible())
4202 {
4203 Doxygen::indexList->addContentsItem(FALSE,
4204 emd->qualifiedName(),emd->getReference(),emd->getOutputFileBase(),
4205 emd->anchor(),FALSE,addToIndex);
4206 }
4207 }
4208 Doxygen::indexList->decContentsDepth();
4209 }
4210 }
4211 }
4212 }
4213 }
4214 else if (lde->kind()==LayoutDocEntry::GroupClasses && addToIndex)
4215 {
4216 for (const auto &cd : gd->getClasses())
4217 {
4218 //bool nestedClassInSameGroup =
4219 // cd->getOuterScope() && cd->getOuterScope()->definitionType()==Definition::TypeClass &&
4220 // cd->getOuterScope()->partOfGroups().empty() && cd->getOuterScope()->partOfGroups()->contains(gd);
4221 //printf("===== GroupClasses: %s visible=%d nestedClassInSameGroup=%d\n",qPrint(cd->name()),cd->isVisible(),nestedClassInSameGroup);
4222 if (cd->isVisible() /*&& !nestedClassInSameGroup*/)
4223 {
4225 LayoutDocManager::Class,
4226 cd->displayName(),
4227 cd->anchor(),
4228 addToIndex,
4229 TRUE);
4230 }
4231 }
4232 }
4233 else if (lde->kind()==LayoutDocEntry::GroupNamespaces && addToIndex && Config_getBool(SHOW_NAMESPACES))
4234 {
4235 for (const auto &nd : gd->getNamespaces())
4236 {
4237 if (nd->isVisible())
4238 {
4239 Doxygen::indexList->addContentsItem(FALSE,
4240 nd->displayName(),nd->getReference(),
4241 nd->getOutputFileBase(),QCString(),FALSE,Config_getBool(SHOW_NAMESPACES));
4242 }
4243 }
4244 }
4245 else if (lde->kind()==LayoutDocEntry::GroupConcepts && addToIndex)
4246 {
4247 for (const auto &cd : gd->getConcepts())
4248 {
4249 if (cd->isVisible())
4250 {
4251 Doxygen::indexList->addContentsItem(FALSE,
4252 cd->displayName(),cd->getReference(),
4253 cd->getOutputFileBase(),QCString(),FALSE,addToIndex);
4254 }
4255 }
4256 }
4257 else if (lde->kind()==LayoutDocEntry::GroupFiles && addToIndex)
4258 {
4259 for (const auto &fd : gd->getFiles())
4260 {
4261 if (fd->isVisible())
4262 {
4263 Doxygen::indexList->addContentsItem(FALSE,
4264 fd->displayName(),fd->getReference(),
4265 fd->getOutputFileBase(),QCString(),FALSE,fd->isLinkableViaGroup());
4266 }
4267 }
4268 }
4269 else if (lde->kind()==LayoutDocEntry::GroupDirs && addToIndex)
4270 {
4271 for (const auto &dd : gd->getDirs())
4272 {
4273 if (dd->isVisible())
4274 {
4275 Doxygen::indexList->addContentsItem(FALSE,
4276 dd->shortName(),dd->getReference(),
4277 dd->getOutputFileBase(),QCString(),FALSE,FALSE);
4278 }
4279 }
4280 }
4281 else if (lde->kind()==LayoutDocEntry::GroupPageDocs && addToIndex)
4282 {
4283 for (const auto &pd : gd->getPages())
4284 {
4285 const SectionInfo *si=nullptr;
4286 if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
4287 hasSubPages = pd->hasSubPages();
4288 bool hasSections = pd->hasSections();
4289 QCString pageTitle;
4290 if (pd->title().isEmpty())
4291 pageTitle=pd->name();
4292 else
4293 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4294 QCString pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
4295 Doxygen::indexList->addContentsItem(
4296 hasSubPages || hasSections,
4297 pageTitle,
4298 gd->getReference(),
4299 gd->getOutputFileBase(),
4300 si ? si->label() : QCString(),
4301 hasSubPages || hasSections,
4302 TRUE,
4303 nullptr,
4304 pageTitleAsHtml); // addToNavIndex
4305 if (hasSections || hasSubPages)
4306 {
4307 Doxygen::indexList->incContentsDepth();
4308 }
4309 if (hasSections)
4310 {
4311 pd->addSectionsToIndex();
4312 }
4313 writePages(pd,nullptr);
4314 if (hasSections || hasSubPages)
4315 {
4316 Doxygen::indexList->decContentsDepth();
4317 }
4318 }
4319 }
4320 else if (lde->kind()==LayoutDocEntry::GroupNestedGroups)
4321 {
4322 if (!gd->getSubGroups().empty())
4323 {
4324 startIndexHierarchy(ol,level+1);
4325 for (const auto &subgd : gd->getSubGroups())
4326 {
4327 writeGroupTreeNode(ol,subgd,level+1,ftv,addToIndex);
4328 }
4329 endIndexHierarchy(ol,level+1);
4330 }
4331 }
4332 }
4333
4334 ol.endIndexListItem();
4335
4336 if (addToIndex)
4337 {
4338 Doxygen::indexList->decContentsDepth();
4339 }
4340 if (ftv)
4341 {
4342 ftv->decContentsDepth();
4343 }
4344 //gd->visited=TRUE;
4345 }
4346}
virtual bool isVisible() const =0
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:57
QCString label() const
Definition section.h:68
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:178
static void writePages(PageDef *pd, FTVHelp *ftv)
Definition index.cpp:3918
QCString parseCommentAsHtml(const Definition *scope, const MemberDef *member, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5321
QCString parseCommentAsText(const Definition *scope, const MemberDef *md, const QCString &doc, const QCString &fileName, int lineNr)
Definition util.cpp:5265

References FTVHelp::addContentsItem(), addMembersToIndex(), Config_getBool, FTVHelp::decContentsDepth(), OutputList::docify(), LinkedRefMap< T, Hash, KeyEqual, Map >::empty(), MemberVector::empty(), endIndexHierarchy(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), FALSE, LinkedMap< T, Hash, KeyEqual, Map >::find(), OutputList::generateDoc(), GroupDef::getClasses(), GroupDef::getConcepts(), Definition::getDefFileName(), Definition::getDefLine(), GroupDef::getDirs(), GroupDef::getFiles(), GroupDef::getMemberList(), GroupDef::getMemberLists(), GroupDef::getNamespaces(), Definition::getOutputFileBase(), GroupDef::getPages(), Definition::getReference(), GroupDef::getSubGroups(), GroupDef::groupTitle(), FTVHelp::incContentsDepth(), Doxygen::indexList, LayoutDocManager::instance(), SectionManager::instance(), GroupDef::isASubGroup(), Definition::isReference(), Definition::isVisible(), GroupDef::isVisibleInHierarchy(), SectionInfo::label(), Definition::name(), parseCommentAsHtml(), parseCommentAsText(), LinkedRefMap< T, Hash, KeyEqual, Map >::size(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), TRUE, LayoutDocEntryMemberDef::type, warn, writeGroupTreeNode(), and writePages().

Referenced by writeGroupHierarchy(), and writeGroupTreeNode().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1336 of file index.cpp.

1337{
1338 if (Index::instance().numHierarchyExceptions()==0) return;
1339 ol.pushGeneratorState();
1340 //1.{
1342
1343 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionHierarchy);
1344 QCString title = lne ? lne->title() : theTranslator->trExceptionHierarchy();
1345 bool addToIndex = lne==nullptr || lne->visible();
1346
1347 startFile(ol,"exceptionhierarchy",false,QCString(), title, HighlightedItem::ExceptionHierarchy);
1348 startTitle(ol,QCString());
1349 ol.parseText(title);
1350 endTitle(ol,QCString(),QCString());
1351 ol.startContents();
1352 ol.startTextBlock();
1353
1354 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1355 {
1358 ol.startParagraph();
1359 ol.startTextLink("exceptioninherits",QCString());
1360 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1361 ol.endTextLink();
1362 ol.endParagraph();
1365 }
1366 ol.parseText(lne ? lne->intro() : theTranslator->trExceptionHierarchyDescription());
1367 ol.endTextBlock();
1368
1369 // ---------------
1370 // Static exception hierarchy for Latex/RTF
1371 // ---------------
1372 ol.pushGeneratorState();
1373 //2.{
1375 Doxygen::indexList->disable();
1376
1377 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Exception);
1378
1379 Doxygen::indexList->enable();
1380 ol.popGeneratorState();
1381 //2.}
1382
1383 // ---------------
1384 // Dynamic exception hierarchical index for HTML
1385 // ---------------
1386 ol.pushGeneratorState();
1387 //2.{
1389
1390 {
1391 if (addToIndex)
1392 {
1393 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"exceptionhierarchy",QCString(),TRUE,TRUE);
1394 }
1395 FTVHelp ftv(false);
1396 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Exception);
1397 TextStream t;
1398 ftv.generateTreeViewInline(t);
1399 ol.pushGeneratorState();
1401 ol.writeString(t.str());
1402 ol.popGeneratorState();
1403 }
1404 ol.popGeneratorState();
1405 //2.}
1406 // ------
1407
1408 endFile(ol);
1409 ol.popGeneratorState();
1410 //1.}
1411}
void enable(OutputType o)
static void writeClassHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1063

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().

Referenced by writeIndexHierarchyEntries().

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1124 of file index.cpp.

1125{
1126 if (Index::instance().numHierarchyClasses()==0) return;
1127 ol.pushGeneratorState();
1128 //1.{
1131
1132 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1133 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1134 bool addToIndex = lne==nullptr || lne->visible();
1135
1136 startFile(ol,"hierarchy",false,QCString(), title, HighlightedItem::ClassHierarchy);
1137 startTitle(ol,QCString());
1138 ol.parseText(title);
1139 endTitle(ol,QCString(),QCString());
1140 ol.startContents();
1141 ol.startTextBlock();
1142
1143 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1144 {
1145 ol.pushGeneratorState();
1149 ol.startParagraph();
1150 ol.startTextLink("inherits",QCString());
1151 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1152 ol.endTextLink();
1153 ol.endParagraph();
1154 ol.popGeneratorState();
1155 }
1156 ol.parseText(lne ? lne->intro() : theTranslator->trClassHierarchyDescription());
1157 ol.endTextBlock();
1158
1159 // ---------------
1160 // Static class hierarchy for Latex/RTF
1161 // ---------------
1162 ol.pushGeneratorState();
1163 //2.{
1165 Doxygen::indexList->disable();
1166
1167 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Class);
1168
1169 Doxygen::indexList->enable();
1170 ol.popGeneratorState();
1171 //2.}
1172
1173 // ---------------
1174 // Dynamic class hierarchical index for HTML
1175 // ---------------
1176 ol.pushGeneratorState();
1177 //2.{
1179
1180 {
1181 if (addToIndex)
1182 {
1183 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"hierarchy",QCString(),TRUE,TRUE);
1184 }
1185 FTVHelp ftv(false);
1186 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Class);
1187 TextStream t;
1188 ftv.generateTreeViewInline(t);
1189 ol.pushGeneratorState();
1191 ol.writeString(t.str());
1192 ol.popGeneratorState();
1193 }
1194 ol.popGeneratorState();
1195 //2.}
1196 // ------
1197
1198 endFile(ol);
1199 ol.popGeneratorState();
1200 //1.}
1201}

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().

Referenced by writeIndexHierarchyEntries().

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1231 of file index.cpp.

1232{
1233 if (Index::instance().numHierarchyInterfaces()==0) return;
1234 ol.pushGeneratorState();
1235 //1.{
1237
1238 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceHierarchy);
1239 QCString title = lne ? lne->title() : theTranslator->trInterfaceHierarchy();
1240 bool addToIndex = lne==nullptr || lne->visible();
1241
1242 startFile(ol,"interfacehierarchy",false,QCString(), title, HighlightedItem::InterfaceHierarchy);
1243 startTitle(ol,QCString());
1244 ol.parseText(title);
1245 endTitle(ol,QCString(),QCString());
1246 ol.startContents();
1247 ol.startTextBlock();
1248
1249 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
1250 {
1253 ol.startParagraph();
1254 ol.startTextLink("interfaceinherits",QCString());
1255 ol.parseText(theTranslator->trGotoGraphicalHierarchy());
1256 ol.endTextLink();
1257 ol.endParagraph();
1260 }
1261 ol.parseText(lne ? lne->intro() : theTranslator->trInterfaceHierarchyDescription());
1262 ol.endTextBlock();
1263
1264 // ---------------
1265 // Static interface hierarchy for Latex/RTF
1266 // ---------------
1267 ol.pushGeneratorState();
1268 //2.{
1270 Doxygen::indexList->disable();
1271
1272 writeClassHierarchy(ol,nullptr,addToIndex,ClassDef::Interface);
1273
1274 Doxygen::indexList->enable();
1275 ol.popGeneratorState();
1276 //2.}
1277
1278 // ---------------
1279 // Dynamic interface hierarchical index for HTML
1280 // ---------------
1281 ol.pushGeneratorState();
1282 //2.{
1284
1285 {
1286 if (addToIndex)
1287 {
1288 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"interfacehierarchy",QCString(),TRUE,TRUE);
1289 }
1290 FTVHelp ftv(false);
1291 writeClassHierarchy(ol,&ftv,addToIndex,ClassDef::Interface);
1292 TextStream t;
1293 ftv.generateTreeViewInline(t);
1294 ol.pushGeneratorState();
1296 ol.writeString(t.str());
1297 ol.popGeneratorState();
1298 }
1299 ol.popGeneratorState();
1300 //2.}
1301 // ------
1302
1303 endFile(ol);
1304 ol.popGeneratorState();
1305 //1.}
1306}

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().

Referenced by writeIndexHierarchyEntries().

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4824 of file index.cpp.

4825{
4826 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4827 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4828 bool disableIndex = Config_getBool(DISABLE_INDEX);
4829 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4830 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4831 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4832 QCString projectName = Config_getString(PROJECT_NAME);
4833 // save old generator state
4834 ol.pushGeneratorState();
4835
4836 QCString projPrefix;
4837 if (!projectName.isEmpty())
4838 {
4839 projPrefix=projectName+" ";
4840 }
4841
4842 //--------------------------------------------------------------------
4843 // write HTML index
4844 //--------------------------------------------------------------------
4846
4847 QCString defFileName =
4848 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4849 int defLine =
4850 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4851
4852 QCString title, titleAsHtml;
4853 if (!mainPageHasTitle())
4854 {
4855 title = theTranslator->trMainPage();
4856 }
4857 else if (Doxygen::mainPage)
4858 {
4859 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4860 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4861 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4862 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4863 }
4864
4865 QCString indexName="index";
4866 ol.startFile(indexName,false,QCString(),title);
4867
4869 {
4870 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4871 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4872 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4873 if (hasTitle) // to avoid duplicate entries in the treeview
4874 {
4875 Doxygen::indexList->addContentsItem(hasSubs,
4876 title,
4877 QCString(),
4878 indexName,
4879 QCString(),
4880 hasSubs,
4881 TRUE,
4882 nullptr,
4883 titleAsHtml);
4884 }
4885 if (hasSubs)
4886 {
4887 writePages(Doxygen::mainPage.get(),nullptr);
4888 }
4889 }
4890
4891 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4892 ol.startQuickIndices();
4893 if (!disableIndex && !quickLinksAfterSplitbar)
4894 {
4896 }
4897 ol.endQuickIndices();
4898 ol.writeSplitBar(indexName,QCString());
4899 if (quickLinksAfterSplitbar)
4900 {
4902 }
4903 ol.writeSearchInfo();
4904 bool headerWritten=FALSE;
4906 {
4907 if (!Doxygen::mainPage->title().isEmpty())
4908 {
4909 if (Doxygen::mainPage->title().lower() != "notitle")
4910 ol.startPageDoc(Doxygen::mainPage->title());
4911 else
4912 ol.startPageDoc("");
4913 }
4914 else
4915 ol.startPageDoc(projectName);
4916 }
4917 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4918 {
4919 if (Doxygen::mainPage->title().lower()!="notitle")
4920 {
4921 ol.startHeaderSection();
4923 ol.generateDoc(Doxygen::mainPage->docFile(),
4924 Doxygen::mainPage->getStartBodyLine(),
4925 Doxygen::mainPage.get(),
4926 nullptr,
4927 Doxygen::mainPage->title(),
4928 DocOptions()
4929 .setSingleLine(true));
4930 headerWritten = TRUE;
4931 }
4932 }
4933 else
4934 {
4935 if (!projectName.isEmpty())
4936 {
4937 ol.startHeaderSection();
4939 ol.parseText(theTranslator->trDocumentation(projectName));
4940 headerWritten = TRUE;
4941 }
4942 }
4943 if (headerWritten)
4944 {
4946 ol.endHeaderSection();
4947 }
4948
4949 ol.startContents();
4950 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4951 {
4953 }
4954
4956 {
4957 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4958 {
4959 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4960 }
4961
4962 ol.startTextBlock();
4963 ol.generateDoc(defFileName,
4964 defLine,
4965 Doxygen::mainPage.get(),
4966 nullptr,
4967 Doxygen::mainPage->documentation(),
4968 DocOptions()
4969 .setIndexWords(true));
4970 ol.endTextBlock();
4971 ol.endPageDoc();
4972 }
4973
4976 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4977 Doxygen::indexList->addIndexFile(fn);
4978
4979 if (Doxygen::mainPage &&
4980 generateTreeView &&
4981 pageOutlinePanel &&
4982 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4983 Doxygen::mainPage->hasSections()
4984 )
4985 {
4986 ol.writeString("</div><!-- doc-content -->\n");
4987 ol.endContents();
4988 Doxygen::mainPage->writePageNavigation(ol);
4989 ol.writeString("</div><!-- container -->\n");
4990 endFile(ol,true,true);
4991 }
4992 else
4993 {
4994 endFile(ol);
4995 }
4996
4998
4999 //--------------------------------------------------------------------
5000 // write LaTeX/RTF index
5001 //--------------------------------------------------------------------
5005
5007 {
5008 msg("Generating main page...\n");
5009 Doxygen::mainPage->writeDocumentation(ol);
5010 }
5011
5012 ol.startFile("refman",false,QCString(),QCString());
5016
5017 if (projPrefix.isEmpty())
5018 {
5019 ol.parseText(theTranslator->trReferenceManual());
5020 }
5021 else
5022 {
5023 ol.parseText(projPrefix);
5024 }
5025
5026 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5027 {
5028 ol.startProjectNumber();
5029 ol.generateDoc(defFileName,
5030 defLine,
5031 Doxygen::mainPage.get(),
5032 nullptr,
5033 Config_getString(PROJECT_NUMBER),
5034 DocOptions());
5035 ol.endProjectNumber();
5036 }
5039 ol.parseText(theTranslator->trGeneratedBy());
5043
5044 ol.lastIndexPage();
5046 {
5049 }
5050 const auto &index = Index::instance();
5051 if (index.numDocumentedPages()>0)
5052 {
5055 }
5056
5058 if (!Config_getBool(LATEX_HIDE_INDICES))
5059 {
5060 //if (indexedPages>0)
5061 //{
5062 // ol.startIndexSection(isPageIndex);
5063 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5064 // ol.endIndexSection(isPageIndex);
5065 //}
5066 if (index.numDocumentedModules()>0)
5067 {
5069 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5071 }
5072 if (index.numDocumentedGroups()>0)
5073 {
5075 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5077 }
5078 if (index.numDocumentedDirs()>0)
5079 {
5081 ol.parseText(theTranslator->trDirIndex());
5083 }
5084 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5085 {
5086 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5087 if (lne)
5088 {
5090 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5092 }
5093 }
5094 if (index.numDocumentedConcepts()>0)
5095 {
5097 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5099 }
5100 if (index.numHierarchyInterfaces()>0)
5101 {
5103 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5105 }
5106 if (index.numHierarchyClasses()>0)
5107 {
5108 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5109 if (lne)
5110 {
5112 ol.parseText(/*projPrefix+*/
5113 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5114 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5115 theTranslator->trHierarchicalIndex()
5116 ));
5118 }
5119 }
5120 if (index.numHierarchyExceptions()>0)
5121 {
5123 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5125 }
5126 if (index.numAnnotatedInterfacesPrinted()>0)
5127 {
5129 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5131 }
5132 if (index.numAnnotatedClassesPrinted()>0)
5133 {
5135 ol.parseText(/*projPrefix+*/
5136 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5137 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5138 theTranslator->trCompoundIndex()
5139 ));
5141 }
5142 if (index.numAnnotatedStructsPrinted()>0)
5143 {
5145 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5147 }
5148 if (index.numAnnotatedExceptionsPrinted()>0)
5149 {
5151 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5153 }
5154 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5155 {
5157 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5159 }
5160 }
5162
5163 if (index.numDocumentedModules()>0)
5164 {
5166 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5168 }
5169 if (index.numDocumentedGroups()>0)
5170 {
5172 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5174 }
5175 if (index.numDocumentedDirs()>0)
5176 {
5178 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5180 }
5181 if (index.numDocumentedNamespaces()>0)
5182 {
5184 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5186 }
5187 if (index.numDocumentedConcepts()>0)
5188 {
5190 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5192 }
5193 if (index.numAnnotatedInterfacesPrinted()>0)
5194 {
5196 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5198 }
5199 if (index.numAnnotatedClassesPrinted()>0)
5200 {
5202 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5204 }
5205 if (index.numAnnotatedStructsPrinted()>0)
5206 {
5208 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5210 }
5211 if (index.numAnnotatedExceptionsPrinted()>0)
5212 {
5214 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5216 }
5217 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5218 {
5220 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5222 }
5223 if (!Doxygen::exampleLinkedMap->empty())
5224 {
5226 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5228 }
5230 endFile(ol);
5231
5232 ol.popGeneratorState();
5233}
static const QCString crawlFileName
Definition sitemap.h:75
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
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ isFileDocumentation
Definition index.h:51
@ 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
@ isExampleDocumentation
Definition index.h:52
@ isClassDocumentation
Definition index.h:49
@ isCompoundIndex
Definition index.h:42
@ isEndIndex
Definition index.h:55
@ 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
void addHtmlExtensionIfMissing(QCString &fName)
Definition util.cpp:4823

References addHtmlExtensionIfMissing(), Config_getBool, Config_getString, Crawlmap::crawlFileName, OutputList::disable(), OutputList::disableAllBut(), Docbook, OutputList::enable(), OutputList::endContents(), endFile(), OutputList::endHeaderSection(), OutputList::endIndexSection(), OutputList::endPageDoc(), OutputList::endProjectNumber(), OutputList::endQuickIndices(), OutputList::endTextBlock(), OutputList::endTitleHead(), Doxygen::exampleLinkedMap, FALSE, LayoutNavEntry::find(), OutputList::generateDoc(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), isClassDocumentation, isClassHierarchyIndex, isCompoundIndex, isConceptDocumentation, isConceptIndex, isDirDocumentation, isDirIndex, QCString::isEmpty(), isEndIndex, isExampleDocumentation, isFileDocumentation, isFileIndex, isMainPage, isModuleDocumentation, isModuleIndex, isNamespaceDocumentation, isNamespaceIndex, isPageDocumentation, isTitlePageAuthor, isTitlePageStart, isTopicDocumentation, isTopicIndex, OutputList::lastIndexPage(), Latex, Main, Doxygen::mainPage, mainPageHasTitle(), msg, parseCommentAsHtml(), parseCommentAsText(), OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), qstricmp(), LayoutDocManager::rootNavEntry(), RTF, OutputList::startContents(), OutputList::startFile(), OutputList::startHeaderSection(), OutputList::startIndexSection(), OutputList::startPageDoc(), OutputList::startProjectNumber(), OutputList::startQuickIndices(), OutputList::startTextBlock(), OutputList::startTitleHead(), theTranslator, TRUE, writePages(), OutputList::writeQuickLinks(), OutputList::writeSearchInfo(), OutputList::writeSplitBar(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeIndexHierarchy()

void writeIndexHierarchy ( OutputList & ol)

Definition at line 5759 of file index.cpp.

5760{
5761 writeMenuData();
5763 if (lne)
5764 {
5766 }
5767}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5237
static void writeMenuData()
Definition index.cpp:5743

References LayoutNavEntry::children(), LayoutDocManager::instance(), LayoutDocManager::rootNavEntry(), writeIndexHierarchyEntries(), and writeMenuData().

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5237 of file index.cpp.

5238{
5239 auto isRef = [](const QCString &s)
5240 {
5241 return s.startsWith("@ref") || s.startsWith("\\ref");
5242 };
5243 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5244 const auto &index = Index::instance();
5245 for (const auto &lne : entries)
5246 {
5247 LayoutNavEntry::Kind kind = lne->kind();
5248 size_t idx = static_cast<size_t>(kind);
5249 if (idx>=indexWritten.size())
5250 {
5251 size_t oldSize = indexWritten.size();
5252 size_t newSize = idx+1;
5253 indexWritten.resize(newSize);
5254 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5255 }
5256 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5257 bool addToIndex=lne->visible();
5258 bool needsClosing=FALSE;
5259 if (!indexWritten.at(idx))
5260 {
5261 switch(kind)
5262 {
5263 case LayoutNavEntry::MainPage:
5264 msg("Generating index page...\n");
5265 writeIndex(ol);
5266 break;
5267 case LayoutNavEntry::Pages:
5268 msg("Generating page index...\n");
5269 writePageIndex(ol);
5270 break;
5271 case LayoutNavEntry::Topics:
5272 msg("Generating topic index...\n");
5273 writeTopicIndex(ol);
5274 break;
5275 case LayoutNavEntry::Modules:
5276 {
5277 if (index.numDocumentedModules()>0 && addToIndex)
5278 {
5279 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5280 Doxygen::indexList->incContentsDepth();
5281 needsClosing=TRUE;
5282 }
5283 }
5284 break;
5285 case LayoutNavEntry::ModuleList:
5286 msg("Generating module index...\n");
5287 writeModuleIndex(ol);
5288 break;
5289 case LayoutNavEntry::ModuleMembers:
5290 msg("Generating module member index...\n");
5292 break;
5293 case LayoutNavEntry::Namespaces:
5294 {
5295 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5296 if (showNamespaces)
5297 {
5298 if (index.numDocumentedNamespaces()>0 && addToIndex)
5299 {
5300 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5301 Doxygen::indexList->incContentsDepth();
5302 needsClosing=TRUE;
5303 }
5304 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5305 {
5306 msg("Generating namespace index...\n");
5308 }
5309 }
5310 }
5311 break;
5312 case LayoutNavEntry::NamespaceList:
5313 {
5314 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5315 if (showNamespaces)
5316 {
5317 msg("Generating namespace index...\n");
5319 }
5320 }
5321 break;
5322 case LayoutNavEntry::NamespaceMembers:
5323 msg("Generating namespace member index...\n");
5325 break;
5326 case LayoutNavEntry::Classes:
5327 if (index.numAnnotatedClasses()>0 && addToIndex)
5328 {
5329 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5330 Doxygen::indexList->incContentsDepth();
5331 needsClosing=TRUE;
5332 }
5333 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5334 {
5335 msg("Generating annotated compound index...\n");
5337 }
5338 break;
5339 case LayoutNavEntry::Concepts:
5340 msg("Generating concept index...\n");
5342 break;
5343 case LayoutNavEntry::ClassList:
5344 msg("Generating annotated compound index...\n");
5346 break;
5347 case LayoutNavEntry::ClassIndex:
5348 msg("Generating alphabetical compound index...\n");
5350 break;
5351 case LayoutNavEntry::ClassHierarchy:
5352 msg("Generating hierarchical class index...\n");
5354 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5355 {
5356 msg("Generating graphical class hierarchy...\n");
5358 }
5359 break;
5360 case LayoutNavEntry::ClassMembers:
5361 if (!sliceOpt)
5362 {
5363 msg("Generating member index...\n");
5365 }
5366 break;
5367 case LayoutNavEntry::Interfaces:
5368 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5369 {
5370 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5371 Doxygen::indexList->incContentsDepth();
5372 needsClosing=TRUE;
5373 }
5374 break;
5375 case LayoutNavEntry::InterfaceList:
5376 if (sliceOpt)
5377 {
5378 msg("Generating annotated interface index...\n");
5380 }
5381 break;
5382 case LayoutNavEntry::InterfaceIndex:
5383 if (sliceOpt)
5384 {
5385 msg("Generating alphabetical interface index...\n");
5387 }
5388 break;
5389 case LayoutNavEntry::InterfaceHierarchy:
5390 if (sliceOpt)
5391 {
5392 msg("Generating hierarchical interface index...\n");
5394 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5395 {
5396 msg("Generating graphical interface hierarchy...\n");
5398 }
5399 }
5400 break;
5401 case LayoutNavEntry::Structs:
5402 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5403 {
5404 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5405 Doxygen::indexList->incContentsDepth();
5406 needsClosing=TRUE;
5407 }
5408 break;
5409 case LayoutNavEntry::StructList:
5410 if (sliceOpt)
5411 {
5412 msg("Generating annotated struct index...\n");
5414 }
5415 break;
5416 case LayoutNavEntry::StructIndex:
5417 if (sliceOpt)
5418 {
5419 msg("Generating alphabetical struct index...\n");
5421 }
5422 break;
5423 case LayoutNavEntry::Exceptions:
5424 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5425 {
5426 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5427 Doxygen::indexList->incContentsDepth();
5428 needsClosing=TRUE;
5429 }
5430 break;
5431 case LayoutNavEntry::ExceptionList:
5432 if (sliceOpt)
5433 {
5434 msg("Generating annotated exception index...\n");
5436 }
5437 break;
5438 case LayoutNavEntry::ExceptionIndex:
5439 if (sliceOpt)
5440 {
5441 msg("Generating alphabetical exception index...\n");
5443 }
5444 break;
5445 case LayoutNavEntry::ExceptionHierarchy:
5446 if (sliceOpt)
5447 {
5448 msg("Generating hierarchical exception index...\n");
5450 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5451 {
5452 msg("Generating graphical exception hierarchy...\n");
5454 }
5455 }
5456 break;
5457 case LayoutNavEntry::Files:
5458 {
5459 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5460 {
5461 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5462 Doxygen::indexList->incContentsDepth();
5463 needsClosing=TRUE;
5464 }
5465 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5466 {
5467 msg("Generating file index...\n");
5468 writeFileIndex(ol);
5469 }
5470 }
5471 break;
5472 case LayoutNavEntry::FileList:
5473 msg("Generating file index...\n");
5474 writeFileIndex(ol);
5475 break;
5476 case LayoutNavEntry::FileGlobals:
5477 msg("Generating file member index...\n");
5479 break;
5480 case LayoutNavEntry::Examples:
5481 msg("Generating example index...\n");
5483 break;
5484 case LayoutNavEntry::User:
5485 if (addToIndex)
5486 {
5487 // prepend a ! or ^ marker to the URL to avoid tampering with it
5488 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5489 bool isRelative=url.at(0)=='!';
5490 if (!url.isEmpty() && !isRelative) // absolute URL
5491 {
5492 url.prepend("^"); // prepend ^ to absolute URL
5493 }
5494 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5495 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5496 }
5497 break;
5498 case LayoutNavEntry::UserGroup:
5499 if (addToIndex)
5500 {
5501 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5502 if (!url.isEmpty())
5503 {
5504 if (url=="!") // result of a "[none]" url
5505 {
5506 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5507 }
5508 else
5509 {
5510 bool isRelative=url.at(0)=='!';
5511 if (!isRelative) // absolute URL
5512 {
5513 url.prepend("^"); // prepend ^ to absolute URL
5514 }
5515 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5516 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5517 }
5518 }
5519 else
5520 {
5521 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5522 }
5523 Doxygen::indexList->incContentsDepth();
5524 needsClosing=TRUE;
5525 }
5526 writeUserGroupStubPage(ol,lne.get());
5527 break;
5528 case LayoutNavEntry::None:
5529 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5530 break;
5531 }
5532 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5533 {
5534 indexWritten.at(idx)=TRUE;
5535 }
5536 }
5537 writeIndexHierarchyEntries(ol,lne->children());
5538 if (needsClosing)
5539 {
5540 switch(kind)
5541 {
5542 case LayoutNavEntry::Modules:
5543 case LayoutNavEntry::Namespaces:
5544 case LayoutNavEntry::Classes:
5545 case LayoutNavEntry::Files:
5546 case LayoutNavEntry::UserGroup:
5547 Doxygen::indexList->decContentsDepth();
5548 break;
5549 default:
5550 break;
5551 }
5552 }
5553 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5554 }
5555
5556 // always write the directory index as it is used for non-HTML output only
5557 writeDirIndex(ol);
5558}
QCString & prepend(const char *s)
Definition qcstring.h:422
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1205
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2670
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2513
static void writeDirIndex(OutputList &ol)
Definition index.cpp:1537
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3251
static std::vector< bool > indexWritten
Definition index.cpp:5235
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2642
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1566
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1310
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2426
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2656
static void writePageIndex(OutputList &ol)
Definition index.cpp:3979
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:2019
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2684
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1231
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4787
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4372
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3799
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1415
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3824
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2455
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2484
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4686
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4512
static void writeIndex(OutputList &ol)
Definition index.cpp:4824
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1336
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3619
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1124
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3435
Kind
Definition layout.h:193
QCString correctURL(const QCString &url, const QCString &relPath)
Corrects URL url according to the relative path relPath.
Definition util.cpp:5837

References QCString::at(), Config_getBool, correctURL(), FALSE, Doxygen::indexList, indexWritten, Index::instance(), LayoutDocManager::instance(), QCString::isEmpty(), msg, QCString::prepend(), TRUE, writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedExceptionIndex(), writeAnnotatedIndex(), writeAnnotatedInterfaceIndex(), writeAnnotatedStructIndex(), writeClassMemberIndex(), writeConceptIndex(), writeDirIndex(), writeExampleIndex(), writeFileIndex(), writeFileMemberIndex(), writeGraphicalClassHierarchy(), writeGraphicalExceptionHierarchy(), writeGraphicalInterfaceHierarchy(), writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), writeHierarchicalInterfaceIndex(), writeIndex(), writeIndexHierarchyEntries(), writeModuleIndex(), writeModuleMemberIndex(), writeNamespaceIndex(), writeNamespaceMemberIndex(), writePageIndex(), writeTopicIndex(), and writeUserGroupStubPage().

Referenced by writeIndexHierarchy(), and writeIndexHierarchyEntries().

◆ writeMemberList()

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

Definition at line 2751 of file index.cpp.

2754{
2755 int index = static_cast<int>(type);
2756 const int numIndices = 4;
2757 ASSERT(index<numIndices);
2758
2759 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2760 QCString &prevNamespaceName);
2761
2762 // each index tab has its own write function
2763 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2764 {
2769 };
2770 QCString prevName;
2771 QCString prevDefName;
2772 bool first=TRUE;
2773 bool firstSection=TRUE;
2774 bool firstItem=TRUE;
2775 const Index::MemberIndexList *mil = nullptr;
2776 std::string letter;
2777 for (const auto &kv : memberIndexMap)
2778 {
2779 if (!page.empty()) // specific page mode
2780 {
2781 auto it = memberIndexMap.find(page);
2782 if (it != memberIndexMap.end())
2783 {
2784 mil = &it->second;
2785 letter = page;
2786 }
2787 }
2788 else // do all pages
2789 {
2790 mil = &kv.second;
2791 letter = kv.first;
2792 }
2793 if (mil==nullptr || mil->empty()) continue;
2794 for (const auto &md : *mil)
2795 {
2796 const char *sep = nullptr;
2797 bool isFunc=!md->isObjCMethod() &&
2798 (md->isFunction() || md->isSlot() || md->isSignal());
2799 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2800 int startIndex = getPrefixIndex(name);
2801 if (name.data()+startIndex!=prevName) // new entry
2802 {
2803 if ((prevName.isEmpty() ||
2804 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2805 useSections) // new section
2806 {
2807 if (!firstItem) ol.endItemListItem();
2808 if (!firstSection) ol.endItemList();
2809 QCString cs = letterToLabel(letter);
2810 QCString anchor = "index_"+convertToId(cs);
2811 QCString title = "- "+letter+" -";
2812 ol.startSection(anchor,title,SectionType::Subsection);
2813 ol.docify(title);
2814 ol.endSection(anchor,SectionType::Subsection);
2815 ol.startItemList();
2816 firstSection=FALSE;
2817 firstItem=TRUE;
2818 }
2819 else if (!useSections && first)
2820 {
2821 ol.startItemList();
2822 first=FALSE;
2823 }
2824
2825 // member name
2826 if (!firstItem) ol.endItemListItem();
2827 ol.startItemListItem();
2828 firstItem=FALSE;
2829 ol.docify(name);
2830 if (isFunc) ol.docify("()");
2831 //ol.writeString("\n");
2832
2833 // link to class
2834 prevDefName="";
2835 sep = "&#160;:&#160;";
2836 prevName = name.data()+startIndex;
2837 }
2838 else // same entry
2839 {
2840 sep = ", ";
2841 // link to class for other members with the same name
2842 }
2843 if (index<numIndices)
2844 {
2845 // write the link for the specific list type
2846 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2847 }
2848 }
2849 if (!page.empty())
2850 {
2851 break;
2852 }
2853 }
2854 if (!firstItem) ol.endItemListItem();
2855 ol.endItemList();
2856}
std::vector< const MemberDef * > MemberIndexList
Definition index.h:167
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:315
static constexpr int Subsection
Definition section.h:34
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition index.cpp:2710
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2723
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2697
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2736
#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().

Referenced by writeClassMemberIndexFiltered(), writeFileMemberIndexFiltered(), writeModuleMemberIndexFiltered(), and writeNamespaceMemberIndexFiltered().

◆ writeMemberToIndex()

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

Definition at line 468 of file index.cpp.

469{
470 bool isAnonymous = md->isAnonymous();
471 bool hideUndocMembers = Config_getBool(HIDE_UNDOC_MEMBERS);
472 const MemberVector &enumList = md->enumFieldList();
473 bool isDir = !enumList.empty() && md->isEnumerate();
474 auto defType = def->definitionType();
475 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
476 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
477 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
478 md->qualifiedName() : md->name();
479 if (md->getOuterScope()==def ||
480 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
482 {
483 Doxygen::indexList->addContentsItem(isDir,
484 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
485 }
486 else // inherited member
487 {
488 Doxygen::indexList->addContentsItem(isDir,
489 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
490 }
491 if (isDir)
492 {
493 if (!isAnonymous)
494 {
495 Doxygen::indexList->incContentsDepth();
496 }
497 for (const auto &emd : enumList)
498 {
499 if (!hideUndocMembers || emd->hasDocumentation())
500 {
501 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
502 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
503 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
504 emd->qualifiedName() : emd->name();
505 if (emd->getOuterScope()==def ||
506 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
507 emd->getOuterScope()==Doxygen::globalScope)
508 {
509 Doxygen::indexList->addContentsItem(FALSE,
510 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
511 }
512 else // inherited member
513 {
514 Doxygen::indexList->addContentsItem(FALSE,
515 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
516 }
517 }
518 }
519 if (!isAnonymous)
520 {
521 Doxygen::indexList->decContentsDepth();
522 }
523 }
524}
virtual QCString qualifiedName() const =0
virtual GroupDef * getGroupDef()=0
virtual const MemberVector & enumFieldList() const =0
virtual const NamespaceDef * getNamespaceDef() const =0
virtual bool isEnumerate() const =0

References Definition::anchor(), Config_getBool, Definition::definitionType(), MemberVector::empty(), MemberDef::enumFieldList(), FALSE, MemberDef::getGroupDef(), MemberDef::getNamespaceDef(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::globalScope, Doxygen::indexList, Definition::isAnonymous(), MemberDef::isEnumerate(), Definition::name(), Definition::qualifiedName(), Definition::TypeFile, and Definition::TypeModule.

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5743 of file index.cpp.

5744{
5745 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5746 QCString outputDir = Config_getBool(HTML_OUTPUT);
5748 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5749 if (t.is_open())
5750 {
5752 t << "var menudata={";
5753 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5754 if (hasChildren) t << "]";
5755 t << "}\n";
5756 }
5757}
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:649

References Config_getBool, LayoutDocManager::instance(), JAVASCRIPT_LICENSE_TEXT, Portable::openOutputStream(), renderQuickLinksAsJs(), LayoutDocManager::rootNavEntry(), and TRUE.

Referenced by writeIndexHierarchy().

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4512 of file index.cpp.

4513{
4514 if (ModuleManager::instance().numDocumentedModules()==0) return;
4515 ol.pushGeneratorState();
4516 // 1.{
4517
4520 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4521 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4522 QCString title = lne ? lne->title() : theTranslator->trModules();
4523 bool addToIndex = lne==nullptr || lne->visible();
4524
4525 startFile(ol,"modules",false,QCString(),title,HighlightedItem::Modules);
4526 startTitle(ol,QCString());
4527 ol.parseText(title);
4528 endTitle(ol,QCString(),QCString());
4529 ol.startContents();
4530 ol.startTextBlock();
4531 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4532 ol.endTextBlock();
4533
4534 // ---------------
4535 // Normal group index for Latex/RTF
4536 // ---------------
4537 // 2.{
4538 ol.pushGeneratorState();
4540 Doxygen::indexList->disable();
4541
4542 writeModuleList(ol,nullptr,FALSE);
4543
4544 Doxygen::indexList->enable();
4545 ol.popGeneratorState();
4546 // 2.}
4547
4548 // ---------------
4549 // interactive group index for HTML
4550 // ---------------
4551 // 2.{
4552 ol.pushGeneratorState();
4554
4555 {
4556 if (addToIndex)
4557 {
4558 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4559 Doxygen::indexList->incContentsDepth();
4560 }
4561 FTVHelp ftv(false);
4562 writeModuleList(ol,&ftv,addToIndex);
4563 TextStream t;
4564 ftv.generateTreeViewInline(t);
4565 ol.writeString(t.str());
4566 if (addToIndex)
4567 {
4568 Doxygen::indexList->decContentsDepth();
4569 }
4570 }
4571 ol.popGeneratorState();
4572 // 2.}
4573 endFile(ol);
4574 ol.popGeneratorState();
4575 // 1.}
4576}
static ModuleManager & instance()
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4488

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endTextBlock(), endTitle(), FALSE, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, LayoutDocManager::instance(), ModuleManager::instance(), LayoutNavEntry::intro(), Man, Modules, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeModuleList(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeModuleLinkForMember()

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

Definition at line 2736 of file index.cpp.

2738{
2739 const ModuleDef *mod=md->getModuleDef();
2740 if (mod && prevModuleName!=mod->displayName())
2741 {
2742 ol.writeString(separator);
2743 // link to the member declaration in the module page
2744 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2745 mod->displayName());
2746 prevModuleName = mod->displayName();
2747 }
2748}
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 4488 of file index.cpp.

4489{
4490 if (ftv)
4491 {
4492 ol.pushGeneratorState();
4494 }
4495 startIndexHierarchy(ol,0);
4496 for (const auto &mod : ModuleManager::instance().modules())
4497 {
4498 if (mod->isPrimaryInterface())
4499 {
4500 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4501 }
4502 }
4503 endIndexHierarchy(ol,0);
4504 if (ftv)
4505 {
4506 ol.popGeneratorState();
4507 }
4508}
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4441

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

Referenced by writeModuleIndex().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3799 of file index.cpp.

3800{
3801 const auto &index = Index::instance();
3802 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3803 bool addToIndex = lne==nullptr || lne->visible();
3804 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3805 {
3806 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3807 Doxygen::indexList->incContentsDepth();
3808 }
3809 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3816 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3817 {
3818 Doxygen::indexList->decContentsDepth();
3819 }
3820}
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3671

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().

Referenced by writeIndexHierarchyEntries().

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3671 of file index.cpp.

3673{
3674 const auto &index = Index::instance();
3675 if (index.numDocumentedModuleMembers(hl)==0) return;
3676
3677 bool disableIndex = Config_getBool(DISABLE_INDEX);
3678 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3679 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3680 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3681 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3682
3683 bool multiPageIndex=FALSE;
3684 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3685 {
3686 multiPageIndex=TRUE;
3687 }
3688
3689 ol.pushGeneratorState();
3691
3693 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3694 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3695 bool addToIndex = lne==nullptr || lne->visible();
3696
3697 if (addToIndex)
3698 {
3699 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3700 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3701 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3702 }
3703
3704 bool first=TRUE;
3705 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3706 {
3707 QCString fileName = getMmhlInfo(hl)->fname;
3708 if (multiPageIndex)
3709 {
3710 QCString cs(letter);
3711 if (!first)
3712 {
3713 fileName+="_"+letterToLabel(cs);
3714 }
3715 if (addToIndex)
3716 {
3717 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3718 }
3719 }
3720
3721 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3722
3723 auto writeQuickLinks = [&,cap_letter=letter]()
3724 {
3726 if (!dynamicMenus)
3727 {
3729
3730 // index item for all namespace member lists
3733 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3735
3736 // index items per category member lists
3737 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3738 {
3739 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3740 {
3742 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3743 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3745 }
3746 }
3747
3749
3750 if (quickIndex)
3751 {
3752 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3753 getMmhlInfo(hl)->fname,multiPageIndex);
3754 }
3755
3756 ol.writeString("</div><!-- main-nav -->\n");
3757 }
3758 };
3759
3760 ol.startFile(fileName+extension,false,QCString(),title);
3761 ol.startQuickIndices();
3762 if (!disableIndex && !quickLinksAfterSplitbar)
3763 {
3764 writeQuickLinks();
3765 }
3766 ol.endQuickIndices();
3767 ol.writeSplitBar(fileName,QCString());
3768 if (quickLinksAfterSplitbar)
3769 {
3770 writeQuickLinks();
3771 if (!dynamicMenus)
3772 {
3773 ol.writeString("<div id=\"container\">\n");
3774 ol.writeString("<div id=\"doc-content\">\n");
3775 }
3776 }
3777 ol.writeSearchInfo();
3778
3779 ol.startContents();
3780
3781 ol.startTextBlock();
3782 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3783 ol.endTextBlock();
3784
3785 writeMemberList(ol,quickIndex,
3786 multiPageIndex ? letter : std::string(),
3787 index.isModuleIndexLetterUsed(hl),
3789 endFile(ol);
3790 first=FALSE;
3791 }
3792 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3793 ol.popGeneratorState();
3794}
const char * fname
Definition index.cpp:3651

References ModuleMemberHighlight::All, Config_getBool, OutputList::disableAllBut(), endFile(), endQuickIndexItem(), endQuickIndexList(), OutputList::endQuickIndices(), OutputList::endTextBlock(), FALSE, LayoutNavEntry::find(), fixSpaces(), MmhlInfo::fname, getMmhlInfo(), Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), letterToLabel(), MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, ModuleMembers, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), OutputList::startFile(), startQuickIndexItem(), startQuickIndexList(), OutputList::startQuickIndices(), OutputList::startTextBlock(), theTranslator, LayoutNavEntry::title(), ModuleMemberHighlight::Total, TRUE, Definition::TypeModule, LayoutNavEntry::visible(), writeMemberList(), OutputList::writeQuickLinks(), writeQuickMemberIndex(), OutputList::writeSearchInfo(), OutputList::writeSplitBar(), and OutputList::writeString().

Referenced by writeModuleMemberIndex().

◆ writeModuleMembers()

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

Definition at line 1811 of file index.cpp.

1812{
1813 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Module))
1814 {
1815 if (lde->kind()==LayoutDocEntry::MemberDecl)
1816 {
1817 const LayoutDocEntryMemberDecl *lmd = dynamic_cast<const LayoutDocEntryMemberDecl*>(lde.get());
1818 if (lmd)
1819 {
1820 MemberList *ml = mod->getMemberList(lmd->type);
1821 if (ml)
1822 {
1823 for (const auto &md : *ml)
1824 {
1825 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1826 if (md->visibleInIndex())
1827 {
1828 writeMemberToIndex(mod,md,addToIndex);
1829 }
1830 }
1831 }
1832 }
1833 }
1834 }
1835}
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().

Referenced by writeModuleTreeNode().

◆ writeModuleTreeNode()

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

Definition at line 4441 of file index.cpp.

4443{
4444 int visibleMembers = mod->countVisibleMembers();
4445 bool isDir=visibleMembers>0;
4446 if (addToIndex)
4447 {
4448 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4449 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4450 }
4451 if (ftv)
4452 {
4453 ftv->addContentsItem(false,mod->name(),
4454 mod->getReference(),mod->getOutputFileBase(),QCString(),
4455 false,false,mod);
4456 }
4457 ol.startIndexListItem();
4459 ol.parseText(mod->qualifiedName());
4461 if (mod->isReference())
4462 {
4463 ol.startTypewriter();
4464 ol.docify(" [external]");
4465 ol.endTypewriter();
4466 }
4467 if (addToIndex && isDir)
4468 {
4469 Doxygen::indexList->incContentsDepth();
4470 }
4471 if (isDir)
4472 {
4473 //ftv->incContentsDepth();
4474 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4475 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4476 writeModuleMembers(mod,addToIndex);
4477 //ftv->decContentsDepth();
4478 }
4479 if (addToIndex && isDir)
4480 {
4481 Doxygen::indexList->decContentsDepth();
4482 }
4483 ol.endIndexListItem();
4484}
virtual int countVisibleMembers() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
static void writeModuleMembers(const ModuleDef *mod, bool addToIndex)
Definition index.cpp:1811

References FTVHelp::addContentsItem(), ClassDef::Class, ModuleDef::countVisibleMembers(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), FALSE, ModuleDef::getClasses(), ModuleDef::getConcepts(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::indexList, Definition::isReference(), Definition::name(), OutputList::parseText(), Definition::qualifiedName(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), TRUE, writeClassTree(), writeConceptList(), and writeModuleMembers().

Referenced by writeModuleList().

◆ writeNamespaceIndex()

void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 2019 of file index.cpp.

2020{
2021 if (Index::instance().numDocumentedNamespaces()==0) return;
2022 ol.pushGeneratorState();
2025 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2026 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2027 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2028 bool addToIndex = lne==nullptr || lne->visible();
2029 startFile(ol,"namespaces",false,QCString(),title,HighlightedItem::Namespaces);
2030 startTitle(ol,QCString());
2031 ol.parseText(title);
2032 endTitle(ol,QCString(),QCString());
2033 ol.startContents();
2034 ol.startTextBlock();
2035 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2036 ol.endTextBlock();
2037
2038 bool first=TRUE;
2039
2040 // ---------------
2041 // Linear namespace index for Latex/RTF
2042 // ---------------
2043 ol.pushGeneratorState();
2045
2046 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2047 {
2048 if (nd->isLinkableInProject())
2049 {
2050 if (first)
2051 {
2052 ol.startIndexList();
2053 first=FALSE;
2054 }
2055 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2056 ol.startIndexKey();
2057 if (nd->getLanguage()==SrcLangExt::VHDL)
2058 {
2059 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2060 }
2061 else
2062 {
2063 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2064 }
2065 ol.endIndexKey();
2066
2067 bool hasBrief = !nd->briefDescription().isEmpty();
2068 ol.startIndexValue(hasBrief);
2069 if (hasBrief)
2070 {
2071 ol.generateDoc(nd->briefFile(),
2072 nd->briefLine(),
2073 nd.get(),
2074 nullptr,
2075 nd->briefDescription(true),
2076 DocOptions()
2077 .setSingleLine(true)
2078 .setLinkFromIndex(true));
2079 }
2080 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2081
2082 }
2083 }
2084 if (!first) ol.endIndexList();
2085
2086 ol.popGeneratorState();
2087
2088 // ---------------
2089 // Hierarchical namespace index for HTML
2090 // ---------------
2091 ol.pushGeneratorState();
2093
2094 {
2095 if (addToIndex)
2096 {
2097 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2098 Doxygen::indexList->incContentsDepth();
2099 }
2100 FTVHelp ftv(false);
2102 TextStream t;
2103 ftv.generateTreeViewInline(t);
2104 ol.writeString(t.str());
2105 if (addToIndex)
2106 {
2107 Doxygen::indexList->decContentsDepth();
2108 }
2109 }
2110
2111 ol.popGeneratorState();
2112 // ------
2113
2114 endFile(ol);
2115 ol.popGeneratorState();
2116}
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1902

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().

Referenced by writeIndexHierarchyEntries().

◆ writeNamespaceLinkForMember()

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

Definition at line 2723 of file index.cpp.

2725{
2726 const NamespaceDef *nd=md->getNamespaceDef();
2727 if (nd && prevNamespaceName!=nd->displayName())
2728 {
2729 ol.writeString(separator);
2731 nd->displayName());
2732 prevNamespaceName = nd->displayName();
2733 }
2734}

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

3620{
3621 const auto &index = Index::instance();
3622 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3623 bool addToIndex = lne==nullptr || lne->visible();
3624 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3625 {
3626 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3627 Doxygen::indexList->incContentsDepth();
3628 }
3629 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3638 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3639 {
3640 Doxygen::indexList->decContentsDepth();
3641 }
3642
3643}
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3494

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

Referenced by writeIndexHierarchyEntries().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3494 of file index.cpp.

3496{
3497 const auto &index = Index::instance();
3498 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3499
3500 bool disableIndex = Config_getBool(DISABLE_INDEX);
3501 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3502 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3503 bool dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3504 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3505
3506 bool multiPageIndex=FALSE;
3507 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3508 {
3509 multiPageIndex=TRUE;
3510 }
3511
3512 ol.pushGeneratorState();
3514
3516 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3517 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3518 bool addToIndex = lne==nullptr || lne->visible();
3519
3520 if (addToIndex)
3521 {
3522 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3523 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3524 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3525 }
3526
3527 bool first=TRUE;
3528 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3529 {
3530 QCString fileName = getNmhlInfo(hl)->fname;
3531 if (multiPageIndex)
3532 {
3533 QCString cs(letter);
3534 if (!first)
3535 {
3536 fileName+="_"+letterToLabel(cs);
3537 }
3538 if (addToIndex)
3539 {
3540 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3541 }
3542 }
3543
3544 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3545
3546 auto writeQuickLinks = [&,cap_letter=letter]()
3547 {
3549 if (!dynamicMenus)
3550 {
3552
3553 // index item for all namespace member lists
3556 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3558
3559 // index items per category member lists
3560 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3561 {
3562 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3563 {
3565 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3566 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3568 }
3569 }
3570
3572
3573 if (quickIndex)
3574 {
3575 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3576 getNmhlInfo(hl)->fname,multiPageIndex);
3577 }
3578
3579 ol.writeString("</div><!-- main-nav -->\n");
3580 }
3581 };
3582
3583 ol.startFile(fileName+extension,false,QCString(),title);
3584 ol.startQuickIndices();
3585 if (!disableIndex && !quickLinksAfterSplitbar)
3586 {
3587 writeQuickLinks();
3588 }
3589 ol.endQuickIndices();
3590 ol.writeSplitBar(fileName,QCString());
3591 if (quickLinksAfterSplitbar)
3592 {
3593 writeQuickLinks();
3594 if (!dynamicMenus)
3595 {
3596 ol.writeString("<div id=\"container\">\n");
3597 ol.writeString("<div id=\"doc-content\">\n");
3598 }
3599 }
3600 ol.writeSearchInfo();
3601
3602 ol.startContents();
3603
3604 ol.startTextBlock();
3605 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3606 ol.endTextBlock();
3607
3608 writeMemberList(ol,quickIndex,
3609 multiPageIndex ? letter : std::string(),
3610 index.isNamespaceIndexLetterUsed(hl),
3612 endFile(ol);
3613 first=FALSE;
3614 }
3615 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3616 ol.popGeneratorState();
3617}
@ NamespaceMembers
Definition index.h:78
const char * fname
Definition index.cpp:3466

References NamespaceMemberHighlight::All, Config_getBool, OutputList::disableAllBut(), endFile(), endQuickIndexItem(), endQuickIndexList(), OutputList::endQuickIndices(), OutputList::endTextBlock(), FALSE, LayoutNavEntry::find(), fixSpaces(), NmhlInfo::fname, getNmhlInfo(), Html, Doxygen::htmlFileExtension, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), letterToLabel(), MAX_ITEMS_BEFORE_MULTIPAGE_INDEX, maxItemsBeforeQuickIndex, NamespaceMembers, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), OutputList::startFile(), startQuickIndexItem(), startQuickIndexList(), OutputList::startQuickIndices(), OutputList::startTextBlock(), theTranslator, LayoutNavEntry::title(), NamespaceMemberHighlight::Total, TRUE, Definition::TypeNamespace, LayoutNavEntry::visible(), writeMemberList(), OutputList::writeQuickLinks(), writeQuickMemberIndex(), OutputList::writeSearchInfo(), OutputList::writeSplitBar(), and OutputList::writeString().

Referenced by writeNamespaceMemberIndex().

◆ writeNamespaceMembers()

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

Definition at line 1785 of file index.cpp.

1786{
1787 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1788 {
1789 if (lde->kind()==LayoutDocEntry::MemberDef)
1790 {
1791 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1792 if (lmd)
1793 {
1794 MemberList *ml = nd->getMemberList(lmd->type);
1795 if (ml)
1796 {
1797 for (const auto &md : *ml)
1798 {
1799 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1800 if (md->visibleInIndex())
1801 {
1802 writeMemberToIndex(nd,md,addToIndex);
1803 }
1804 }
1805 }
1806 }
1807 }
1808 }
1809}
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 1914 of file index.cpp.

1916{
1917 for (const auto &nd : nsLinkedMap)
1918 {
1919 if (nd->isVisibleInHierarchy())
1920 {
1921 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1922 }
1923 }
1924}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1842

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1902 of file index.cpp.

1904{
1905 for (const auto &nd : nsLinkedMap)
1906 {
1907 if (nd->isVisibleInHierarchy())
1908 {
1909 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1910 }
1911 }
1912}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1842 of file index.cpp.

1844{
1845 if (!nd->isAnonymous() &&
1846 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1847 {
1848
1849 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1850 bool hasChildren = hasNestedNamespace ||
1853 bool isLinkable = nd->isLinkable();
1854 int visibleMembers = nd->countVisibleMembers();
1855
1856 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1857
1858 QCString ref;
1859 QCString file;
1860 if (isLinkable)
1861 {
1862 ref = nd->getReference();
1863 file = nd->getOutputFileBase();
1864 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1865 {
1866 file=file.replace(0,qstrlen("namespace"),"class");
1867 }
1868 }
1869
1870 bool isDir = hasChildren || visibleMembers>0;
1871 if (isLinkable || isDir)
1872 {
1873 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1874
1875 if (addToIndex)
1876 {
1877 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1878 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1879 }
1880 if (addToIndex && isDir)
1881 {
1882 Doxygen::indexList->incContentsDepth();
1883 }
1884
1885 if (isDir)
1886 {
1887 ftv->incContentsDepth();
1888 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1889 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1890 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1891 writeNamespaceMembers(nd,addToIndex);
1892 ftv->decContentsDepth();
1893 }
1894 if (addToIndex && isDir)
1895 {
1896 Doxygen::indexList->decContentsDepth();
1897 }
1898 }
1899 }
1900}
virtual int countVisibleMembers() const =0
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1785
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 3979 of file index.cpp.

3980{
3981 if (Index::instance().numIndexedPages()==0) return;
3982 ol.pushGeneratorState();
3984 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3985 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3986 startFile(ol,"pages",false,QCString(),title,HighlightedItem::Pages);
3987 startTitle(ol,QCString());
3988 ol.parseText(title);
3989 endTitle(ol,QCString(),QCString());
3990 ol.startContents();
3991 ol.startTextBlock();
3992 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3993 ol.endTextBlock();
3994
3995 {
3996 FTVHelp ftv(false);
3997 for (const auto &pd : *Doxygen::pageLinkedMap)
3998 {
3999 if ((pd->getOuterScope()==nullptr ||
4000 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
4001 pd->visibleInIndex()
4002 )
4003 {
4004 writePages(pd.get(),&ftv);
4005 }
4006 }
4007 TextStream t;
4008 ftv.generateTreeViewInline(t);
4009 ol.writeString(t.str());
4010 }
4011
4012// ol.popGeneratorState();
4013 // ------
4014
4015 endFile(ol);
4016 ol.popGeneratorState();
4017}

References OutputList::disableAllBut(), endFile(), OutputList::endTextBlock(), endTitle(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Doxygen::pageLinkedMap, Pages, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), Definition::TypePage, writePages(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writePages()

void writePages ( PageDef * pd,
FTVHelp * ftv )
static

Definition at line 3918 of file index.cpp.

3919{
3920 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3921 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3922 bool addToIndex = lne==nullptr || lne->visible();
3923 if (!addToIndex) return;
3924
3925 bool hasSubPages = pd->hasSubPages();
3926 bool hasSections = pd->hasSections();
3927
3928 if (pd->visibleInIndex())
3929 {
3930 QCString pageTitle, pageTitleAsHtml;
3931
3932 if (pd->title().isEmpty())
3933 pageTitle=pd->name();
3934 else
3935 pageTitle = parseCommentAsText(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3936 pageTitleAsHtml = parseCommentAsHtml(pd,nullptr,pd->title(),pd->getDefFileName(),pd->getDefLine());
3937
3938 if (ftv)
3939 {
3940 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3941 ftv->addContentsItem(
3942 hasSubPages,pageTitle,
3943 pd->getReference(),pd->getOutputFileBase(),
3944 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3945 }
3946 if (addToIndex && pd!=Doxygen::mainPage.get())
3947 {
3948 Doxygen::indexList->addContentsItem(
3949 hasSubPages || hasSections,pageTitle,
3950 pd->getReference(),pd->getOutputFileBase(),
3951 QCString(),hasSubPages,TRUE,pd,pageTitleAsHtml);
3952 }
3953 }
3954 if (hasSubPages && ftv) ftv->incContentsDepth();
3955 bool doIndent = (hasSections || hasSubPages) &&
3956 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3957 if (doIndent)
3958 {
3959 Doxygen::indexList->incContentsDepth();
3960 }
3961 if (hasSections)
3962 {
3963 pd->addSectionsToIndex();
3964 }
3965 for (const auto &subPage : pd->getSubPages())
3966 {
3967 writePages(subPage,ftv);
3968 }
3969 if (hasSubPages && ftv) ftv->decContentsDepth();
3970 if (doIndent)
3971 {
3972 Doxygen::indexList->decContentsDepth();
3973 }
3974 //printf("end writePages()=%s\n",qPrint(pd->title()));
3975}
virtual bool hasSections() const =0
virtual void addSectionsToIndex()=0
virtual bool visibleInIndex() const =0
virtual const PageLinkedRefMap & getSubPages() const =0
virtual bool hasSubPages() const =0
virtual QCString title() const =0
static bool mainPageHasOwnTitle()
Definition index.cpp:3907

References FTVHelp::addContentsItem(), PageDef::addSectionsToIndex(), FTVHelp::decContentsDepth(), LayoutNavEntry::find(), Definition::getDefFileName(), Definition::getDefLine(), Definition::getOutputFileBase(), Definition::getReference(), PageDef::getSubPages(), Definition::hasSections(), PageDef::hasSubPages(), FTVHelp::incContentsDepth(), Doxygen::indexList, LayoutDocManager::instance(), QCString::isEmpty(), Doxygen::mainPage, mainPageHasOwnTitle(), Definition::name(), parseCommentAsHtml(), parseCommentAsText(), LayoutDocManager::rootNavEntry(), PageDef::title(), TRUE, LayoutNavEntry::visible(), PageDef::visibleInIndex(), and writePages().

Referenced by writeGroupTreeNode(), writeIndex(), writePageIndex(), and writePages().

◆ writeQuickMemberIndex()

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

Definition at line 3064 of file index.cpp.

3067{
3068 bool first=TRUE;
3070 for (const auto &[letter,list] : map)
3071 {
3072 QCString ci(letter);
3073 QCString is = letterToLabel(ci);
3074 QCString anchor;
3076 if (!multiPage)
3077 anchor="#index_";
3078 else if (first)
3079 anchor=fullName+extension+"#index_";
3080 else
3081 anchor=fullName+"_"+is+extension+"#index_";
3082 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3083 ol.writeString(ci);
3085 first=FALSE;
3086 }
3088}

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

Referenced by writeClassMemberIndexFiltered(), writeFileMemberIndexFiltered(), writeModuleMemberIndexFiltered(), and writeNamespaceMemberIndexFiltered().

◆ writeSingleFileIndex()

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

Definition at line 1463 of file index.cpp.

1464{
1465 //printf("Found filedef %s\n",qPrint(fd->name()));
1466 bool doc = fd->isLinkableInProject();
1467 bool src = fd->generateSourceFile();
1468 bool nameOk = !fd->isDocumentationFile();
1469 if (nameOk && (doc || src) && !fd->isReference())
1470 {
1471 QCString path;
1472 if (Config_getBool(FULL_PATH_NAMES))
1473 {
1474 path=stripFromPath(fd->getPath());
1475 }
1476 QCString fullName=fd->name();
1477 if (!path.isEmpty())
1478 {
1479 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1480 fullName.prepend(path);
1481 }
1482
1483 ol.startIndexKey();
1484 ol.docify(path);
1485 if (doc)
1486 {
1488 //if (addToIndex)
1489 //{
1490 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1491 //}
1492 }
1493 else if (src)
1494 {
1496 }
1497 if (doc && src)
1498 {
1499 ol.pushGeneratorState();
1501 ol.docify(" ");
1503 ol.docify("[");
1504 ol.parseText(theTranslator->trCode());
1505 ol.docify("]");
1506 ol.endTextLink();
1507 ol.popGeneratorState();
1508 }
1509 ol.endIndexKey();
1510 bool hasBrief = !fd->briefDescription().isEmpty();
1511 ol.startIndexValue(hasBrief);
1512 if (hasBrief)
1513 {
1514 ol.generateDoc(fd->briefFile(),
1515 fd->briefLine(),
1516 fd,
1517 nullptr,
1518 fd->briefDescription(true),
1519 DocOptions()
1520 .setSingleLine(true)
1521 .setLinkFromIndex(true));
1522 }
1523 if (doc)
1524 {
1525 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1526 }
1527 else // src
1528 {
1529 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1530 }
1531 //ol.popGeneratorState();
1532 // --------------------------------------------------------
1533 }
1534}
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:166
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:307

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

4373{
4374 if (Index::instance().numDocumentedGroups()==0) return;
4375 ol.pushGeneratorState();
4376 // 1.{
4379 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4380 QCString title = lne ? lne->title() : theTranslator->trTopics();
4381 bool addToIndex = lne==nullptr || lne->visible();
4382
4383 startFile(ol,"topics",false,QCString(),title,HighlightedItem::Topics);
4384 startTitle(ol,QCString());
4385 ol.parseText(title);
4386 endTitle(ol,QCString(),QCString());
4387 ol.startContents();
4388 ol.startTextBlock();
4389 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4390 ol.endTextBlock();
4391
4392 // ---------------
4393 // Normal group index for Latex/RTF
4394 // ---------------
4395 // 2.{
4396 ol.pushGeneratorState();
4398 Doxygen::indexList->disable();
4399
4400 writeGroupHierarchy(ol,nullptr,FALSE);
4401
4402 Doxygen::indexList->enable();
4403 ol.popGeneratorState();
4404 // 2.}
4405
4406 // ---------------
4407 // interactive group index for HTML
4408 // ---------------
4409 // 2.{
4410 ol.pushGeneratorState();
4412
4413 {
4414 if (addToIndex)
4415 {
4416 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4417 Doxygen::indexList->incContentsDepth();
4418 }
4419 FTVHelp ftv(false);
4420 writeGroupHierarchy(ol,&ftv,addToIndex);
4421 TextStream t;
4422 ftv.generateTreeViewInline(t);
4424 ol.writeString(t.str());
4425 if (addToIndex)
4426 {
4427 Doxygen::indexList->decContentsDepth();
4428 }
4429 }
4430 ol.popGeneratorState();
4431 // 2.}
4432
4433 endFile(ol);
4434 ol.popGeneratorState();
4435 // 1.}
4436}
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4348

References OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endTextBlock(), endTitle(), FALSE, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), OutputList::startContents(), startFile(), OutputList::startTextBlock(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), Topics, TRUE, LayoutNavEntry::visible(), writeGroupHierarchy(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeUserGroupStubPage()

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

Definition at line 4787 of file index.cpp.

4788{
4789 if (lne->baseFile().startsWith("usergroup"))
4790 {
4791 ol.pushGeneratorState();
4794 startTitle(ol,QCString());
4795 ol.parseText(lne->title());
4796 endTitle(ol,QCString(),QCString());
4797 ol.startContents();
4798 int count=0;
4799 for (const auto &entry: lne->children())
4800 {
4801 if (entry->visible()) count++;
4802 }
4803 if (count>0)
4804 {
4805 ol.writeString("<ul>\n");
4806 for (const auto &entry: lne->children())
4807 {
4808 if (entry->visible())
4809 {
4810 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4811 fixSpaces(entry->title())+"</span></a></li>\n");
4812 }
4813 }
4814 ol.writeString("</ul>\n");
4815 }
4816 endFile(ol);
4817 ol.popGeneratorState();
4818 }
4819}
bool startsWith(const char *s) const
Definition qcstring.h:507
QCString baseFile() const
Definition layout.h:214

References LayoutNavEntry::baseFile(), LayoutNavEntry::children(), OutputList::disableAllBut(), endFile(), endTitle(), fixSpaces(), Html, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), OutputList::startContents(), startFile(), QCString::startsWith(), startTitle(), LayoutNavEntry::title(), UserGroup, and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

Variable Documentation

◆ indexWritten

std::vector<bool> indexWritten
static

Definition at line 5235 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex