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

532{
533 int numClasses=0;
534 for (const auto &cd : def->getClasses())
535 {
536 if (cd->isLinkable()) numClasses++;
537 }
538 int numConcepts=0;
539 if (concepts)
540 {
541 for (const auto &cd : *concepts)
542 {
543 if (cd->isLinkable()) numConcepts++;
544 }
545 }
546 bool hasMembers = !def->getMemberLists().empty() || !def->getMemberGroups().empty() || (numClasses>0) || (numConcepts>0);
547 Doxygen::indexList->addContentsItem(hasMembers,name,
548 def->getReference(),def->getOutputFileBase(),anchor,
549 hasMembers && !preventSeparateIndex,
550 addToIndex,
551 def);
552 //printf("addMembersToIndex(def=%s hasMembers=%d numClasses=%d)\n",qPrint(def->name()),hasMembers,numClasses);
553 if (hasMembers || numClasses>0 || numConcepts>0)
554 {
555 Doxygen::indexList->incContentsDepth();
556 for (const auto &lde : LayoutDocManager::instance().docEntries(part))
557 {
558 auto kind = lde->kind();
559 if (kind==LayoutDocEntry::MemberDef)
560 {
561 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
562 if (lmd)
563 {
564 MemberList *ml = def->getMemberList(lmd->type);
565 if (ml)
566 {
567 for (const auto &md : *ml)
568 {
569 if (md->visibleInIndex())
570 {
571 writeMemberToIndex(def,md,addToIndex);
572 }
573 }
574 }
575 }
576 }
577 else if (kind==LayoutDocEntry::NamespaceClasses ||
578 kind==LayoutDocEntry::FileClasses ||
579 kind==LayoutDocEntry::ClassNestedClasses ||
580 kind==LayoutDocEntry::ModuleClasses
581 )
582 {
583 for (const auto &cd : def->getClasses())
584 {
585 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
586 {
587 bool inlineSimpleStructs = Config_getBool(INLINE_SIMPLE_STRUCTS);
588 bool isNestedClass = def->definitionType()==Definition::TypeClass;
589 addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(lde->kind()==LayoutDocEntry::FileClasses),cd->anchor(),
590 addToIndex && (isNestedClass || (cd->isSimple() && inlineSimpleStructs)),
591 preventSeparateIndex || cd->isEmbeddedInOuterScope());
592 }
593 }
594 }
595 else if ((kind==LayoutDocEntry::FileConcepts || kind==LayoutDocEntry::ModuleConcepts) && concepts)
596 {
597 for (const auto &cd : *concepts)
598 {
599 if (cd->isLinkable() && (cd->partOfGroups().empty() || def->definitionType()==Definition::TypeGroup))
600 {
601 Doxygen::indexList->addContentsItem(false,cd->displayName(),
602 cd->getReference(),cd->getOutputFileBase(),QCString(),
603 addToIndex,
604 false,
605 cd);
606 }
607 }
608 }
609 }
610
611 Doxygen::indexList->decContentsDepth();
612 }
613}
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:8098
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 2119 of file index.cpp.

2120{
2121 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2122 int count=0;
2123 int countPrinted=0;
2124 for (const auto &cd : *Doxygen::classLinkedMap)
2125 {
2126 if (sliceOpt && cd->compoundType() != ct)
2127 {
2128 continue;
2129 }
2130 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2131 {
2132 if (!cd->isEmbeddedInOuterScope())
2133 {
2134 countPrinted++;
2135 }
2136 count++;
2137 }
2138 }
2139 *cp = countPrinted;
2140 return count;
2141}
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 1089 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1113 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1704 of file index.cpp.

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

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4036 of file index.cpp.

4037{
4038 int count=0;
4039 for (const auto &dd : *Doxygen::dirLinkedMap)
4040 {
4041 if (dd->isLinkableInProject())
4042 {
4043 count++;
4044 }
4045 }
4046 return count;
4047}
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 1440 of file index.cpp.

1441{
1442 allFiles=0;
1443 docFiles=0;
1444 for (const auto &fn : *Doxygen::inputNameLinkedMap)
1445 {
1446 for (const auto &fd: *fn)
1447 {
1448 bool src = false;
1449 bool doc = fileVisibleInIndex(fd.get(),src);
1450 if (doc || src)
1451 {
1452 allFiles++;
1453 }
1454 if (doc)
1455 {
1456 docFiles++;
1457 }
1458 }
1459 }
1460}
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 4020 of file index.cpp.

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

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1693 of file index.cpp.

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

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

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 727 of file index.cpp.

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

1717{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1718 of file index.cpp.

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

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

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeClassMemberIndexFiltered().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3287 of file index.cpp.

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

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3654 of file index.cpp.

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

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3469 of file index.cpp.

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

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2215 of file index.cpp.

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

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2220 of file index.cpp.

2221{
2222 if (startLetter.isEmpty()) return startLetter;
2223 const char *p = startLetter.data();
2224 char c = *p;
2225 QCString result;
2226 if (isId1(c))
2227 {
2228 result+=c;
2229 }
2230 else
2231 {
2232 result="0x";
2233 const char hex[]="0123456789abcdef";
2234 while ((c=*p++))
2235 {
2236 result+=hex[static_cast<unsigned char>(c)>>4];
2237 result+=hex[static_cast<unsigned char>(c)&0xf];
2238 }
2239 }
2240 return result;
2241}
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:2215

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

3907{
3908 QCString projectName = Config_getString(PROJECT_NAME);
3909 QCString title;
3911 {
3912 title = filterTitle(Doxygen::mainPage->title());
3913 }
3914 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3915}
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 5559 of file index.cpp.

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

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

5668{
5669 int count=0;
5670 for (const auto &entry : root->children())
5671 {
5672 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5673 }
5674 if (count>0) // at least one item is visible
5675 {
5676 bool firstChild = TRUE;
5677 if (!first) t << ",";
5678 t << "children:[\n";
5679 for (const auto &entry : root->children())
5680 {
5681 if (entry->visible() && quickLinkVisible(entry->kind()))
5682 {
5683 if (!firstChild) t << ",\n";
5684 firstChild=FALSE;
5685 QCString url = entry->url();
5686 if (isURL(url)) url = "^" + url;
5687 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5688 << convertToJSString(url) << "\"";
5689 bool hasChildren=FALSE;
5690 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5691 {
5692 auto numDoc = [](std::size_t i) {
5694 };
5695 auto memList = [](std::size_t i) {
5697 };
5698 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5699 }
5700 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5701 {
5702 auto numDoc = [](std::size_t i) {
5704 };
5705 auto memList = [](std::size_t i) {
5707 };
5708 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5709 }
5710 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5711 {
5712 auto numDoc = [](std::size_t i) {
5714 };
5715 auto memList = [](std::size_t i) {
5717 };
5718 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5719 }
5720 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5721 {
5722 auto numDoc = [](std::size_t i) {
5724 };
5725 auto memList = [](std::size_t i) {
5727 };
5728 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5729 }
5730 else // recursive into child list
5731 {
5732 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5733 }
5734 if (hasChildren) t << "]";
5735 t << "}";
5736 }
5737 }
5738 }
5739 return count>0;
5740}
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:5667
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:5607
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3287
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3654
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3469
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3099
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 2269 of file index.cpp.

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

2513{
2514 if (Index::instance().numAnnotatedExceptions()==0) return;
2515 ol.pushGeneratorState();
2517 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2518 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2519 bool addToIndex = lne==nullptr || lne->visible();
2520
2521 startFile(ol,"exceptions",false,QCString(),title,HighlightedItem::Exceptions);
2522
2523 startTitle(ol,QCString());
2524 ol.parseText(title);
2525 endTitle(ol,QCString(),QCString());
2526
2527 if (addToIndex)
2528 {
2529 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2530 }
2531
2532 ol.startContents();
2533 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2534 endFile(ol); // contains ol.endContents()
2535
2536 ol.popGeneratorState();
2537}
@ 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:2269
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 2425 of file index.cpp.

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

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

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

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

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

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

2684{
2685 const auto &index = Index::instance();
2687 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2688 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2689 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2691 "annotatedexceptions",
2693}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2566
@ 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 2641 of file index.cpp.

2642{
2643 const auto &index = Index::instance();
2645 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2646 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2647 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2649 "annotated",
2651}
@ 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 2566 of file index.cpp.

2567{
2568 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2569 // annotatedClasses,annotatedClassesPrinted);
2570 if (ctx.numAnnotated==0) return;
2571
2572 ol.pushGeneratorState();
2574 if (ctx.numPrinted==0)
2575 {
2578 }
2580 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2581 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2582 bool addToIndex = lne==nullptr || lne->visible();
2583
2584 startFile(ol,ctx.fileBaseName,false,QCString(),title,ctx.hiItem);
2585
2586 startTitle(ol,QCString());
2587 ol.parseText(title);
2588 endTitle(ol,QCString(),QCString());
2589
2590 ol.startContents();
2591
2592 ol.startTextBlock();
2593 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2594 ol.endTextBlock();
2595
2596 // ---------------
2597 // Linear class index for Latex/RTF
2598 // ---------------
2599 ol.pushGeneratorState();
2601 Doxygen::indexList->disable();
2602
2604
2605 Doxygen::indexList->enable();
2606 ol.popGeneratorState();
2607
2608 // ---------------
2609 // Hierarchical class index for HTML
2610 // ---------------
2611 ol.pushGeneratorState();
2613
2614 {
2615 if (addToIndex)
2616 {
2617 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2618 Doxygen::indexList->incContentsDepth();
2619 }
2620 FTVHelp ftv(false);
2623 TextStream t;
2624 ftv.generateTreeViewInline(t);
2625 ol.writeString(t.str());
2626 if (addToIndex)
2627 {
2628 Doxygen::indexList->decContentsDepth();
2629 }
2630 }
2631
2632 ol.popGeneratorState();
2633 // ------
2634
2635 endFile(ol); // contains ol.endContents()
2636 ol.popGeneratorState();
2637}
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:2144
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:2000
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1721
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2558
const ClassDef::CompoundType compoundType
Definition index.cpp:2561
const HighlightedItem hiItem
Definition index.cpp:2563
const QCString fileBaseName
Definition index.cpp:2562
const LayoutNavEntry::Kind listKind
Definition index.cpp:2557
const QCString listDefaultTitleText
Definition index.cpp:2559
const int numAnnotated
Definition index.cpp:2555
const QCString listDefaultIntroText
Definition index.cpp:2560
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 2655 of file index.cpp.

2656{
2657 const auto &index = Index::instance();
2659 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2660 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2661 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2663 "annotatedinterfaces",
2665}
@ 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 2669 of file index.cpp.

2670{
2671 const auto &index = Index::instance();
2673 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2674 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2675 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2677 "annotatedstructs",
2679}
@ 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 1062 of file index.cpp.

1063{
1064 ClassDefSet visitedClasses;
1065 if (ftv)
1066 {
1067 ol.pushGeneratorState();
1069 }
1070 bool started=FALSE;
1071 writeClassTreeForList(ol,*Doxygen::classLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1072 writeClassTreeForList(ol,*Doxygen::hiddenClassLinkedMap,started,ftv,addToIndex,ct,visitedClasses);
1073 if (started)
1074 {
1075 endIndexHierarchy(ol,0);
1076 if (addToIndex)
1077 {
1078 Doxygen::indexList->decContentsDepth();
1079 }
1080 }
1081 if (ftv)
1082 {
1083 ol.popGeneratorState();
1084 }
1085}
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:963

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

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

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

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

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

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

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

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

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 2000 of file index.cpp.

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

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

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

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

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

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

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

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

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

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4663 of file index.cpp.

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

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

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

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4612 of file index.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4053{
4054 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4055 ol.pushGeneratorState();
4057
4058 DotLegendGraph gd;
4059 gd.writeGraph(Config_getString(HTML_OUTPUT));
4060
4061 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4062 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4063 // temporarily disable the stripping of comments for our own code example!
4064 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4065 // temporarily disable create subdirs for linking to our example
4066 Config_updateBool(CREATE_SUBDIRS,FALSE);
4067
4068 startFile(ol,"graph_legend",false,QCString(),theTranslator->trLegendTitle());
4069 startTitle(ol,QCString());
4070 ol.parseText(theTranslator->trLegendTitle());
4071 endTitle(ol,QCString(),QCString());
4072 ol.startContents();
4073 QCString legendDocs = theTranslator->trLegendDocs();
4074 int s = legendDocs.find("<center>");
4075 int e = legendDocs.find("</center>");
4076 QCString imgExt = getDotImageExtension();
4077 if (imgExt=="svg" && s!=-1 && e!=-1)
4078 {
4079 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4080 //printf("legendDocs=%s\n",qPrint(legendDocs));
4081 }
4082
4083 {
4084 auto fd = createFileDef("","graph_legend.dox");
4085 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,DocOptions());
4086 }
4087
4088 // restore config settings
4089 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4090 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4091
4092 endFile(ol);
4093 ol.popGeneratorState();
4094}
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 4347 of file index.cpp.

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

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

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

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

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

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

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

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

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

4824{
4825 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4826 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4827 bool disableIndex = Config_getBool(DISABLE_INDEX);
4828 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4829 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4830 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4831 QCString projectName = Config_getString(PROJECT_NAME);
4832 // save old generator state
4833 ol.pushGeneratorState();
4834
4835 QCString projPrefix;
4836 if (!projectName.isEmpty())
4837 {
4838 projPrefix=projectName+" ";
4839 }
4840
4841 //--------------------------------------------------------------------
4842 // write HTML index
4843 //--------------------------------------------------------------------
4845
4846 QCString defFileName =
4847 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4848 int defLine =
4849 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4850
4851 QCString title, titleAsHtml;
4852 if (!mainPageHasTitle())
4853 {
4854 title = theTranslator->trMainPage();
4855 }
4856 else if (Doxygen::mainPage)
4857 {
4858 title = parseCommentAsText(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4859 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4860 titleAsHtml = parseCommentAsHtml(Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),
4861 Doxygen::mainPage->getDefFileName(),Doxygen::mainPage->getDefLine());
4862 }
4863
4864 QCString indexName="index";
4865 ol.startFile(indexName,false,QCString(),title);
4866
4868 {
4869 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4870 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4871 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4872 if (hasTitle) // to avoid duplicate entries in the treeview
4873 {
4874 Doxygen::indexList->addContentsItem(hasSubs,
4875 title,
4876 QCString(),
4877 indexName,
4878 QCString(),
4879 hasSubs,
4880 TRUE,
4881 nullptr,
4882 titleAsHtml);
4883 }
4884 if (hasSubs)
4885 {
4886 writePages(Doxygen::mainPage.get(),nullptr);
4887 }
4888 }
4889
4890 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4891 ol.startQuickIndices();
4892 if (!disableIndex && !quickLinksAfterSplitbar)
4893 {
4895 }
4896 ol.endQuickIndices();
4897 ol.writeSplitBar(indexName,QCString());
4898 if (quickLinksAfterSplitbar)
4899 {
4901 }
4902 ol.writeSearchInfo();
4903 bool headerWritten=FALSE;
4905 {
4906 if (!Doxygen::mainPage->title().isEmpty())
4907 {
4908 if (Doxygen::mainPage->title().lower() != "notitle")
4909 ol.startPageDoc(Doxygen::mainPage->title());
4910 else
4911 ol.startPageDoc("");
4912 }
4913 else
4914 ol.startPageDoc(projectName);
4915 }
4916 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4917 {
4918 if (Doxygen::mainPage->title().lower()!="notitle")
4919 {
4920 ol.startHeaderSection();
4922 ol.generateDoc(Doxygen::mainPage->docFile(),
4923 Doxygen::mainPage->getStartBodyLine(),
4924 Doxygen::mainPage.get(),
4925 nullptr,
4926 Doxygen::mainPage->title(),
4927 DocOptions()
4928 .setSingleLine(true));
4929 headerWritten = TRUE;
4930 }
4931 }
4932 else
4933 {
4934 if (!projectName.isEmpty())
4935 {
4936 ol.startHeaderSection();
4938 ol.parseText(theTranslator->trDocumentation(projectName));
4939 headerWritten = TRUE;
4940 }
4941 }
4942 if (headerWritten)
4943 {
4945 ol.endHeaderSection();
4946 }
4947
4948 ol.startContents();
4949 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4950 {
4952 }
4953
4955 {
4956 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4957 {
4958 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4959 }
4960
4961 ol.startTextBlock();
4962 ol.generateDoc(defFileName,
4963 defLine,
4964 Doxygen::mainPage.get(),
4965 nullptr,
4966 Doxygen::mainPage->documentation(),
4967 DocOptions()
4968 .setIndexWords(true));
4969 ol.endTextBlock();
4970 ol.endPageDoc();
4971 }
4972
4975 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4976 Doxygen::indexList->addIndexFile(fn);
4977
4978 if (Doxygen::mainPage &&
4979 generateTreeView &&
4980 pageOutlinePanel &&
4981 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4982 Doxygen::mainPage->hasSections()
4983 )
4984 {
4985 ol.writeString("</div><!-- doc-content -->\n");
4986 ol.endContents();
4987 Doxygen::mainPage->writePageNavigation(ol);
4988 ol.writeString("</div><!-- container -->\n");
4989 endFile(ol,true,true);
4990 }
4991 else
4992 {
4993 endFile(ol);
4994 }
4995
4997
4998 //--------------------------------------------------------------------
4999 // write LaTeX/RTF index
5000 //--------------------------------------------------------------------
5004
5006 {
5007 msg("Generating main page...\n");
5008 Doxygen::mainPage->writeDocumentation(ol);
5009 }
5010
5011 ol.startFile("refman",false,QCString(),QCString());
5015
5016 if (projPrefix.isEmpty())
5017 {
5018 ol.parseText(theTranslator->trReferenceManual());
5019 }
5020 else
5021 {
5022 ol.parseText(projPrefix);
5023 }
5024
5025 if (!Config_getString(PROJECT_NUMBER).isEmpty())
5026 {
5027 ol.startProjectNumber();
5028 ol.generateDoc(defFileName,
5029 defLine,
5030 Doxygen::mainPage.get(),
5031 nullptr,
5032 Config_getString(PROJECT_NUMBER),
5033 DocOptions());
5034 ol.endProjectNumber();
5035 }
5038 ol.parseText(theTranslator->trGeneratedBy());
5042
5043 ol.lastIndexPage();
5045 {
5048 }
5049 const auto &index = Index::instance();
5050 if (index.numDocumentedPages()>0)
5051 {
5054 }
5055
5057 if (!Config_getBool(LATEX_HIDE_INDICES))
5058 {
5059 //if (indexedPages>0)
5060 //{
5061 // ol.startIndexSection(isPageIndex);
5062 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5063 // ol.endIndexSection(isPageIndex);
5064 //}
5065 if (index.numDocumentedModules()>0)
5066 {
5068 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5070 }
5071 if (index.numDocumentedGroups()>0)
5072 {
5074 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5076 }
5077 if (index.numDocumentedDirs()>0)
5078 {
5080 ol.parseText(theTranslator->trDirIndex());
5082 }
5083 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5084 {
5085 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5086 if (lne)
5087 {
5089 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5091 }
5092 }
5093 if (index.numDocumentedConcepts()>0)
5094 {
5096 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5098 }
5099 if (index.numHierarchyInterfaces()>0)
5100 {
5102 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5104 }
5105 if (index.numHierarchyClasses()>0)
5106 {
5107 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5108 if (lne)
5109 {
5111 ol.parseText(/*projPrefix+*/
5112 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5113 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5114 theTranslator->trHierarchicalIndex()
5115 ));
5117 }
5118 }
5119 if (index.numHierarchyExceptions()>0)
5120 {
5122 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5124 }
5125 if (index.numAnnotatedInterfacesPrinted()>0)
5126 {
5128 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5130 }
5131 if (index.numAnnotatedClassesPrinted()>0)
5132 {
5134 ol.parseText(/*projPrefix+*/
5135 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5136 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5137 theTranslator->trCompoundIndex()
5138 ));
5140 }
5141 if (index.numAnnotatedStructsPrinted()>0)
5142 {
5144 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5146 }
5147 if (index.numAnnotatedExceptionsPrinted()>0)
5148 {
5150 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5152 }
5153 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5154 {
5156 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5158 }
5159 }
5161
5162 if (index.numDocumentedModules()>0)
5163 {
5165 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5167 }
5168 if (index.numDocumentedGroups()>0)
5169 {
5171 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5173 }
5174 if (index.numDocumentedDirs()>0)
5175 {
5177 ol.parseText(/*projPrefix+*/theTranslator->trDirDocumentation());
5179 }
5180 if (index.numDocumentedNamespaces()>0)
5181 {
5183 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5185 }
5186 if (index.numDocumentedConcepts()>0)
5187 {
5189 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5191 }
5192 if (index.numAnnotatedInterfacesPrinted()>0)
5193 {
5195 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5197 }
5198 if (index.numAnnotatedClassesPrinted()>0)
5199 {
5201 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5203 }
5204 if (index.numAnnotatedStructsPrinted()>0)
5205 {
5207 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5209 }
5210 if (index.numAnnotatedExceptionsPrinted()>0)
5211 {
5213 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5215 }
5216 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5217 {
5219 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5221 }
5222 if (!Doxygen::exampleLinkedMap->empty())
5223 {
5225 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5227 }
5229 endFile(ol);
5230
5231 ol.popGeneratorState();
5232}
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 5758 of file index.cpp.

5759{
5760 writeMenuData();
5762 if (lne)
5763 {
5765 }
5766}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5236
static void writeMenuData()
Definition index.cpp:5742

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

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

2753{
2754 int index = static_cast<int>(type);
2755 const int numIndices = 4;
2756 ASSERT(index<numIndices);
2757
2758 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2759 QCString &prevNamespaceName);
2760
2761 // each index tab has its own write function
2762 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2763 {
2768 };
2769 QCString prevName;
2770 QCString prevDefName;
2771 bool first=TRUE;
2772 bool firstSection=TRUE;
2773 bool firstItem=TRUE;
2774 const Index::MemberIndexList *mil = nullptr;
2775 std::string letter;
2776 for (const auto &kv : memberIndexMap)
2777 {
2778 if (!page.empty()) // specific page mode
2779 {
2780 auto it = memberIndexMap.find(page);
2781 if (it != memberIndexMap.end())
2782 {
2783 mil = &it->second;
2784 letter = page;
2785 }
2786 }
2787 else // do all pages
2788 {
2789 mil = &kv.second;
2790 letter = kv.first;
2791 }
2792 if (mil==nullptr || mil->empty()) continue;
2793 for (const auto &md : *mil)
2794 {
2795 const char *sep = nullptr;
2796 bool isFunc=!md->isObjCMethod() &&
2797 (md->isFunction() || md->isSlot() || md->isSignal());
2798 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2799 int startIndex = getPrefixIndex(name);
2800 if (name.data()+startIndex!=prevName) // new entry
2801 {
2802 if ((prevName.isEmpty() ||
2803 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2804 useSections) // new section
2805 {
2806 if (!firstItem) ol.endItemListItem();
2807 if (!firstSection) ol.endItemList();
2808 QCString cs = letterToLabel(letter);
2809 QCString anchor = "index_"+convertToId(cs);
2810 QCString title = "- "+letter+" -";
2811 ol.startSection(anchor,title,SectionType::Subsection);
2812 ol.docify(title);
2813 ol.endSection(anchor,SectionType::Subsection);
2814 ol.startItemList();
2815 firstSection=FALSE;
2816 firstItem=TRUE;
2817 }
2818 else if (!useSections && first)
2819 {
2820 ol.startItemList();
2821 first=FALSE;
2822 }
2823
2824 // member name
2825 if (!firstItem) ol.endItemListItem();
2826 ol.startItemListItem();
2827 firstItem=FALSE;
2828 ol.docify(name);
2829 if (isFunc) ol.docify("()");
2830 //ol.writeString("\n");
2831
2832 // link to class
2833 prevDefName="";
2834 sep = "&#160;:&#160;";
2835 prevName = name.data()+startIndex;
2836 }
2837 else // same entry
2838 {
2839 sep = ", ";
2840 // link to class for other members with the same name
2841 }
2842 if (index<numIndices)
2843 {
2844 // write the link for the specific list type
2845 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2846 }
2847 }
2848 if (!page.empty())
2849 {
2850 break;
2851 }
2852 }
2853 if (!firstItem) ol.endItemListItem();
2854 ol.endItemList();
2855}
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:2709
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2722
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2696
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2735
#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 const MemberVector &enumList = md->enumFieldList();
472 bool isDir = md->isEnumerate() && std::any_of(enumList.begin(),enumList.end(),[](const auto &emd) { return emd->hasDocumentation(); });
473 auto defType = def->definitionType();
474 bool namespaceMemberInFileDocs = md->getNamespaceDef() && defType==Definition::TypeFile;
475 bool lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
476 QCString name = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
477 md->qualifiedName() : md->name();
478 if (md->getOuterScope()==def ||
479 (md->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
481 {
482 Doxygen::indexList->addContentsItem(isDir,
483 name,md->getReference(),md->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
484 }
485 else // inherited member
486 {
487 Doxygen::indexList->addContentsItem(isDir,
488 name,def->getReference(),def->getOutputFileBase(),md->anchor(),FALSE,lAddToIndex && md->getGroupDef()==nullptr);
489 }
490 if (isDir)
491 {
492 if (!isAnonymous)
493 {
494 Doxygen::indexList->incContentsDepth();
495 }
496 for (const auto &emd : enumList)
497 {
498 if (emd->hasDocumentation())
499 {
500 namespaceMemberInFileDocs = emd->getNamespaceDef() && defType==Definition::TypeFile;
501 lAddToIndex = addToIndex && !namespaceMemberInFileDocs;
502 QCString ename = namespaceMemberInFileDocs || defType==Definition::TypeModule ?
503 emd->qualifiedName() : emd->name();
504 if (emd->getOuterScope()==def ||
505 (emd->getNamespaceDef()!=nullptr && defType==Definition::TypeFile) ||
506 emd->getOuterScope()==Doxygen::globalScope)
507 {
508 Doxygen::indexList->addContentsItem(FALSE,
509 ename,emd->getReference(),emd->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
510 }
511 else // inherited member
512 {
513 Doxygen::indexList->addContentsItem(FALSE,
514 ename,def->getReference(),def->getOutputFileBase(),emd->anchor(),FALSE,lAddToIndex && emd->getGroupDef()==nullptr);
515 }
516 }
517 }
518 if (!isAnonymous)
519 {
520 Doxygen::indexList->decContentsDepth();
521 }
522 }
523}
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
iterator end() noexcept
Definition memberlist.h:56
iterator begin() noexcept
Definition memberlist.h:54

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

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5742 of file index.cpp.

5743{
5744 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5745 QCString outputDir = Config_getBool(HTML_OUTPUT);
5747 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5748 if (t.is_open())
5749 {
5751 t << "var menudata={";
5752 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5753 if (hasChildren) t << "]";
5754 t << "}\n";
5755 }
5756}
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 4511 of file index.cpp.

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

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

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

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

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

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

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

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

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

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

4442{
4443 int visibleMembers = mod->countVisibleMembers();
4444 bool isDir=visibleMembers>0;
4445 if (addToIndex)
4446 {
4447 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4448 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4449 }
4450 if (ftv)
4451 {
4452 ftv->addContentsItem(false,mod->name(),
4453 mod->getReference(),mod->getOutputFileBase(),QCString(),
4454 false,false,mod);
4455 }
4456 ol.startIndexListItem();
4458 ol.parseText(mod->qualifiedName());
4460 if (mod->isReference())
4461 {
4462 ol.startTypewriter();
4463 ol.docify(" [external]");
4464 ol.endTypewriter();
4465 }
4466 if (addToIndex && isDir)
4467 {
4468 Doxygen::indexList->incContentsDepth();
4469 }
4470 if (isDir)
4471 {
4472 //ftv->incContentsDepth();
4473 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4474 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4475 writeModuleMembers(mod,addToIndex);
4476 //ftv->decContentsDepth();
4477 }
4478 if (addToIndex && isDir)
4479 {
4480 Doxygen::indexList->decContentsDepth();
4481 }
4482 ol.endIndexListItem();
4483}
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:1810

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

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

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

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

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

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

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

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

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

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

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

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1901 of file index.cpp.

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

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1841 of file index.cpp.

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

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

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

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

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

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

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

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

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

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

4787{
4788 if (lne->baseFile().startsWith("usergroup"))
4789 {
4790 ol.pushGeneratorState();
4793 startTitle(ol,QCString());
4794 ol.parseText(lne->title());
4795 endTitle(ol,QCString(),QCString());
4796 ol.startContents();
4797 int count=0;
4798 for (const auto &entry: lne->children())
4799 {
4800 if (entry->visible()) count++;
4801 }
4802 if (count>0)
4803 {
4804 ol.writeString("<ul>\n");
4805 for (const auto &entry: lne->children())
4806 {
4807 if (entry->visible())
4808 {
4809 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4810 fixSpaces(entry->title())+"</span></a></li>\n");
4811 }
4812 }
4813 ol.writeString("</ul>\n");
4814 }
4815 endFile(ol);
4816 ol.popGeneratorState();
4817 }
4818}
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 5234 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex