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

Function Documentation

◆ addMembersToIndex()

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

Definition at line 528 of file index.cpp.

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

2103{
2104 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2105 int count=0;
2106 int countPrinted=0;
2107 for (const auto &cd : *Doxygen::classLinkedMap)
2108 {
2109 if (sliceOpt && cd->compoundType() != ct)
2110 {
2111 continue;
2112 }
2113 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2114 {
2115 if (!cd->isEmbeddedInOuterScope())
2116 {
2117 countPrinted++;
2118 }
2119 count++;
2120 }
2121 }
2122 *cp = countPrinted;
2123 return count;
2124}
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1090 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1114 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countConcepts()

int countConcepts ( )
static

Definition at line 1682 of file index.cpp.

1683{
1684 int count=0;
1685 for (const auto &cd : *Doxygen::conceptLinkedMap)
1686 {
1687 if (cd->isLinkableInProject()) count++;
1688 }
1689 return count;
1690}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

int countDirs ( )
static

Definition at line 4021 of file index.cpp.

4022{
4023 int count=0;
4024 for (const auto &dd : *Doxygen::dirLinkedMap)
4025 {
4026 if (dd->isLinkableInProject())
4027 {
4028 count++;
4029 }
4030 }
4031 return count;
4032}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129

References Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1441 of file index.cpp.

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

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 4005 of file index.cpp.

4006{
4007 int count=0;
4008 for (const auto &gd : *Doxygen::groupLinkedMap)
4009 {
4010 if (!gd->isReference())
4011 {
4012 //gd->visited=FALSE;
4013 count++;
4014 }
4015 }
4016 return count;
4017}
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

int countNamespaces ( )
static

Definition at line 1671 of file index.cpp.

1672{
1673 int count=0;
1674 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1675 {
1676 if (nd->isLinkableInProject()) count++;
1677 }
1678 return count;
1679}
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 3874 of file index.cpp.

3875{
3876 docPages=indexPages=0;
3877 for (const auto &pd : *Doxygen::pageLinkedMap)
3878 {
3879 if (pd->visibleInIndex() && !pd->hasParentPage())
3880 {
3881 indexPages++;
3882 }
3883 if (pd->documentedPage())
3884 {
3885 docPages++;
3886 }
3887 }
3888}
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 728 of file index.cpp.

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

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

Referenced by dirHasVisibleChildren(), and writeDirTreeNode().

◆ endFile()

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

Definition at line 427 of file index.cpp.

429{
430 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
433 if (!skipNavIndex)
434 {
435 if (!skipEndContents) ol.endContents();
436 if (generateTreeView)
437 {
438 ol.writeString("</div><!-- doc-content -->\n");
439 ol.writeString("</div><!-- container -->\n");
440 }
441 }
442
443 ol.writeFooter(navPath); // write the footer
445 ol.endFile();
446}
void writeString(const QCString &text)
Definition outputlist.h:412
void endContents()
Definition outputlist.h:621
void endFile()
Definition outputlist.h:402
void pushGeneratorState()
void disableAllBut(OutputType o)
void popGeneratorState()
void writeFooter(const QCString &navPath)
Definition outputlist.h:400

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(), 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 1695 of file index.cpp.

1695{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1696 of file index.cpp.

1696{ 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 3085 of file index.cpp.

3086{
3087 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3088 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3089 static CmhlInfo cmhlInfo[] =
3090 {
3091 CmhlInfo("functions", theTranslator->trAll()),
3092 CmhlInfo("functions_func",
3093 fortranOpt ? theTranslator->trSubprograms() :
3094 vhdlOpt ? theTranslator->trFunctionAndProc() :
3095 theTranslator->trFunctions()),
3096 CmhlInfo("functions_vars",theTranslator->trVariables()),
3097 CmhlInfo("functions_type",theTranslator->trTypedefs()),
3098 CmhlInfo("functions_enum",theTranslator->trEnumerations()),
3099 CmhlInfo("functions_eval",theTranslator->trEnumerationValues()),
3100 CmhlInfo("functions_prop",theTranslator->trProperties()),
3101 CmhlInfo("functions_evnt",theTranslator->trEvents()),
3102 CmhlInfo("functions_rela",theTranslator->trRelatedSymbols())
3103 };
3104 return &cmhlInfo[hl];
3105}
Translator * theTranslator
Definition language.cpp:71
Helper class representing a class member in the navigation menu.
Definition index.cpp:3079

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeClassMemberIndexFiltered().

◆ getFmhlInfo()

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3273 of file index.cpp.

3274{
3275 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3276 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3277 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3278 static FmhlInfo fmhlInfo[] =
3279 {
3280 FmhlInfo("globals", theTranslator->trAll()),
3281 FmhlInfo("globals_func",
3282 fortranOpt ? theTranslator->trSubprograms() :
3283 vhdlOpt ? theTranslator->trFunctionAndProc() :
3284 theTranslator->trFunctions()),
3285 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3286 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3287 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3288 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3289 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3290 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3291 FmhlInfo("globals_defs",theTranslator->trDefines())
3292 };
3293 return &fmhlInfo[hl];
3294}
Helper class representing a file member in the navigation menu.
Definition index.cpp:3267

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3640 of file index.cpp.

3641{
3642 static MmhlInfo nmhlInfo[] =
3643 {
3644 MmhlInfo("modulemembers", theTranslator->trAll()),
3645 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3646 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3647 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3648 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3649 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3650 };
3651 return &nmhlInfo[hl];
3652}
Helper class representing a module member in the navigation menu.
Definition index.cpp:3634

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3455 of file index.cpp.

3456{
3457 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3458 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3459 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3460 static NmhlInfo nmhlInfo[] =
3461 {
3462 NmhlInfo("namespacemembers", theTranslator->trAll()),
3463 NmhlInfo("namespacemembers_func",
3464 fortranOpt ? theTranslator->trSubprograms() :
3465 vhdlOpt ? theTranslator->trFunctionAndProc() :
3466 theTranslator->trFunctions()),
3467 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3468 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3469 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3470 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3471 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3472 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3473 };
3474 return &nmhlInfo[hl];
3475}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3449

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2201 of file index.cpp.

2202{
2203 return (c<127 && c>31); // printable ASCII character
2204}

Referenced by letterToLabel().

◆ letterToLabel()

QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2206 of file index.cpp.

2207{
2208 if (startLetter.isEmpty()) return startLetter;
2209 const char *p = startLetter.data();
2210 char c = *p;
2211 QCString result;
2212 if (isId1(c))
2213 {
2214 result+=c;
2215 }
2216 else
2217 {
2218 result="0x";
2219 const char hex[]="0123456789abcdef";
2220 while ((c=*p++))
2221 {
2222 result+=hex[static_cast<unsigned char>(c)>>4];
2223 result+=hex[static_cast<unsigned char>(c)&0xf];
2224 }
2225 }
2226 return result;
2227}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
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:159
static constexpr auto hex
bool isId1(int c)
Definition index.cpp:2201

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

3893{
3894 QCString projectName = Config_getString(PROJECT_NAME);
3895 QCString title;
3897 {
3898 title = filterTitle(Doxygen::mainPage->title());
3899 }
3900 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3901}
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:442
bool mainPageHasTitle()
Definition util.cpp:6761
QCString filterTitle(const QCString &title)
Definition util.cpp:6093

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

5504{
5505 const auto &index = Index::instance();
5506 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5507 bool showFiles = Config_getBool(SHOW_FILES);
5508 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5509 switch (kind)
5510 {
5511 case LayoutNavEntry::MainPage: return TRUE;
5512 case LayoutNavEntry::User: return TRUE;
5513 case LayoutNavEntry::UserGroup: return TRUE;
5514 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5515 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5516 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5517 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5518 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5519 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5520 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5521 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5522 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5523 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5524 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5525 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5526 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5527 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5528 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5529 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5530 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5531 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5532 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5533 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5534 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5535 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5536 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5537 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5538 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5539 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5540 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5541 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5542 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5543 case LayoutNavEntry::None: // should never happen, means not properly initialized
5544 assert(kind != LayoutNavEntry::None);
5545 return FALSE;
5546 }
5547 return FALSE;
5548}
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 5551 of file index.cpp.

5556{
5557 // index items per category member lists
5558 bool firstMember=TRUE;
5559 for (std::size_t i=0;i<total;i++)
5560 {
5561 if (numDocumented(i)>0)
5562 {
5563 t << ",";
5564 if (firstMember)
5565 {
5566 t << "children:[";
5567 firstMember=FALSE;
5568 }
5569 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5570 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5571
5572 // Check if we have many members, then add sub entries per letter...
5573 // quick alphabetical index
5574 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5575 if (quickIndex)
5576 {
5577 bool multiPageIndex=FALSE;
5578 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5579 {
5580 multiPageIndex=TRUE;
5581 }
5582 t << ",children:[\n";
5583 bool firstLetter=TRUE;
5584 for (const auto &[letter,list] : getMemberList(i))
5585 {
5586 if (!firstLetter) t << ",\n";
5587 QCString ci(letter);
5588 QCString is(letterToLabel(ci));
5589 QCString anchor;
5591 QCString fullName = getInfo(i)->fname;
5592 if (!multiPageIndex || firstLetter)
5593 anchor=fullName+extension+"#index_";
5594 else // other pages of multi page index
5595 anchor=fullName+"_"+is+extension+"#index_";
5596 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5597 << convertToJSString(anchor+convertToId(is)) << "\"}";
5598 firstLetter=FALSE;
5599 }
5600 t << "]";
5601 }
5602 t << "}";
5603 }
5604 }
5605 if (!firstMember)
5606 {
5607 t << "]";
5608 }
5609}
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:2206
QCString convertToJSString(const QCString &s)
Definition util.cpp:4539
QCString convertToId(const QCString &s)
Definition util.cpp:4388

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

5612{
5613 int count=0;
5614 for (const auto &entry : root->children())
5615 {
5616 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5617 }
5618 if (count>0) // at least one item is visible
5619 {
5620 bool firstChild = TRUE;
5621 if (!first) t << ",";
5622 t << "children:[\n";
5623 for (const auto &entry : root->children())
5624 {
5625 if (entry->visible() && quickLinkVisible(entry->kind()))
5626 {
5627 if (!firstChild) t << ",\n";
5628 firstChild=FALSE;
5629 QCString url = entry->url();
5630 if (isURL(url)) url = "^" + url;
5631 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5632 << convertToJSString(url) << "\"";
5633 bool hasChildren=FALSE;
5634 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5635 {
5636 auto numDoc = [](std::size_t i) {
5638 };
5639 auto memList = [](std::size_t i) {
5641 };
5642 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5643 }
5644 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5645 {
5646 auto numDoc = [](std::size_t i) {
5648 };
5649 auto memList = [](std::size_t i) {
5651 };
5652 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5653 }
5654 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5655 {
5656 auto numDoc = [](std::size_t i) {
5658 };
5659 auto memList = [](std::size_t i) {
5661 };
5662 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5663 }
5664 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5665 {
5666 auto numDoc = [](std::size_t i) {
5668 };
5669 auto memList = [](std::size_t i) {
5671 };
5672 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5673 }
5674 else // recursive into child list
5675 {
5676 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5677 }
5678 if (hasChildren) t << "]";
5679 t << "}";
5680 }
5681 }
5682 }
5683 return count>0;
5684}
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:2675
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5611
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:5551
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3273
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3640
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3455
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3085
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:6392

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,
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,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:398
void startFile(const QCString &name, const QCString &manName, const QCString &title, int hierarchyLevel=0)
void startQuickIndices()
Definition outputlist.h:603
void endQuickIndices()
Definition outputlist.h:605
void writeSplitBar(const QCString &name, const QCString &allMembersFile)
Definition outputlist.h:607
void writeQuickLinks(HighlightedItem hli, const QCString &file, bool extraTabs=false)
Definition outputlist.h:613

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(), 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:404
void startHeaderSection()
Definition outputlist.h:466

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

Referenced by generateExampleDocs(), writeAlphabeticalExceptionIndex(), writeAlphabeticalIndex(), writeAlphabeticalInterfaceIndex(), writeAlphabeticalStructIndex(), writeAnnotatedIndexGeneric(), writeConceptIndex(), 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 2255 of file index.cpp.

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

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

2499{
2500 if (Index::instance().numAnnotatedExceptions()==0) return;
2501 ol.pushGeneratorState();
2503 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2504 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2505 bool addToIndex = lne==nullptr || lne->visible();
2506
2507 startFile(ol,"exceptions",QCString(),title,HighlightedItem::Exceptions);
2508
2509 startTitle(ol,QCString());
2510 ol.parseText(title);
2511 endTitle(ol,QCString(),QCString());
2512
2513 if (addToIndex)
2514 {
2515 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2516 }
2517
2518 ol.startContents();
2519 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2520 endFile(ol); // contains ol.endContents()
2521
2522 ol.popGeneratorState();
2523}
@ 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:619
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, 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:2255
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 2411 of file index.cpp.

2412{
2413 if (Index::instance().numAnnotatedClasses()==0) return;
2414 ol.pushGeneratorState();
2416 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassIndex);
2417 QCString title = lne ? lne->title() : theTranslator->trCompoundIndex();
2418 bool addToIndex = lne==nullptr || lne->visible();
2419
2420 startFile(ol,"classes",QCString(),title,HighlightedItem::Classes);
2421
2422 startTitle(ol,QCString());
2423 ol.parseText(title);
2424 endTitle(ol,QCString(),QCString());
2425
2426 if (addToIndex)
2427 {
2428 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"classes",QCString(),FALSE,TRUE);
2429 }
2430
2431 ol.startContents();
2432 writeAlphabeticalClassList(ol, ClassDef::Class, Index::instance().numAnnotatedClasses());
2433 endFile(ol); // contains ol.endContents()
2434
2435 ol.popGeneratorState();
2436}

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

2441{
2442 if (Index::instance().numAnnotatedInterfaces()==0) return;
2443 ol.pushGeneratorState();
2445 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::InterfaceIndex);
2446 QCString title = lne ? lne->title() : theTranslator->trInterfaceIndex();
2447 bool addToIndex = lne==nullptr || lne->visible();
2448
2449 startFile(ol,"interfaces",QCString(),title,HighlightedItem::Interfaces);
2450
2451 startTitle(ol,QCString());
2452 ol.parseText(title);
2453 endTitle(ol,QCString(),QCString());
2454
2455 if (addToIndex)
2456 {
2457 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"interfaces",QCString(),FALSE,TRUE);
2458 }
2459
2460 ol.startContents();
2461 writeAlphabeticalClassList(ol, ClassDef::Interface, Index::instance().numAnnotatedInterfaces());
2462 endFile(ol); // contains ol.endContents()
2463
2464 ol.popGeneratorState();
2465}
@ 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 2469 of file index.cpp.

2470{
2471 if (Index::instance().numAnnotatedStructs()==0) return;
2472 ol.pushGeneratorState();
2474 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::StructIndex);
2475 QCString title = lne ? lne->title() : theTranslator->trStructIndex();
2476 bool addToIndex = lne==nullptr || lne->visible();
2477
2478 startFile(ol,"structs",QCString(),title,HighlightedItem::Structs);
2479
2480 startTitle(ol,QCString());
2481 ol.parseText(title);
2482 endTitle(ol,QCString(),QCString());
2483
2484 if (addToIndex)
2485 {
2486 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"structs",QCString(),FALSE,TRUE);
2487 }
2488
2489 ol.startContents();
2490 writeAlphabeticalClassList(ol, ClassDef::Struct, Index::instance().numAnnotatedStructs());
2491 endFile(ol); // contains ol.endContents()
2492
2493 ol.popGeneratorState();
2494}

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

2128{
2129 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2130 //bool addToIndex = lne==nullptr || lne->visible();
2131 bool first=TRUE;
2132
2133 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2134
2135 for (const auto &cd : *Doxygen::classLinkedMap)
2136 {
2137 if (cd->getLanguage()==SrcLangExt::VHDL &&
2138 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2140 ) // no architecture
2141 {
2142 continue;
2143 }
2144 if (first)
2145 {
2146 ol.startIndexList();
2147 first=FALSE;
2148 }
2149
2150 if (sliceOpt && cd->compoundType() != ct)
2151 {
2152 continue;
2153 }
2154
2155 ol.pushGeneratorState();
2156 if (cd->isEmbeddedInOuterScope())
2157 {
2161 }
2162 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2163 {
2164 ol.startIndexKey();
2165 if (cd->getLanguage()==SrcLangExt::VHDL)
2166 {
2168 ol.docify(prot);
2169 ol.writeString(" ");
2170 }
2171 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2172 ol.endIndexKey();
2173 bool hasBrief = !cd->briefDescription().isEmpty();
2174 ol.startIndexValue(hasBrief);
2175 if (hasBrief)
2176 {
2177 ol.generateDoc(
2178 cd->briefFile(),cd->briefLine(),
2179 cd.get(),nullptr,
2180 cd->briefDescription(TRUE),
2181 FALSE, // indexWords
2182 FALSE, // isExample
2183 QCString(), // example name
2184 TRUE, // single line
2185 TRUE, // link from index
2186 Config_getBool(MARKDOWN_SUPPORT)
2187 );
2188 }
2189 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2190
2191 //if (addToIndex)
2192 //{
2193 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2194 //}
2195 }
2196 ol.popGeneratorState();
2197 }
2198 if (!first) ol.endIndexList();
2199}
void endIndexValue(const QCString &name, bool b)
Definition outputlist.h:428
void startIndexKey()
Definition outputlist.h:422
void endIndexKey()
Definition outputlist.h:424
void generateDoc(const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
void startIndexValue(bool b)
Definition outputlist.h:426
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 2669 of file index.cpp.

2670{
2671 const auto &index = Index::instance();
2673 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2674 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2675 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2677 "annotatedexceptions",
2679}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2552
@ 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 2627 of file index.cpp.

2628{
2629 const auto &index = Index::instance();
2631 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2632 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2633 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2635 "annotated",
2637}
@ 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 2552 of file index.cpp.

2553{
2554 //printf("writeAnnotatedIndex: count=%d printed=%d\n",
2555 // annotatedClasses,annotatedClassesPrinted);
2556 if (ctx.numAnnotated==0) return;
2557
2558 ol.pushGeneratorState();
2560 if (ctx.numPrinted==0)
2561 {
2564 }
2566 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(ctx.fallbackKind); // fall back
2567 QCString title = lne ? lne->title() : ctx.listDefaultTitleText;
2568 bool addToIndex = lne==nullptr || lne->visible();
2569
2570 startFile(ol,ctx.fileBaseName,QCString(),title,ctx.hiItem);
2571
2572 startTitle(ol,QCString());
2573 ol.parseText(title);
2574 endTitle(ol,QCString(),QCString());
2575
2576 ol.startContents();
2577
2578 ol.startTextBlock();
2579 ol.parseText(lne ? lne->intro() : ctx.listDefaultIntroText);
2580 ol.endTextBlock();
2581
2582 // ---------------
2583 // Linear class index for Latex/RTF
2584 // ---------------
2585 ol.pushGeneratorState();
2587 Doxygen::indexList->disable();
2588
2590
2591 Doxygen::indexList->enable();
2592 ol.popGeneratorState();
2593
2594 // ---------------
2595 // Hierarchical class index for HTML
2596 // ---------------
2597 ol.pushGeneratorState();
2599
2600 {
2601 if (addToIndex)
2602 {
2603 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),ctx.fileBaseName,QCString(),TRUE,TRUE);
2604 Doxygen::indexList->incContentsDepth();
2605 }
2606 FTVHelp ftv(false);
2609 TextStream t;
2610 ftv.generateTreeViewInline(t);
2611 ol.writeString(t.str().c_str());
2612 if (addToIndex)
2613 {
2614 Doxygen::indexList->decContentsDepth();
2615 }
2616 }
2617
2618 ol.popGeneratorState();
2619 // ------
2620
2621 endFile(ol); // contains ol.endContents()
2622 ol.popGeneratorState();
2623}
A class that generates a dynamic tree view side panel.
Definition ftvhelp.h:41
void endTextBlock(bool paraBreak=FALSE)
Definition outputlist.h:673
void startTextBlock(bool dense=FALSE)
Definition outputlist.h:671
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:2127
static void writeClassTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1978
static void writeClassTree(const ListType &cl, FTVHelp *ftv, bool addToIndex, bool globalOnly, ClassDef::CompoundType ct)
Definition index.cpp:1699
const LayoutNavEntry::Kind fallbackKind
Definition index.cpp:2544
const ClassDef::CompoundType compoundType
Definition index.cpp:2547
const HighlightedItem hiItem
Definition index.cpp:2549
const QCString fileBaseName
Definition index.cpp:2548
const LayoutNavEntry::Kind listKind
Definition index.cpp:2543
const QCString listDefaultTitleText
Definition index.cpp:2545
const int numAnnotated
Definition index.cpp:2541
const QCString listDefaultIntroText
Definition index.cpp:2546
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 2641 of file index.cpp.

2642{
2643 const auto &index = Index::instance();
2645 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2646 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2647 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2649 "annotatedinterfaces",
2651}
@ 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 2655 of file index.cpp.

2656{
2657 const auto &index = Index::instance();
2659 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2660 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2661 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2663 "annotatedstructs",
2665}
@ AnnotatedStructs
Definition index.h:75

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

Referenced by writeIndexHierarchyEntries().

◆ writeClassHierarchy()

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

Definition at line 1063 of file index.cpp.

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

References Doxygen::classLinkedMap, OutputList::disable(), endIndexHierarchy(), FALSE, Doxygen::hiddenClassLinkedMap, Html, Doxygen::indexList, OutputList::popGeneratorState(), OutputList::pushGeneratorState(), and writeClassTreeForList().

Referenced by writeHierarchicalExceptionIndex(), writeHierarchicalIndex(), and writeHierarchicalInterfaceIndex().

◆ writeClassLinkForMember()

void writeClassLinkForMember ( OutputList & ol,
const MemberDef * md,
const QCString & separator,
QCString & prevClassName )
static

Definition at line 2682 of file index.cpp.

2684{
2685 const ClassDef *cd=md->getClassDef();
2686 if ( cd && prevClassName!=cd->displayName())
2687 {
2688 ol.writeString(separator);
2690 cd->displayName());
2691 prevClassName = cd->displayName();
2692 }
2693}
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 3236 of file index.cpp.

3237{
3238 const auto &index = Index::instance();
3239 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3240 bool addToIndex = lne==nullptr || lne->visible();
3241
3242 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3243 {
3244 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3245 Doxygen::indexList->incContentsDepth();
3246 }
3256 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3257 {
3258 Doxygen::indexList->decContentsDepth();
3259 }
3260
3261}
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3107

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

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

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

1700{
1701 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1702 for (const auto &cdi : cl)
1703 {
1704 const ClassDef *cd = get_pointer(cdi);
1705 if (cd->getLanguage()==SrcLangExt::VHDL)
1706 {
1709 )// no architecture
1710 {
1711 continue;
1712 }
1713 }
1714
1715 if (sliceOpt && cd->compoundType() != ct)
1716 {
1717 continue;
1718 }
1719
1720 if (!globalOnly ||
1721 cd->getOuterScope()==nullptr ||
1723 )
1724 {
1725 int count=0;
1726 for (const auto &ccd : cd->getClasses())
1727 {
1728 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1729 {
1730 count++;
1731 }
1732 }
1734 {
1735 if (ftv)
1736 {
1737 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1738 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1739 }
1740 if (addToIndex &&
1741 (cd->getOuterScope()==nullptr ||
1743 )
1744 )
1745 {
1746 addMembersToIndex(cd,LayoutDocManager::Class,
1747 cd->displayName(FALSE),
1748 cd->anchor(),
1749 cd->partOfGroups().empty() && !cd->isSimple());
1750 }
1751 if (count>0)
1752 {
1753 if (ftv) ftv->incContentsDepth();
1754 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1755 if (ftv) ftv->decContentsDepth();
1756 }
1757 }
1758 }
1759 }
1760}
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 addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex, const Definition *def)
Definition ftvhelp.cpp:184
void decContentsDepth()
Definition ftvhelp.cpp:153
void incContentsDepth()
Definition ftvhelp.cpp:142
bool classVisibleInIndex(const ClassDef *cd)
const ClassDef * get_pointer(const Ptr &p)

References FTVHelp::addContentsItem(), addMembersToIndex(), Definition::anchor(), classVisibleInIndex(), ClassDef::compoundType(), Config_getBool, VhdlDocGen::convert(), FTVHelp::decContentsDepth(), Definition::definitionType(), Definition::displayName(), FALSE, get_pointer(), ClassDef::getClasses(), Definition::getLanguage(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), Doxygen::globalScope, FTVHelp::incContentsDepth(), ClassDef::isImplicitTemplateInstance(), ClassDef::isSimple(), VhdlDocGen::PACKAGECLASS, VhdlDocGen::PACKBODYCLASS, Definition::partOfGroups(), ClassDef::protection(), TRUE, Definition::TypeClass, and writeClassTree().

Referenced by writeAnnotatedIndexGeneric(), writeClassTree(), writeClassTreeInsideNamespaceElement(), writeModuleTreeNode(), and writeNamespaceTreeElement().

◆ writeClassTreeForList()

void writeClassTreeForList ( OutputList & ol,
const ClassLinkedMap & cl,
bool & started,
FTVHelp * ftv,
bool addToIndex,
ClassDef::CompoundType ct,
ClassDefSet & visitedClasses )
static

Definition at line 964 of file index.cpp.

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

References FTVHelp::addContentsItem(), classHasVisibleChildren(), classHasVisibleRoot(), Config_getBool, VhdlDocGen::convert(), OutputList::docify(), OutputList::endIndexItem(), OutputList::endIndexListItem(), OutputList::endTypewriter(), VhdlDocGen::ENTITYCLASS, FALSE, Doxygen::indexList, OutputList::parseText(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), TRUE, and writeClassTreeToOutput().

Referenced by writeClassHierarchy().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 1987 of file index.cpp.

1989{
1990 for (const auto &nd : nsLinkedMap)
1991 {
1992 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
1993 }
1994}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1906

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 1978 of file index.cpp.

1980{
1981 for (const auto &nd : nsLinkedMap)
1982 {
1983 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
1984 }
1985}

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

1908{
1909 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1910 if (!nd->isAnonymous() &&
1911 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1912 {
1913 bool isDir = namespaceHasNestedClass(nd,sliceOpt,ct);
1914 bool isLinkable = nd->isLinkableInProject();
1915
1916 //printf("writeClassTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
1917
1918 QCString ref;
1919 QCString file;
1920 if (isLinkable)
1921 {
1922 ref = nd->getReference();
1923 file = nd->getOutputFileBase();
1924 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1925 {
1926 file=file.replace(0,qstrlen("namespace"),"class");
1927 }
1928 }
1929
1930 if (isDir)
1931 {
1932 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
1933
1934 if (addToIndex)
1935 {
1936 // the namespace entry is already shown under the namespace list so don't
1937 // add it to the nav index and don't create a separate index file for it otherwise
1938 // it will overwrite the one written for the namespace list.
1939 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1940 false, // separateIndex
1941 false // addToNavIndex
1942 );
1943 }
1944 if (addToIndex)
1945 {
1946 Doxygen::indexList->incContentsDepth();
1947 }
1948
1949 ftv->incContentsDepth();
1950 writeClassTreeInsideNamespace(nd->getNamespaces(),ftv,FALSE,addToIndex,ct);
1951 ClassLinkedRefMap d = nd->getClasses();
1952 if (sliceOpt)
1953 {
1954 if (ct == ClassDef::Interface)
1955 {
1956 d = nd->getInterfaces();
1957 }
1958 else if (ct == ClassDef::Struct)
1959 {
1960 d = nd->getStructs();
1961 }
1962 else if (ct == ClassDef::Exception)
1963 {
1964 d = nd->getExceptions();
1965 }
1966 }
1967 writeClassTree(d,ftv,addToIndex,FALSE,ct);
1968 ftv->decContentsDepth();
1969
1970 if (addToIndex)
1971 {
1972 Doxygen::indexList->decContentsDepth();
1973 }
1974 }
1975 }
1976}
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:212
bool namespaceHasNestedClass(const NamespaceDef *nd, bool filterClasses, ClassDef::CompoundType ct)
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58

References FTVHelp::addContentsItem(), Config_getBool, FTVHelp::decContentsDepth(), ClassDef::Exception, FALSE, NamespaceDef::getClasses(), NamespaceDef::getExceptions(), NamespaceDef::getInterfaces(), Definition::getLanguage(), NamespaceDef::getNamespaces(), Definition::getOuterScope(), Definition::getOutputFileBase(), Definition::getReference(), NamespaceDef::getStructs(), Doxygen::globalScope, FTVHelp::incContentsDepth(), Doxygen::indexList, ClassDef::Interface, Definition::isAnonymous(), Definition::isLinkableInProject(), Definition::localName(), namespaceHasNestedClass(), qstrlen(), QCString::replace(), ClassDef::Struct, TRUE, writeClassTree(), and writeClassTreeInsideNamespace().

Referenced by writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespace().

◆ writeClassTreeToOutput()

void writeClassTreeToOutput ( OutputList & ol,
const BaseClassList & bcl,
int level,
FTVHelp * ftv,
bool addToIndex,
ClassDefSet & visitedClasses )
static

Generates HTML Help tree of classes

Definition at line 620 of file index.cpp.

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

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

4657{
4658 if (Index::instance().numDocumentedConcepts()==0) return;
4659 ol.pushGeneratorState();
4660 // 1.{
4663 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4664 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4665 bool addToIndex = lne==nullptr || lne->visible();
4666
4667 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4668 startTitle(ol,QCString());
4669 ol.parseText(title);
4670 endTitle(ol,QCString(),QCString());
4671 ol.startContents();
4672 ol.startTextBlock();
4673 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4674 ol.endTextBlock();
4675
4676 // ---------------
4677 // Normal group index for Latex/RTF
4678 // ---------------
4679 // 2.{
4680 ol.pushGeneratorState();
4682
4683 bool first=TRUE;
4684 for (const auto &cd : *Doxygen::conceptLinkedMap)
4685 {
4686 if (cd->isLinkableInProject())
4687 {
4688 if (first)
4689 {
4690 ol.startIndexList();
4691 first=FALSE;
4692 }
4693 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4694 ol.startIndexKey();
4695 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4696 ol.endIndexKey();
4697
4698 bool hasBrief = !cd->briefDescription().isEmpty();
4699 ol.startIndexValue(hasBrief);
4700 if (hasBrief)
4701 {
4702 //ol.docify(" (");
4703 ol.generateDoc(
4704 cd->briefFile(),cd->briefLine(),
4705 cd.get(),nullptr,
4706 cd->briefDescription(TRUE),
4707 FALSE, // index words
4708 FALSE, // isExample
4709 QCString(), // example name
4710 TRUE, // single line
4711 TRUE, // link from index
4712 Config_getBool(MARKDOWN_SUPPORT)
4713 );
4714 //ol.docify(")");
4715 }
4716 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4717
4718 }
4719 }
4720 if (!first) ol.endIndexList();
4721
4722 ol.popGeneratorState();
4723 // 2.}
4724
4725 // ---------------
4726 // interactive group index for HTML
4727 // ---------------
4728 // 2.{
4729 ol.pushGeneratorState();
4731
4732 {
4733 if (addToIndex)
4734 {
4735 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4736 Doxygen::indexList->incContentsDepth();
4737 }
4738 FTVHelp ftv(false);
4739 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4740 {
4741 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4742 }
4743 writeConceptRootList(&ftv,addToIndex);
4744 TextStream t;
4745 ftv.generateTreeViewInline(t);
4746 ol.writeString(t.str().c_str());
4747 if (addToIndex)
4748 {
4749 Doxygen::indexList->decContentsDepth();
4750 }
4751 }
4752 ol.popGeneratorState();
4753 // 2.}
4754
4755 endFile(ol);
4756 ol.popGeneratorState();
4757 // 1.}
4758}
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4634
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4583

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

4551{
4552 for (const auto &cd : concepts)
4553 {
4554 if (cd->isLinkableInProject())
4555 {
4556 if (ftv)
4557 {
4558 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4559 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4560 }
4561 if (addToIndex)
4562 {
4563 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4564 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4565 }
4566 }
4567 }
4568}

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

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

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4634 of file index.cpp.

4635{
4636 for (const auto &cd : *Doxygen::conceptLinkedMap)
4637 {
4638 if ((cd->getOuterScope()==nullptr ||
4639 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4640 )
4641 {
4642 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4643 ftv->addContentsItem(
4644 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4645 QCString(),false,cd->partOfGroups().empty(),cd.get());
4646 if (addToIndex)
4647 {
4648 Doxygen::indexList->addContentsItem(
4649 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4650 QCString(),false,cd->partOfGroups().empty(),cd.get());
4651 }
4652 }
4653 }
4654}

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

4575{
4576 for (const auto &nd : nsLinkedMap)
4577 {
4578 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4579 }
4580}

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4583 of file index.cpp.

4585{
4586 if (!nd->isAnonymous() &&
4587 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4588 {
4589 bool isDir = namespaceHasNestedConcept(nd);
4590 bool isLinkable = nd->isLinkableInProject();
4591
4592 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4593
4594 QCString ref;
4595 QCString file;
4596 if (isLinkable)
4597 {
4598 ref = nd->getReference();
4599 file = nd->getOutputFileBase();
4600 }
4601
4602 if (isDir)
4603 {
4604 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4605
4606 if (addToIndex)
4607 {
4608 // the namespace entry is already shown under the namespace list so don't
4609 // add it to the nav index and don't create a separate index file for it otherwise
4610 // it will overwrite the one written for the namespace list.
4611 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4612 false, // separateIndex
4613 false // addToNavIndex
4614 );
4615 }
4616 if (addToIndex)
4617 {
4618 Doxygen::indexList->incContentsDepth();
4619 }
4620
4621 ftv->incContentsDepth();
4623 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4624 ftv->decContentsDepth();
4625
4626 if (addToIndex)
4627 {
4628 Doxygen::indexList->decContentsDepth();
4629 }
4630 }
4631 }
4632}
virtual ConceptLinkedRefMap getConcepts() const =0
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4573
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4550
bool namespaceHasNestedConcept(const NamespaceDef *nd)

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

Referenced by writeConceptIndex(), and writeConceptTreeInsideNamespace().

◆ writeDirHierarchy()

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

Definition at line 900 of file index.cpp.

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

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

Referenced by writeFileIndex().

◆ writeDirTreeNode()

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

Definition at line 756 of file index.cpp.

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

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

Referenced by writeDirHierarchy(), and writeDirTreeNode().

◆ writeExampleIndex()

void writeExampleIndex ( OutputList & ol)
static

Definition at line 3809 of file index.cpp.

3810{
3811 if (Doxygen::exampleLinkedMap->empty()) return;
3812 ol.pushGeneratorState();
3815 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3816 QCString title = lne ? lne->title() : theTranslator->trExamples();
3817 bool addToIndex = lne==nullptr || lne->visible();
3818
3819 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3820
3821 startTitle(ol,QCString());
3822 ol.parseText(title);
3823 endTitle(ol,QCString(),QCString());
3824
3825 ol.startContents();
3826
3827 if (addToIndex)
3828 {
3829 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3830 Doxygen::indexList->incContentsDepth();
3831 }
3832
3833 ol.startTextBlock();
3834 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3835 ol.endTextBlock();
3836
3837 ol.startItemList();
3838 for (const auto &pd : *Doxygen::exampleLinkedMap)
3839 {
3840 ol.startItemListItem();
3841 QCString n=pd->getOutputFileBase();
3842 if (!pd->title().isEmpty())
3843 {
3844 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3845 if (addToIndex)
3846 {
3847 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3848 }
3849 }
3850 else
3851 {
3852 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3853 if (addToIndex)
3854 {
3855 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3856 }
3857 }
3858 ol.endItemListItem();
3859 //ol.writeString("\n");
3860 }
3861 ol.endItemList();
3862
3863 if (addToIndex)
3864 {
3865 Doxygen::indexList->decContentsDepth();
3866 }
3867 endFile(ol);
3868 ol.popGeneratorState();
3869}
void startItemListItem()
Definition outputlist.h:458
void endItemListItem()
Definition outputlist.h:460

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

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeFileLinkForMember()

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

Definition at line 2695 of file index.cpp.

2697{
2698 const FileDef *fd=md->getFileDef();
2699 if (fd && prevFileName!=fd->name())
2700 {
2701 ol.writeString(separator);
2703 fd->name());
2704 prevFileName = fd->name();
2705 }
2706}
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 3420 of file index.cpp.

3421{
3422 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3423 bool addToIndex = lne==nullptr || lne->visible();
3424 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3425 {
3426 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3427 Doxygen::indexList->incContentsDepth();
3428 }
3438 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3439 {
3440 Doxygen::indexList->decContentsDepth();
3441 }
3442
3443}
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3296

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

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

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

Referenced by writeFileMemberIndex().

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1205 of file index.cpp.

1206{
1207 if (Index::instance().numHierarchyClasses()==0) return;
1209 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1210 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1211 startFile(ol,"inherits",QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1212 startTitle(ol,QCString());
1213 ol.parseText(title);
1214 endTitle(ol,QCString(),QCString());
1215 ol.startContents();
1216 ol.startTextBlock();
1217 ol.startParagraph();
1218 ol.startTextLink("hierarchy",QCString());
1219 ol.parseText(theTranslator->trGotoTextualHierarchy());
1220 ol.endTextLink();
1221 ol.endParagraph();
1222 ol.endTextBlock();
1225 endFile(ol);
1226 ol.enableAll();
1227}
Represents a graphical class hierarchy.
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:669
void startParagraph(const QCString &classDef=QCString())
Definition outputlist.h:408
void endParagraph()
Definition outputlist.h:410
void endTextLink()
Definition outputlist.h:445
void enableAll()
void startTextLink(const QCString &file, const QCString &anchor)
Definition outputlist.h:443

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

Referenced by writeIndexHierarchyEntries().

◆ writeGraphicalExceptionHierarchy()

void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1415 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeGraphicalInterfaceHierarchy()

void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1310 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeGraphInfo()

void writeGraphInfo ( OutputList & ol)

Definition at line 4037 of file index.cpp.

4038{
4039 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4040 ol.pushGeneratorState();
4042
4043 DotLegendGraph gd;
4044 gd.writeGraph(Config_getString(HTML_OUTPUT));
4045
4046 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4047 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4048 // temporarily disable the stripping of comments for our own code example!
4049 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4050 // temporarily disable create subdirs for linking to our example
4051 Config_updateBool(CREATE_SUBDIRS,FALSE);
4052
4053 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4054 startTitle(ol,QCString());
4055 ol.parseText(theTranslator->trLegendTitle());
4056 endTitle(ol,QCString(),QCString());
4057 ol.startContents();
4058 QCString legendDocs = theTranslator->trLegendDocs();
4059 int s = legendDocs.find("<center>");
4060 int e = legendDocs.find("</center>");
4061 QCString imgExt = getDotImageExtension();
4062 if (imgExt=="svg" && s!=-1 && e!=-1)
4063 {
4064 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4065 //printf("legendDocs=%s\n",qPrint(legendDocs));
4066 }
4067
4068 {
4069 auto fd = createFileDef("","graph_legend.dox");
4070 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4072 }
4073
4074 // restore config settings
4075 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4076 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4077
4078 endFile(ol);
4079 ol.popGeneratorState();
4080}
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:226
QCString left(size_t len) const
Definition qcstring.h:214
#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:6766

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

4319{
4320 if (ftv)
4321 {
4322 ol.pushGeneratorState();
4324 }
4325 startIndexHierarchy(ol,0);
4326 for (const auto &gd : *Doxygen::groupLinkedMap)
4327 {
4328 if (gd->isVisibleInHierarchy())
4329 {
4330 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4331 }
4332 }
4333 endIndexHierarchy(ol,0);
4334 if (ftv)
4335 {
4336 ol.popGeneratorState();
4337 }
4338}
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4088

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

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

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(), 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(), OutputList::parseText(), LinkedRefMap< T, Hash, KeyEqual, Map >::size(), startIndexHierarchy(), OutputList::startIndexItem(), OutputList::startIndexListItem(), OutputList::startTypewriter(), TRUE, LayoutDocEntryMemberDef::type, warn, writeGroupTreeNode(), and writePages().

Referenced by writeGroupHierarchy(), and writeGroupTreeNode().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1336 of file index.cpp.

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

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::enable(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), ClassDef::Exception, ExceptionHierarchy, LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), RTF, OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeHierarchicalIndex()

void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1124 of file index.cpp.

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

References ClassDef::Class, ClassHierarchy, Config_getBool, OutputList::disable(), OutputList::disableAllBut(), Docbook, endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), LayoutNavEntry::intro(), Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), RTF, OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeHierarchicalInterfaceIndex()

void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1231 of file index.cpp.

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

References Config_getBool, OutputList::disable(), OutputList::disableAllBut(), OutputList::enable(), endFile(), OutputList::endParagraph(), OutputList::endTextBlock(), OutputList::endTextLink(), endTitle(), LayoutNavEntry::find(), FTVHelp::generateTreeViewInline(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), ClassDef::Interface, InterfaceHierarchy, LayoutNavEntry::intro(), Latex, Man, OutputList::parseText(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), LayoutDocManager::rootNavEntry(), RTF, OutputList::startContents(), startFile(), OutputList::startParagraph(), OutputList::startTextBlock(), OutputList::startTextLink(), startTitle(), TextStream::str(), theTranslator, LayoutNavEntry::title(), TRUE, LayoutNavEntry::visible(), writeClassHierarchy(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeIndex()

void writeIndex ( OutputList & ol)
static

Definition at line 4799 of file index.cpp.

4800{
4801 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4802 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4803 bool disableIndex = Config_getBool(DISABLE_INDEX);
4804 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4805 bool pageOutlinePanel = Config_getBool(PAGE_OUTLINE_PANEL);
4806 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4807 QCString projectName = Config_getString(PROJECT_NAME);
4808 // save old generator state
4809 ol.pushGeneratorState();
4810
4811 QCString projPrefix;
4812 if (!projectName.isEmpty())
4813 {
4814 projPrefix=projectName+" ";
4815 }
4816
4817 //--------------------------------------------------------------------
4818 // write HTML index
4819 //--------------------------------------------------------------------
4821
4822 QCString defFileName =
4823 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4824 int defLine =
4825 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4826
4827 QCString title;
4828 if (!mainPageHasTitle())
4829 {
4830 title = theTranslator->trMainPage();
4831 }
4832 else if (Doxygen::mainPage)
4833 {
4834 title = filterTitle(Doxygen::mainPage->title());
4835 }
4836
4837 QCString indexName="index";
4838 ol.startFile(indexName,QCString(),title);
4839
4841 {
4842 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4843 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4844 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4845 if (hasTitle) // to avoid duplicate entries in the treeview
4846 {
4847 Doxygen::indexList->addContentsItem(hasSubs,
4848 title,
4849 QCString(),
4850 indexName,
4851 QCString(),
4852 hasSubs,
4853 TRUE);
4854 }
4855 if (hasSubs)
4856 {
4857 writePages(Doxygen::mainPage.get(),nullptr);
4858 }
4859 }
4860
4861 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4862 ol.startQuickIndices();
4863 if (!disableIndex && !quickLinksAfterSplitbar)
4864 {
4866 }
4867 ol.endQuickIndices();
4868 ol.writeSplitBar(indexName,QCString());
4869 if (quickLinksAfterSplitbar)
4870 {
4872 }
4873 ol.writeSearchInfo();
4874 bool headerWritten=FALSE;
4876 {
4877 if (!Doxygen::mainPage->title().isEmpty())
4878 {
4879 if (Doxygen::mainPage->title().lower() != "notitle")
4880 ol.startPageDoc(Doxygen::mainPage->title());
4881 else
4882 ol.startPageDoc("");
4883 }
4884 else
4885 ol.startPageDoc(projectName);
4886 }
4887 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4888 {
4889 if (Doxygen::mainPage->title().lower()!="notitle")
4890 {
4891 ol.startHeaderSection();
4893 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4894 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4895 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT));
4896 headerWritten = TRUE;
4897 }
4898 }
4899 else
4900 {
4901 if (!projectName.isEmpty())
4902 {
4903 ol.startHeaderSection();
4905 ol.parseText(theTranslator->trDocumentation(projectName));
4906 headerWritten = TRUE;
4907 }
4908 }
4909 if (headerWritten)
4910 {
4912 ol.endHeaderSection();
4913 }
4914
4915 ol.startContents();
4916 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4917 {
4919 }
4920
4922 {
4923 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections() && !(generateTreeView && pageOutlinePanel))
4924 {
4925 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4926 }
4927
4928 ol.startTextBlock();
4929 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4930 Doxygen::mainPage->documentation(),true,false,
4931 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4932 ol.endTextBlock();
4933 ol.endPageDoc();
4934 }
4935
4938 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4939 Doxygen::indexList->addIndexFile(fn);
4940
4941 if (Doxygen::mainPage &&
4942 generateTreeView &&
4943 pageOutlinePanel &&
4944 Doxygen::mainPage->localToc().isHtmlEnabled() &&
4945 Doxygen::mainPage->hasSections()
4946 )
4947 {
4948 ol.writeString("</div><!-- doc-content -->\n");
4949 ol.endContents();
4950 Doxygen::mainPage->writePageNavigation(ol);
4951 ol.writeString("</div><!-- container -->\n");
4952 endFile(ol,true,true);
4953 }
4954 else
4955 {
4956 endFile(ol);
4957 }
4958
4960
4961 //--------------------------------------------------------------------
4962 // write LaTeX/RTF index
4963 //--------------------------------------------------------------------
4967
4969 {
4970 msg("Generating main page...\n");
4971 Doxygen::mainPage->writeDocumentation(ol);
4972 }
4973
4974 ol.startFile("refman",QCString(),QCString());
4978
4979 if (projPrefix.isEmpty())
4980 {
4981 ol.parseText(theTranslator->trReferenceManual());
4982 }
4983 else
4984 {
4985 ol.parseText(projPrefix);
4986 }
4987
4988 if (!Config_getString(PROJECT_NUMBER).isEmpty())
4989 {
4990 ol.startProjectNumber();
4991 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
4992 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4993 ol.endProjectNumber();
4994 }
4997 ol.parseText(theTranslator->trGeneratedBy());
5001
5002 ol.lastIndexPage();
5004 {
5007 }
5008 const auto &index = Index::instance();
5009 if (index.numDocumentedPages()>0)
5010 {
5013 }
5014
5016 if (!Config_getBool(LATEX_HIDE_INDICES))
5017 {
5018 //if (indexedPages>0)
5019 //{
5020 // ol.startIndexSection(isPageIndex);
5021 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
5022 // ol.endIndexSection(isPageIndex);
5023 //}
5024 if (index.numDocumentedModules()>0)
5025 {
5027 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5029 }
5030 if (index.numDocumentedGroups()>0)
5031 {
5033 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5035 }
5036 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5037 {
5038 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5039 if (lne)
5040 {
5042 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5044 }
5045 }
5046 if (index.numDocumentedConcepts()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5051 }
5052 if (index.numHierarchyInterfaces()>0)
5053 {
5055 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5057 }
5058 if (index.numHierarchyClasses()>0)
5059 {
5060 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5061 if (lne)
5062 {
5064 ol.parseText(/*projPrefix+*/
5065 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5066 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5067 theTranslator->trHierarchicalIndex()
5068 ));
5070 }
5071 }
5072 if (index.numHierarchyExceptions()>0)
5073 {
5075 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5077 }
5078 if (index.numAnnotatedInterfacesPrinted()>0)
5079 {
5081 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5083 }
5084 if (index.numAnnotatedClassesPrinted()>0)
5085 {
5087 ol.parseText(/*projPrefix+*/
5088 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5089 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5090 theTranslator->trCompoundIndex()
5091 ));
5093 }
5094 if (index.numAnnotatedStructsPrinted()>0)
5095 {
5097 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5099 }
5100 if (index.numAnnotatedExceptionsPrinted()>0)
5101 {
5103 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5105 }
5106 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5107 {
5109 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5111 }
5112 }
5114
5115 if (index.numDocumentedModules()>0)
5116 {
5118 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5120 }
5121 if (index.numDocumentedGroups()>0)
5122 {
5124 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5126 }
5127 if (index.numDocumentedNamespaces()>0)
5128 {
5130 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5132 }
5133 if (index.numDocumentedConcepts()>0)
5134 {
5136 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5138 }
5139 if (index.numAnnotatedInterfacesPrinted()>0)
5140 {
5142 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5144 }
5145 if (index.numAnnotatedClassesPrinted()>0)
5146 {
5148 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5150 }
5151 if (index.numAnnotatedStructsPrinted()>0)
5152 {
5154 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5156 }
5157 if (index.numAnnotatedExceptionsPrinted()>0)
5158 {
5160 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5162 }
5163 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5164 {
5166 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5168 }
5169 if (!Doxygen::exampleLinkedMap->empty())
5170 {
5172 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5174 }
5176 endFile(ol);
5177
5178 ol.popGeneratorState();
5179}
static const QCString crawlFileName
Definition sitemap.h:75
void endPageDoc()
Definition outputlist.h:625
void endIndexSection(IndexSection is)
Definition outputlist.h:388
void startProjectNumber()
Definition outputlist.h:392
void lastIndexPage()
Definition outputlist.h:675
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:623
void endProjectNumber()
Definition outputlist.h:394
void startIndexSection(IndexSection is)
Definition outputlist.h:386
@ 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
@ 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
@ 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:5415

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, filterTitle(), LayoutNavEntry::find(), OutputList::generateDoc(), Html, Doxygen::indexList, Index::instance(), LayoutDocManager::instance(), isClassDocumentation, isClassHierarchyIndex, isCompoundIndex, isConceptDocumentation, isConceptIndex, QCString::isEmpty(), isEndIndex, isExampleDocumentation, isFileDocumentation, isFileIndex, isMainPage, isModuleDocumentation, isModuleIndex, isNamespaceDocumentation, isNamespaceIndex, isPageDocumentation, isTitlePageAuthor, isTitlePageStart, isTopicDocumentation, isTopicIndex, OutputList::lastIndexPage(), Latex, Main, Doxygen::mainPage, mainPageHasTitle(), msg, 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 5702 of file index.cpp.

5703{
5704 writeMenuData();
5706 if (lne)
5707 {
5709 }
5710}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5183
static void writeMenuData()
Definition index.cpp:5686

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

5184{
5185 auto isRef = [](const QCString &s)
5186 {
5187 return s.startsWith("@ref") || s.startsWith("\\ref");
5188 };
5189 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5190 const auto &index = Index::instance();
5191 for (const auto &lne : entries)
5192 {
5193 LayoutNavEntry::Kind kind = lne->kind();
5194 size_t idx = static_cast<size_t>(kind);
5195 if (idx>=indexWritten.size())
5196 {
5197 size_t oldSize = indexWritten.size();
5198 size_t newSize = idx+1;
5199 indexWritten.resize(newSize);
5200 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5201 }
5202 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5203 bool addToIndex=lne->visible();
5204 bool needsClosing=FALSE;
5205 if (!indexWritten.at(idx))
5206 {
5207 switch(kind)
5208 {
5209 case LayoutNavEntry::MainPage:
5210 msg("Generating index page...\n");
5211 writeIndex(ol);
5212 break;
5213 case LayoutNavEntry::Pages:
5214 msg("Generating page index...\n");
5215 writePageIndex(ol);
5216 break;
5217 case LayoutNavEntry::Topics:
5218 msg("Generating topic index...\n");
5219 writeTopicIndex(ol);
5220 break;
5221 case LayoutNavEntry::Modules:
5222 {
5223 if (index.numDocumentedModules()>0 && addToIndex)
5224 {
5225 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5226 Doxygen::indexList->incContentsDepth();
5227 needsClosing=TRUE;
5228 }
5229 }
5230 break;
5231 case LayoutNavEntry::ModuleList:
5232 msg("Generating module index...\n");
5233 writeModuleIndex(ol);
5234 break;
5235 case LayoutNavEntry::ModuleMembers:
5236 msg("Generating module member index...\n");
5238 break;
5239 case LayoutNavEntry::Namespaces:
5240 {
5241 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5242 if (showNamespaces)
5243 {
5244 if (index.numDocumentedNamespaces()>0 && addToIndex)
5245 {
5246 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5247 Doxygen::indexList->incContentsDepth();
5248 needsClosing=TRUE;
5249 }
5250 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5251 {
5252 msg("Generating namespace index...\n");
5254 }
5255 }
5256 }
5257 break;
5258 case LayoutNavEntry::NamespaceList:
5259 {
5260 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5261 if (showNamespaces)
5262 {
5263 msg("Generating namespace index...\n");
5265 }
5266 }
5267 break;
5268 case LayoutNavEntry::NamespaceMembers:
5269 msg("Generating namespace member index...\n");
5271 break;
5272 case LayoutNavEntry::Classes:
5273 if (index.numAnnotatedClasses()>0 && addToIndex)
5274 {
5275 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5276 Doxygen::indexList->incContentsDepth();
5277 needsClosing=TRUE;
5278 }
5279 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5280 {
5281 msg("Generating annotated compound index...\n");
5283 }
5284 break;
5285 case LayoutNavEntry::Concepts:
5286 msg("Generating concept index...\n");
5288 break;
5289 case LayoutNavEntry::ClassList:
5290 msg("Generating annotated compound index...\n");
5292 break;
5293 case LayoutNavEntry::ClassIndex:
5294 msg("Generating alphabetical compound index...\n");
5296 break;
5297 case LayoutNavEntry::ClassHierarchy:
5298 msg("Generating hierarchical class index...\n");
5300 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5301 {
5302 msg("Generating graphical class hierarchy...\n");
5304 }
5305 break;
5306 case LayoutNavEntry::ClassMembers:
5307 if (!sliceOpt)
5308 {
5309 msg("Generating member index...\n");
5311 }
5312 break;
5313 case LayoutNavEntry::Interfaces:
5314 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5315 {
5316 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5317 Doxygen::indexList->incContentsDepth();
5318 needsClosing=TRUE;
5319 }
5320 break;
5321 case LayoutNavEntry::InterfaceList:
5322 if (sliceOpt)
5323 {
5324 msg("Generating annotated interface index...\n");
5326 }
5327 break;
5328 case LayoutNavEntry::InterfaceIndex:
5329 if (sliceOpt)
5330 {
5331 msg("Generating alphabetical interface index...\n");
5333 }
5334 break;
5335 case LayoutNavEntry::InterfaceHierarchy:
5336 if (sliceOpt)
5337 {
5338 msg("Generating hierarchical interface index...\n");
5340 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5341 {
5342 msg("Generating graphical interface hierarchy...\n");
5344 }
5345 }
5346 break;
5347 case LayoutNavEntry::Structs:
5348 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5349 {
5350 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5351 Doxygen::indexList->incContentsDepth();
5352 needsClosing=TRUE;
5353 }
5354 break;
5355 case LayoutNavEntry::StructList:
5356 if (sliceOpt)
5357 {
5358 msg("Generating annotated struct index...\n");
5360 }
5361 break;
5362 case LayoutNavEntry::StructIndex:
5363 if (sliceOpt)
5364 {
5365 msg("Generating alphabetical struct index...\n");
5367 }
5368 break;
5369 case LayoutNavEntry::Exceptions:
5370 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5371 {
5372 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5373 Doxygen::indexList->incContentsDepth();
5374 needsClosing=TRUE;
5375 }
5376 break;
5377 case LayoutNavEntry::ExceptionList:
5378 if (sliceOpt)
5379 {
5380 msg("Generating annotated exception index...\n");
5382 }
5383 break;
5384 case LayoutNavEntry::ExceptionIndex:
5385 if (sliceOpt)
5386 {
5387 msg("Generating alphabetical exception index...\n");
5389 }
5390 break;
5391 case LayoutNavEntry::ExceptionHierarchy:
5392 if (sliceOpt)
5393 {
5394 msg("Generating hierarchical exception index...\n");
5396 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5397 {
5398 msg("Generating graphical exception hierarchy...\n");
5400 }
5401 }
5402 break;
5403 case LayoutNavEntry::Files:
5404 {
5405 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5406 {
5407 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5408 Doxygen::indexList->incContentsDepth();
5409 needsClosing=TRUE;
5410 }
5411 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5412 {
5413 msg("Generating file index...\n");
5414 writeFileIndex(ol);
5415 }
5416 }
5417 break;
5418 case LayoutNavEntry::FileList:
5419 msg("Generating file index...\n");
5420 writeFileIndex(ol);
5421 break;
5422 case LayoutNavEntry::FileGlobals:
5423 msg("Generating file member index...\n");
5425 break;
5426 case LayoutNavEntry::Examples:
5427 msg("Generating example index...\n");
5429 break;
5430 case LayoutNavEntry::User:
5431 if (addToIndex)
5432 {
5433 // prepend a ! or ^ marker to the URL to avoid tampering with it
5434 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5435 bool isRelative=url.at(0)=='!';
5436 if (!url.isEmpty() && !isRelative) // absolute URL
5437 {
5438 url.prepend("^"); // prepend ^ to absolute URL
5439 }
5440 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5441 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5442 }
5443 break;
5444 case LayoutNavEntry::UserGroup:
5445 if (addToIndex)
5446 {
5447 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5448 if (!url.isEmpty())
5449 {
5450 if (url=="!") // result of a "[none]" url
5451 {
5452 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5453 }
5454 else
5455 {
5456 bool isRelative=url.at(0)=='!';
5457 if (!isRelative) // absolute URL
5458 {
5459 url.prepend("^"); // prepend ^ to absolute URL
5460 }
5461 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5462 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5463 }
5464 }
5465 else
5466 {
5467 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5468 }
5469 Doxygen::indexList->incContentsDepth();
5470 needsClosing=TRUE;
5471 }
5472 writeUserGroupStubPage(ol,lne.get());
5473 break;
5474 case LayoutNavEntry::None:
5475 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5476 break;
5477 }
5478 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5479 {
5480 indexWritten.at(idx)=TRUE;
5481 }
5482 }
5483 writeIndexHierarchyEntries(ol,lne->children());
5484 if (needsClosing)
5485 {
5486 switch(kind)
5487 {
5488 case LayoutNavEntry::Modules:
5489 case LayoutNavEntry::Namespaces:
5490 case LayoutNavEntry::Classes:
5491 case LayoutNavEntry::Files:
5492 case LayoutNavEntry::UserGroup:
5493 Doxygen::indexList->decContentsDepth();
5494 break;
5495 default:
5496 break;
5497 }
5498 }
5499 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5500 }
5501}
QCString & prepend(const char *s)
Definition qcstring.h:407
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
static void writeGraphicalClassHierarchy(OutputList &ol)
Definition index.cpp:1205
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2655
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2498
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3236
static std::vector< bool > indexWritten
Definition index.cpp:5181
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2627
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1543
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1310
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2411
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2641
static void writePageIndex(OutputList &ol)
Definition index.cpp:3963
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:1996
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2669
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1231
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4762
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4342
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3784
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1415
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3809
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2440
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2469
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4656
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4482
static void writeIndex(OutputList &ol)
Definition index.cpp:4799
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1336
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3604
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1124
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3420
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:6404

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(), 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 2736 of file index.cpp.

2739{
2740 int index = static_cast<int>(type);
2741 const int numIndices = 4;
2742 ASSERT(index<numIndices);
2743
2744 typedef void (*writeLinkForMember_t)(OutputList &ol,const MemberDef *md,const QCString &separator,
2745 QCString &prevNamespaceName);
2746
2747 // each index tab has its own write function
2748 static writeLinkForMember_t writeLinkForMemberMap[numIndices] =
2749 {
2754 };
2755 QCString prevName;
2756 QCString prevDefName;
2757 bool first=TRUE;
2758 bool firstSection=TRUE;
2759 bool firstItem=TRUE;
2760 const Index::MemberIndexList *mil = nullptr;
2761 std::string letter;
2762 for (const auto &kv : memberIndexMap)
2763 {
2764 if (!page.empty()) // specific page mode
2765 {
2766 auto it = memberIndexMap.find(page);
2767 if (it != memberIndexMap.end())
2768 {
2769 mil = &it->second;
2770 letter = page;
2771 }
2772 }
2773 else // do all pages
2774 {
2775 mil = &kv.second;
2776 letter = kv.first;
2777 }
2778 if (mil==nullptr || mil->empty()) continue;
2779 for (const auto &md : *mil)
2780 {
2781 const char *sep = nullptr;
2782 bool isFunc=!md->isObjCMethod() &&
2783 (md->isFunction() || md->isSlot() || md->isSignal());
2784 QCString name=type==Definition::TypeModule ? md->qualifiedName() : md->name();
2785 int startIndex = getPrefixIndex(name);
2786 if (name.data()+startIndex!=prevName) // new entry
2787 {
2788 if ((prevName.isEmpty() ||
2789 tolower(name.at(startIndex))!=tolower(prevName.at(0))) &&
2790 useSections) // new section
2791 {
2792 if (!firstItem) ol.endItemListItem();
2793 if (!firstSection) ol.endItemList();
2794 QCString cs = letterToLabel(letter.c_str());
2795 QCString anchor=QCString("index_")+convertToId(cs);
2796 QCString title=QCString("- ")+letter.c_str()+" -";
2797 ol.startSection(anchor,title,SectionType::Subsection);
2798 ol.docify(title);
2799 ol.endSection(anchor,SectionType::Subsection);
2800 ol.startItemList();
2801 firstSection=FALSE;
2802 firstItem=TRUE;
2803 }
2804 else if (!useSections && first)
2805 {
2806 ol.startItemList();
2807 first=FALSE;
2808 }
2809
2810 // member name
2811 if (!firstItem) ol.endItemListItem();
2812 ol.startItemListItem();
2813 firstItem=FALSE;
2814 ol.docify(name);
2815 if (isFunc) ol.docify("()");
2816 //ol.writeString("\n");
2817
2818 // link to class
2819 prevDefName="";
2820 sep = "&#160;:&#160;";
2821 prevName = name.data()+startIndex;
2822 }
2823 else // same entry
2824 {
2825 sep = ", ";
2826 // link to class for other members with the same name
2827 }
2828 if (index<numIndices)
2829 {
2830 // write the link for the specific list type
2831 writeLinkForMemberMap[index](ol,md,sep,prevDefName);
2832 }
2833 }
2834 if (!page.empty())
2835 {
2836 break;
2837 }
2838 }
2839 if (!firstItem) ol.endItemListItem();
2840 ol.endItemList();
2841}
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:314
static constexpr int Subsection
Definition section.h:34
static void writeFileLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevFileName)
Definition index.cpp:2695
static void writeNamespaceLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevNamespaceName)
Definition index.cpp:2708
static void writeClassLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevClassName)
Definition index.cpp:2682
static void writeModuleLinkForMember(OutputList &ol, const MemberDef *md, const QCString &separator, QCString &prevModuleName)
Definition index.cpp:2721
#define ASSERT(x)
Definition qcstring.h:39

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

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

◆ writeMemberToIndex()

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

Definition at line 468 of file index.cpp.

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

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

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

◆ writeMenuData()

void writeMenuData ( )
static

Definition at line 5686 of file index.cpp.

5687{
5688 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5689 QCString outputDir = Config_getBool(HTML_OUTPUT);
5691 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5692 if (t.is_open())
5693 {
5695 t << "var menudata={";
5696 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5697 if (hasChildren) t << "]";
5698 t << "}\n";
5699 }
5700}
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:71
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665

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

4483{
4484 if (ModuleManager::instance().numDocumentedModules()==0) return;
4485 ol.pushGeneratorState();
4486 // 1.{
4487
4490 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4491 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4492 QCString title = lne ? lne->title() : theTranslator->trModules();
4493 bool addToIndex = lne==nullptr || lne->visible();
4494
4495 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4496 startTitle(ol,QCString());
4497 ol.parseText(title);
4498 endTitle(ol,QCString(),QCString());
4499 ol.startContents();
4500 ol.startTextBlock();
4501 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4502 ol.endTextBlock();
4503
4504 // ---------------
4505 // Normal group index for Latex/RTF
4506 // ---------------
4507 // 2.{
4508 ol.pushGeneratorState();
4510 Doxygen::indexList->disable();
4511
4512 writeModuleList(ol,nullptr,FALSE);
4513
4514 Doxygen::indexList->enable();
4515 ol.popGeneratorState();
4516 // 2.}
4517
4518 // ---------------
4519 // interactive group index for HTML
4520 // ---------------
4521 // 2.{
4522 ol.pushGeneratorState();
4524
4525 {
4526 if (addToIndex)
4527 {
4528 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4529 Doxygen::indexList->incContentsDepth();
4530 }
4531 FTVHelp ftv(false);
4532 writeModuleList(ol,&ftv,addToIndex);
4533 TextStream t;
4534 ftv.generateTreeViewInline(t);
4535 ol.writeString(t.str().c_str());
4536 if (addToIndex)
4537 {
4538 Doxygen::indexList->decContentsDepth();
4539 }
4540 }
4541 ol.popGeneratorState();
4542 // 2.}
4543 endFile(ol);
4544 ol.popGeneratorState();
4545 // 1.}
4546}
static ModuleManager & instance()
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4458

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

2723{
2724 const ModuleDef *mod=md->getModuleDef();
2725 if (mod && prevModuleName!=mod->displayName())
2726 {
2727 ol.writeString(separator);
2728 // link to the member declaration in the module page
2729 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2730 mod->displayName());
2731 prevModuleName = mod->displayName();
2732 }
2733}
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 4458 of file index.cpp.

4459{
4460 if (ftv)
4461 {
4462 ol.pushGeneratorState();
4464 }
4465 startIndexHierarchy(ol,0);
4466 for (const auto &mod : ModuleManager::instance().modules())
4467 {
4468 if (mod->isPrimaryInterface())
4469 {
4470 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4471 }
4472 }
4473 endIndexHierarchy(ol,0);
4474 if (ftv)
4475 {
4476 ol.popGeneratorState();
4477 }
4478}
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4411

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

3785{
3786 const auto &index = Index::instance();
3787 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3788 bool addToIndex = lne==nullptr || lne->visible();
3789 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3790 {
3791 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3792 Doxygen::indexList->incContentsDepth();
3793 }
3794 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3801 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3802 {
3803 Doxygen::indexList->decContentsDepth();
3804 }
3805}
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3656

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

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

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

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

4413{
4414 int visibleMembers = mod->countVisibleMembers();
4415 bool isDir=visibleMembers>0;
4416 if (addToIndex)
4417 {
4418 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4419 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4420 }
4421 if (ftv)
4422 {
4423 ftv->addContentsItem(false,mod->name(),
4424 mod->getReference(),mod->getOutputFileBase(),QCString(),
4425 false,false,mod);
4426 }
4427 ol.startIndexListItem();
4429 ol.parseText(mod->qualifiedName());
4431 if (mod->isReference())
4432 {
4433 ol.startTypewriter();
4434 ol.docify(" [external]");
4435 ol.endTypewriter();
4436 }
4437 if (addToIndex && isDir)
4438 {
4439 Doxygen::indexList->incContentsDepth();
4440 }
4441 if (isDir)
4442 {
4443 //ftv->incContentsDepth();
4444 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4445 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4446 writeModuleMembers(mod,addToIndex);
4447 //ftv->decContentsDepth();
4448 }
4449 if (addToIndex && isDir)
4450 {
4451 Doxygen::indexList->decContentsDepth();
4452 }
4453 ol.endIndexListItem();
4454}
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:1788

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

1997{
1998 if (Index::instance().numDocumentedNamespaces()==0) return;
1999 ol.pushGeneratorState();
2002 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceList);
2003 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces); // fall back
2004 QCString title = lne ? lne->title() : theTranslator->trNamespaceList();
2005 bool addToIndex = lne==nullptr || lne->visible();
2006 startFile(ol,"namespaces",QCString(),title,HighlightedItem::Namespaces);
2007 startTitle(ol,QCString());
2008 ol.parseText(title);
2009 endTitle(ol,QCString(),QCString());
2010 ol.startContents();
2011 ol.startTextBlock();
2012 ol.parseText(lne ? lne->intro() : theTranslator->trNamespaceListDescription(Config_getBool(EXTRACT_ALL)));
2013 ol.endTextBlock();
2014
2015 bool first=TRUE;
2016
2017 // ---------------
2018 // Linear namespace index for Latex/RTF
2019 // ---------------
2020 ol.pushGeneratorState();
2022
2023 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2024 {
2025 if (nd->isLinkableInProject())
2026 {
2027 if (first)
2028 {
2029 ol.startIndexList();
2030 first=FALSE;
2031 }
2032 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
2033 ol.startIndexKey();
2034 if (nd->getLanguage()==SrcLangExt::VHDL)
2035 {
2036 ol.writeObjectLink(QCString(), nd->getOutputFileBase().replace(0,qstrlen("namespace"),"class"),QCString(),nd->displayName());
2037 }
2038 else
2039 {
2040 ol.writeObjectLink(QCString(),nd->getOutputFileBase(),QCString(),nd->displayName());
2041 }
2042 ol.endIndexKey();
2043
2044 bool hasBrief = !nd->briefDescription().isEmpty();
2045 ol.startIndexValue(hasBrief);
2046 if (hasBrief)
2047 {
2048 //ol.docify(" (");
2049 ol.generateDoc(
2050 nd->briefFile(),nd->briefLine(),
2051 nd.get(),nullptr,
2052 nd->briefDescription(TRUE),
2053 FALSE, // index words
2054 FALSE, // isExample
2055 QCString(), // example name
2056 TRUE, // single line
2057 TRUE, // link from index
2058 Config_getBool(MARKDOWN_SUPPORT)
2059 );
2060 //ol.docify(")");
2061 }
2062 ol.endIndexValue(nd->getOutputFileBase(),hasBrief);
2063
2064 }
2065 }
2066 if (!first) ol.endIndexList();
2067
2068 ol.popGeneratorState();
2069
2070 // ---------------
2071 // Hierarchical namespace index for HTML
2072 // ---------------
2073 ol.pushGeneratorState();
2075
2076 {
2077 if (addToIndex)
2078 {
2079 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"namespaces",QCString(),TRUE,TRUE);
2080 Doxygen::indexList->incContentsDepth();
2081 }
2082 FTVHelp ftv(false);
2084 TextStream t;
2085 ftv.generateTreeViewInline(t);
2086 ol.writeString(t.str().c_str());
2087 if (addToIndex)
2088 {
2089 Doxygen::indexList->decContentsDepth();
2090 }
2091 }
2092
2093 ol.popGeneratorState();
2094 // ------
2095
2096 endFile(ol);
2097 ol.popGeneratorState();
2098}
static void writeNamespaceTree(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1879

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

2710{
2711 const NamespaceDef *nd=md->getNamespaceDef();
2712 if (nd && prevNamespaceName!=nd->displayName())
2713 {
2714 ol.writeString(separator);
2716 nd->displayName());
2717 prevNamespaceName = nd->displayName();
2718 }
2719}

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

3605{
3606 const auto &index = Index::instance();
3607 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3608 bool addToIndex = lne==nullptr || lne->visible();
3609 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3610 {
3611 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3612 Doxygen::indexList->incContentsDepth();
3613 }
3614 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3623 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3624 {
3625 Doxygen::indexList->decContentsDepth();
3626 }
3627
3628}
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3479

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

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

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

1763{
1764 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1765 {
1766 if (lde->kind()==LayoutDocEntry::MemberDef)
1767 {
1768 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1769 if (lmd)
1770 {
1771 MemberList *ml = nd->getMemberList(lmd->type);
1772 if (ml)
1773 {
1774 for (const auto &md : *ml)
1775 {
1776 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1777 if (md->visibleInIndex())
1778 {
1779 writeMemberToIndex(nd,md,addToIndex);
1780 }
1781 }
1782 }
1783 }
1784 }
1785 }
1786}
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 1891 of file index.cpp.

1893{
1894 for (const auto &nd : nsLinkedMap)
1895 {
1896 if (nd->isVisibleInHierarchy())
1897 {
1898 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1899 }
1900 }
1901}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1819

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1879 of file index.cpp.

1881{
1882 for (const auto &nd : nsLinkedMap)
1883 {
1884 if (nd->isVisibleInHierarchy())
1885 {
1886 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1887 }
1888 }
1889}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1819 of file index.cpp.

1821{
1822 if (!nd->isAnonymous() &&
1823 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
1824 {
1825
1826 bool hasNestedNamespace = namespaceHasNestedNamespace(nd);
1827 bool hasChildren = hasNestedNamespace ||
1830 bool isLinkable = nd->isLinkable();
1831 int visibleMembers = nd->countVisibleMembers();
1832
1833 //printf("namespace %s hasChildren=%d visibleMembers=%d\n",qPrint(nd->name()),hasChildren,visibleMembers);
1834
1835 QCString ref;
1836 QCString file;
1837 if (isLinkable)
1838 {
1839 ref = nd->getReference();
1840 file = nd->getOutputFileBase();
1841 if (nd->getLanguage()==SrcLangExt::VHDL) // UGLY HACK
1842 {
1843 file=file.replace(0,qstrlen("namespace"),"class");
1844 }
1845 }
1846
1847 bool isDir = hasChildren || visibleMembers>0;
1848 if (isLinkable || isDir)
1849 {
1850 ftv->addContentsItem(hasNestedNamespace,nd->localName(),ref,file,QCString(),FALSE,nd->partOfGroups().empty(),nd);
1851
1852 if (addToIndex)
1853 {
1854 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
1855 hasChildren && !file.isEmpty(),nd->partOfGroups().empty());
1856 }
1857 if (addToIndex && isDir)
1858 {
1859 Doxygen::indexList->incContentsDepth();
1860 }
1861
1862 if (isDir)
1863 {
1864 ftv->incContentsDepth();
1865 writeNamespaceTree(nd->getNamespaces(),ftv,FALSE,addToIndex);
1866 writeClassTree(nd->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
1867 writeConceptList(nd->getConcepts(),nullptr,addToIndex);
1868 writeNamespaceMembers(nd,addToIndex);
1869 ftv->decContentsDepth();
1870 }
1871 if (addToIndex && isDir)
1872 {
1873 Doxygen::indexList->decContentsDepth();
1874 }
1875 }
1876 }
1877}
virtual int countVisibleMembers() const =0
static void writeNamespaceMembers(const NamespaceDef *nd, bool addToIndex)
Definition index.cpp:1762
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 3963 of file index.cpp.

3964{
3965 if (Index::instance().numIndexedPages()==0) return;
3966 ol.pushGeneratorState();
3968 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3969 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3970 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3971 startTitle(ol,QCString());
3972 ol.parseText(title);
3973 endTitle(ol,QCString(),QCString());
3974 ol.startContents();
3975 ol.startTextBlock();
3976 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3977 ol.endTextBlock();
3978
3979 {
3980 FTVHelp ftv(false);
3981 for (const auto &pd : *Doxygen::pageLinkedMap)
3982 {
3983 if ((pd->getOuterScope()==nullptr ||
3984 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3985 pd->visibleInIndex()
3986 )
3987 {
3988 writePages(pd.get(),&ftv);
3989 }
3990 }
3991 TextStream t;
3992 ftv.generateTreeViewInline(t);
3993 ol.writeString(t.str().c_str());
3994 }
3995
3996// ol.popGeneratorState();
3997 // ------
3998
3999 endFile(ol);
4000 ol.popGeneratorState();
4001}

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

3904{
3905 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3906 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3907 bool addToIndex = lne==nullptr || lne->visible();
3908 if (!addToIndex) return;
3909
3910 bool hasSubPages = pd->hasSubPages();
3911 bool hasSections = pd->hasSections();
3912
3913 if (pd->visibleInIndex())
3914 {
3915 QCString pageTitle;
3916
3917 if (pd->title().isEmpty())
3918 pageTitle=pd->name();
3919 else
3920 pageTitle=filterTitle(pd->title());
3921
3922 if (ftv)
3923 {
3924 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3925 ftv->addContentsItem(
3926 hasSubPages,pageTitle,
3927 pd->getReference(),pd->getOutputFileBase(),
3928 QCString(),hasSubPages,TRUE,pd);
3929 }
3930 if (addToIndex && pd!=Doxygen::mainPage.get())
3931 {
3932 Doxygen::indexList->addContentsItem(
3933 hasSubPages || hasSections,pageTitle,
3934 pd->getReference(),pd->getOutputFileBase(),
3935 QCString(),hasSubPages,TRUE,pd);
3936 }
3937 }
3938 if (hasSubPages && ftv) ftv->incContentsDepth();
3939 bool doIndent = (hasSections || hasSubPages) &&
3940 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3941 if (doIndent)
3942 {
3943 Doxygen::indexList->incContentsDepth();
3944 }
3945 if (hasSections)
3946 {
3947 pd->addSectionsToIndex();
3948 }
3949 for (const auto &subPage : pd->getSubPages())
3950 {
3951 writePages(subPage,ftv);
3952 }
3953 if (hasSubPages && ftv) ftv->decContentsDepth();
3954 if (doIndent)
3955 {
3956 Doxygen::indexList->decContentsDepth();
3957 }
3958 //printf("end writePages()=%s\n",qPrint(pd->title()));
3959}
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:3892

References FTVHelp::addContentsItem(), PageDef::addSectionsToIndex(), FTVHelp::decContentsDepth(), filterTitle(), LayoutNavEntry::find(), Definition::getOutputFileBase(), Definition::getReference(), PageDef::getSubPages(), Definition::hasSections(), PageDef::hasSubPages(), FTVHelp::incContentsDepth(), Doxygen::indexList, LayoutDocManager::instance(), QCString::isEmpty(), Doxygen::mainPage, mainPageHasOwnTitle(), Definition::name(), 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 3049 of file index.cpp.

3052{
3053 bool first=TRUE;
3055 for (const auto &[letter,list] : map)
3056 {
3057 QCString ci(letter);
3058 QCString is = letterToLabel(ci);
3059 QCString anchor;
3061 if (!multiPage)
3062 anchor="#index_";
3063 else if (first)
3064 anchor=fullName+extension+"#index_";
3065 else
3066 anchor=fullName+"_"+is+extension+"#index_";
3067 startQuickIndexItem(ol,anchor+convertToId(is),letter==page,TRUE,first);
3068 ol.writeString(ci);
3070 first=FALSE;
3071 }
3073}

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

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

◆ writeSingleFileIndex()

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

Definition at line 1463 of file index.cpp.

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

References QCString::at(), Definition::briefDescription(), Definition::briefFile(), Definition::briefLine(), Config_getBool, OutputList::disableAllBut(), OutputList::docify(), OutputList::endIndexKey(), OutputList::endIndexValue(), OutputList::endTextLink(), FALSE, 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, TRUE, and OutputList::writeObjectLink().

Referenced by writeFileIndex().

◆ writeTopicIndex()

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4342 of file index.cpp.

4343{
4344 if (Index::instance().numDocumentedGroups()==0) return;
4345 ol.pushGeneratorState();
4346 // 1.{
4349 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4350 QCString title = lne ? lne->title() : theTranslator->trTopics();
4351 bool addToIndex = lne==nullptr || lne->visible();
4352
4353 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4354 startTitle(ol,QCString());
4355 ol.parseText(title);
4356 endTitle(ol,QCString(),QCString());
4357 ol.startContents();
4358 ol.startTextBlock();
4359 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4360 ol.endTextBlock();
4361
4362 // ---------------
4363 // Normal group index for Latex/RTF
4364 // ---------------
4365 // 2.{
4366 ol.pushGeneratorState();
4368 Doxygen::indexList->disable();
4369
4370 writeGroupHierarchy(ol,nullptr,FALSE);
4371
4372 Doxygen::indexList->enable();
4373 ol.popGeneratorState();
4374 // 2.}
4375
4376 // ---------------
4377 // interactive group index for HTML
4378 // ---------------
4379 // 2.{
4380 ol.pushGeneratorState();
4382
4383 {
4384 if (addToIndex)
4385 {
4386 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4387 Doxygen::indexList->incContentsDepth();
4388 }
4389 FTVHelp ftv(false);
4390 writeGroupHierarchy(ol,&ftv,addToIndex);
4391 TextStream t;
4392 ftv.generateTreeViewInline(t);
4394 ol.writeString(t.str().c_str());
4395 if (addToIndex)
4396 {
4397 Doxygen::indexList->decContentsDepth();
4398 }
4399 }
4400 ol.popGeneratorState();
4401 // 2.}
4402
4403 endFile(ol);
4404 ol.popGeneratorState();
4405 // 1.}
4406}
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4318

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

4763{
4764 if (lne->baseFile().startsWith("usergroup"))
4765 {
4766 ol.pushGeneratorState();
4769 startTitle(ol,QCString());
4770 ol.parseText(lne->title());
4771 endTitle(ol,QCString(),QCString());
4772 ol.startContents();
4773 int count=0;
4774 for (const auto &entry: lne->children())
4775 {
4776 if (entry->visible()) count++;
4777 }
4778 if (count>0)
4779 {
4780 ol.writeString("<ul>\n");
4781 for (const auto &entry: lne->children())
4782 {
4783 if (entry->visible())
4784 {
4785 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4786 fixSpaces(entry->title())+"</span></a></li>\n");
4787 }
4788 }
4789 ol.writeString("</ul>\n");
4790 }
4791 endFile(ol);
4792 ol.popGeneratorState();
4793 }
4794}
bool startsWith(const char *s) const
Definition qcstring.h:492
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 5181 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex