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)
 
void endFile (OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
 
void endFileWithNavPath (OutputList &ol, const Definition *d)
 
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 2247 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 523 of file index.cpp.

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

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

Definition at line 2097 of file index.cpp.

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

References Doxygen::classLinkedMap, and Config_getBool.

Referenced by Index::countDataStructures().

◆ countClassesInTreeList()

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

Definition at line 1085 of file index.cpp.

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

References classHasVisibleRoot(), and Config_getBool.

Referenced by countClassHierarchy().

◆ countClassHierarchy()

static int countClassHierarchy ( ClassDef::CompoundType ct)
static

Definition at line 1109 of file index.cpp.

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

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

Referenced by Index::countDataStructures().

◆ countConcepts()

static int countConcepts ( )
static

Definition at line 1677 of file index.cpp.

1678{
1679 int count=0;
1680 for (const auto &cd : *Doxygen::conceptLinkedMap)
1681 {
1682 if (cd->isLinkableInProject()) count++;
1683 }
1684 return count;
1685}
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98

References Doxygen::conceptLinkedMap.

Referenced by Index::countDataStructures().

◆ countDirs()

static int countDirs ( )
static

Definition at line 3984 of file index.cpp.

3985{
3986 int count=0;
3987 for (const auto &dd : *Doxygen::dirLinkedMap)
3988 {
3989 if (dd->isLinkableInProject())
3990 {
3991 count++;
3992 }
3993 }
3994 return count;
3995}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129

References Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 1436 of file index.cpp.

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

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

static int countGroups ( )
static

Definition at line 3968 of file index.cpp.

3969{
3970 int count=0;
3971 for (const auto &gd : *Doxygen::groupLinkedMap)
3972 {
3973 if (!gd->isReference())
3974 {
3975 //gd->visited=FALSE;
3976 count++;
3977 }
3978 }
3979 return count;
3980}
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

static int countNamespaces ( )
static

Definition at line 1666 of file index.cpp.

1667{
1668 int count=0;
1669 for (const auto &nd : *Doxygen::namespaceLinkedMap)
1670 {
1671 if (nd->isLinkableInProject()) count++;
1672 }
1673 return count;
1674}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115

References Doxygen::namespaceLinkedMap.

Referenced by Index::countDataStructures().

◆ countRelatedPages()

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

Definition at line 3837 of file index.cpp.

3838{
3839 docPages=indexPages=0;
3840 for (const auto &pd : *Doxygen::pageLinkedMap)
3841 {
3842 if (pd->visibleInIndex() && !pd->hasParentPage())
3843 {
3844 indexPages++;
3845 }
3846 if (pd->documentedPage())
3847 {
3848 docPages++;
3849 }
3850 }
3851}
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

static bool dirHasVisibleChildren ( const DirDef * dd)
static

Definition at line 723 of file index.cpp.

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

428{
429 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
432 if (!skipNavIndex)
433 {
434 if (!skipEndContents) ol.endContents();
435 if (generateTreeView)
436 {
437 ol.writeString("</div><!-- doc-content -->\n");
438 }
439 }
440
441 ol.writeFooter(navPath); // write the footer
443 ol.endFile();
444}
void writeString(const QCString &text)
Definition outputlist.h:412
void endContents()
Definition outputlist.h:619
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 Definition * d )

Definition at line 446 of file index.cpp.

447{
448 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
449 QCString navPath;
450 if (generateTreeView)
451 {
454 ol.writeString("</div><!-- doc-content -->\n");
456 navPath = d->navigationPathAsString();
457 }
458 endFile(ol,generateTreeView,TRUE,navPath);
459}
virtual QCString navigationPathAsString() const =0
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition index.cpp:426

References Config_getBool, OutputList::disableAllBut(), endFile(), Html, Definition::navigationPathAsString(), OutputList::popGeneratorState(), OutputList::pushGeneratorState(), TRUE, 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()

static void endQuickIndexItem ( OutputList & ol)
static

◆ endQuickIndexList()

static void endQuickIndexList ( OutputList & ol)
static

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 1690 of file index.cpp.

1690{ return p.get(); }

◆ get_pointer() [2/3]

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

Definition at line 1691 of file index.cpp.

1691{ return p; }

◆ get_pointer() [3/3]

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

Referenced by writeClassTree().

◆ getCmhlInfo()

static const CmhlInfo * getCmhlInfo ( size_t hl)
static

Definition at line 3080 of file index.cpp.

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

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeClassMemberIndexFiltered().

◆ getFmhlInfo()

static const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3260 of file index.cpp.

3261{
3262 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3263 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3264 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3265 static FmhlInfo fmhlInfo[] =
3266 {
3267 FmhlInfo("globals", theTranslator->trAll()),
3268 FmhlInfo("globals_func",
3269 fortranOpt ? theTranslator->trSubprograms() :
3270 vhdlOpt ? theTranslator->trFunctionAndProc() :
3271 theTranslator->trFunctions()),
3272 FmhlInfo("globals_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3273 FmhlInfo("globals_type",theTranslator->trTypedefs()),
3274 FmhlInfo("globals_sequ",theTranslator->trSequences()),
3275 FmhlInfo("globals_dict",theTranslator->trDictionaries()),
3276 FmhlInfo("globals_enum",theTranslator->trEnumerations()),
3277 FmhlInfo("globals_eval",theTranslator->trEnumerationValues()),
3278 FmhlInfo("globals_defs",theTranslator->trDefines())
3279 };
3280 return &fmhlInfo[hl];
3281}
Helper class representing a file member in the navigation menu.
Definition index.cpp:3254

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

static const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3611 of file index.cpp.

3612{
3613 static MmhlInfo nmhlInfo[] =
3614 {
3615 MmhlInfo("modulemembers", theTranslator->trAll()),
3616 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3617 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3618 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3619 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3620 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3621 };
3622 return &nmhlInfo[hl];
3623}
Helper class representing a module member in the navigation menu.
Definition index.cpp:3605

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

static const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3434 of file index.cpp.

3435{
3436 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3437 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
3438 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
3439 static NmhlInfo nmhlInfo[] =
3440 {
3441 NmhlInfo("namespacemembers", theTranslator->trAll()),
3442 NmhlInfo("namespacemembers_func",
3443 fortranOpt ? theTranslator->trSubprograms() :
3444 vhdlOpt ? theTranslator->trFunctionAndProc() :
3445 theTranslator->trFunctions()),
3446 NmhlInfo("namespacemembers_vars",sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables()),
3447 NmhlInfo("namespacemembers_type",theTranslator->trTypedefs()),
3448 NmhlInfo("namespacemembers_sequ",theTranslator->trSequences()),
3449 NmhlInfo("namespacemembers_dict",theTranslator->trDictionaries()),
3450 NmhlInfo("namespacemembers_enum",theTranslator->trEnumerations()),
3451 NmhlInfo("namespacemembers_eval",theTranslator->trEnumerationValues())
3452 };
3453 return &nmhlInfo[hl];
3454}
Helper class representing a namespace member in the navigation menu.
Definition index.cpp:3428

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeNamespaceMemberIndexFiltered().

◆ isId1()

bool isId1 ( int c)
inline

Definition at line 2196 of file index.cpp.

2197{
2198 return (c<127 && c>31); // printable ASCII character
2199}

Referenced by letterToLabel().

◆ letterToLabel()

static QCString letterToLabel ( const QCString & startLetter)
static

Definition at line 2201 of file index.cpp.

2202{
2203 if (startLetter.isEmpty()) return startLetter;
2204 const char *p = startLetter.data();
2205 char c = *p;
2206 QCString result;
2207 if (isId1(c))
2208 {
2209 result+=c;
2210 }
2211 else
2212 {
2213 result="0x";
2214 const char hex[]="0123456789abcdef";
2215 while ((c=*p++))
2216 {
2217 result+=hex[static_cast<unsigned char>(c)>>4];
2218 result+=hex[static_cast<unsigned char>(c)&0xf];
2219 }
2220 }
2221 return result;
2222}
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:2196

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

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

◆ mainPageHasOwnTitle()

static bool mainPageHasOwnTitle ( )
static

Definition at line 3855 of file index.cpp.

3856{
3857 QCString projectName = Config_getString(PROJECT_NAME);
3858 QCString title;
3860 {
3861 title = filterTitle(Doxygen::mainPage->title());
3862 }
3863 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3864}
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:6771
QCString filterTitle(const QCString &title)
Definition util.cpp:6077

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

Referenced by writePages().

◆ MemberIndexMap_add()

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

static bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5449 of file index.cpp.

5450{
5451 const auto &index = Index::instance();
5452 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5453 bool showFiles = Config_getBool(SHOW_FILES);
5454 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5455 switch (kind)
5456 {
5457 case LayoutNavEntry::MainPage: return TRUE;
5458 case LayoutNavEntry::User: return TRUE;
5459 case LayoutNavEntry::UserGroup: return TRUE;
5460 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5461 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5462 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5463 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5464 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5465 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5466 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5467 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5468 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5469 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5470 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5471 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5472 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5473 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5474 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5475 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5476 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5477 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5478 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5479 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5480 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5481 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5482 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5483 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5484 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5485 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5486 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5487 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5488 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5489 case LayoutNavEntry::None: // should never happen, means not properly initialized
5490 assert(kind != LayoutNavEntry::None);
5491 return FALSE;
5492 }
5493 return FALSE;
5494}
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 5497 of file index.cpp.

5502{
5503 // index items per category member lists
5504 bool firstMember=TRUE;
5505 for (std::size_t i=0;i<total;i++)
5506 {
5507 if (numDocumented(i)>0)
5508 {
5509 t << ",";
5510 if (firstMember)
5511 {
5512 t << "children:[";
5513 firstMember=FALSE;
5514 }
5515 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5516 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5517
5518 // Check if we have many members, then add sub entries per letter...
5519 // quick alphabetical index
5520 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5521 if (quickIndex)
5522 {
5523 bool multiPageIndex=FALSE;
5524 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5525 {
5526 multiPageIndex=TRUE;
5527 }
5528 t << ",children:[\n";
5529 bool firstLetter=TRUE;
5530 for (const auto &[letter,list] : getMemberList(i))
5531 {
5532 if (!firstLetter) t << ",\n";
5533 QCString ci(letter);
5534 QCString is(letterToLabel(ci));
5535 QCString anchor;
5537 QCString fullName = getInfo(i)->fname;
5538 if (!multiPageIndex || firstLetter)
5539 anchor=fullName+extension+"#index_";
5540 else // other pages of multi page index
5541 anchor=fullName+"_"+is+extension+"#index_";
5542 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5543 << convertToJSString(anchor+convertToId(is)) << "\"}";
5544 firstLetter=FALSE;
5545 }
5546 t << "]";
5547 }
5548 t << "}";
5549 }
5550 }
5551 if (!firstMember)
5552 {
5553 t << "]";
5554 }
5555}
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:2201
QCString convertToJSString(const QCString &s)
Definition util.cpp:4523
QCString convertToId(const QCString &s)
Definition util.cpp:4372

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

Referenced by renderQuickLinksAsJs().

◆ renderQuickLinksAsJs()

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

Definition at line 5557 of file index.cpp.

5558{
5559 int count=0;
5560 for (const auto &entry : root->children())
5561 {
5562 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5563 }
5564 if (count>0) // at least one item is visible
5565 {
5566 bool firstChild = TRUE;
5567 if (!first) t << ",";
5568 t << "children:[\n";
5569 for (const auto &entry : root->children())
5570 {
5571 if (entry->visible() && quickLinkVisible(entry->kind()))
5572 {
5573 if (!firstChild) t << ",\n";
5574 firstChild=FALSE;
5575 QCString url = entry->url();
5576 if (isURL(url)) url = "^" + url;
5577 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5578 << convertToJSString(url) << "\"";
5579 bool hasChildren=FALSE;
5580 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5581 {
5582 auto numDoc = [](std::size_t i) {
5584 };
5585 auto memList = [](std::size_t i) {
5587 };
5588 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5589 }
5590 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5591 {
5592 auto numDoc = [](std::size_t i) {
5594 };
5595 auto memList = [](std::size_t i) {
5597 };
5598 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5599 }
5600 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5601 {
5602 auto numDoc = [](std::size_t i) {
5604 };
5605 auto memList = [](std::size_t i) {
5607 };
5608 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5609 }
5610 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5611 {
5612 auto numDoc = [](std::size_t i) {
5614 };
5615 auto memList = [](std::size_t i) {
5617 };
5618 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5619 }
5620 else // recursive into child list
5621 {
5622 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5623 }
5624 if (hasChildren) t << "]";
5625 t << "}";
5626 }
5627 }
5628 }
5629 return count>0;
5630}
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:2708
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5557
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:5497
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3260
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3611
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3434
static const CmhlInfo * getCmhlInfo(size_t hl)
Definition index.cpp:3080
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:6402

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 )

Definition at line 400 of file index.cpp.

403{
404 bool disableIndex = Config_getBool(DISABLE_INDEX);
405 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
406 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
407 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
408 ol.startFile(name,manName,title,hierarchyLevel);
410 if (!disableIndex && !quickLinksAfterSplitbar)
411 {
412 ol.writeQuickLinks(hli,name);
413 }
414 if (!additionalIndices)
415 {
416 ol.endQuickIndices();
417 }
418 ol.writeSplitBar(!altSidebarName.isEmpty() ? altSidebarName : name);
419 if (quickLinksAfterSplitbar)
420 {
421 ol.writeQuickLinks(hli,name);
422 }
423 ol.writeSearchInfo();
424}
void writeSearchInfo()
Definition outputlist.h:398
void writeSplitBar(const QCString &name)
Definition outputlist.h:607
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 writeQuickLinks(HighlightedItem hli, const QCString &file)
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()

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

static 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{
387 if (def) def->writeSummaryLinks(ol);
388 ol.startTitleHead(fileName);
391}
virtual void writeSummaryLinks(OutputList &) const =0
void startTitleHead(const QCString &fileName)
Definition outputlist.h:404
void startHeaderSection()
Definition outputlist.h:466

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

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

Definition at line 2250 of file index.cpp.

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

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(), VHDL, OutputList::writeObjectLink(), and OutputList::writeString().

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

◆ writeAlphabeticalExceptionIndex()

static void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 2493 of file index.cpp.

2494{
2495 if (Index::instance().numAnnotatedExceptions()==0) return;
2496 ol.pushGeneratorState();
2498 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ExceptionIndex);
2499 QCString title = lne ? lne->title() : theTranslator->trExceptionIndex();
2500 bool addToIndex = lne==nullptr || lne->visible();
2501
2502 startFile(ol,"exceptions",QCString(),title,HighlightedItem::Exceptions);
2503
2504 startTitle(ol,QCString());
2505 ol.parseText(title);
2506 endTitle(ol,QCString(),QCString());
2507
2508 if (addToIndex)
2509 {
2510 Doxygen::indexList->addContentsItem(FALSE,title,QCString(),"exceptions",QCString(),FALSE,TRUE);
2511 }
2512
2513 ol.startContents();
2514 writeAlphabeticalClassList(ol, ClassDef::Exception, Index::instance().numAnnotatedExceptions());
2515 endFile(ol); // contains ol.endContents()
2516
2517 ol.popGeneratorState();
2518}
@ 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:617
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:393
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli, bool additionalIndices, const QCString &altSidebarName, int hierarchyLevel)
Definition index.cpp:400
static void writeAlphabeticalClassList(OutputList &ol, ClassDef::CompoundType ct, int)
Definition index.cpp:2250
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()

static void writeAlphabeticalIndex ( OutputList & ol)
static

Definition at line 2406 of file index.cpp.

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

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

static void writeAlphabeticalInterfaceIndex ( OutputList & ol)
static

Definition at line 2435 of file index.cpp.

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

static void writeAlphabeticalStructIndex ( OutputList & ol)
static

Definition at line 2464 of file index.cpp.

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

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

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

Definition at line 2122 of file index.cpp.

2123{
2124 //LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
2125 //bool addToIndex = lne==nullptr || lne->visible();
2126 bool first=TRUE;
2127
2128 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
2129
2130 for (const auto &cd : *Doxygen::classLinkedMap)
2131 {
2132 if (cd->getLanguage()==SrcLangExt::VHDL &&
2133 (VhdlDocGen::convert(cd->protection())==VhdlDocGen::PACKAGECLASS ||
2135 ) // no architecture
2136 {
2137 continue;
2138 }
2139 if (first)
2140 {
2141 ol.startIndexList();
2142 first=FALSE;
2143 }
2144
2145 if (sliceOpt && cd->compoundType() != ct)
2146 {
2147 continue;
2148 }
2149
2150 ol.pushGeneratorState();
2151 if (cd->isEmbeddedInOuterScope())
2152 {
2156 }
2157 if (cd->isLinkableInProject() && !cd->isImplicitTemplateInstance())
2158 {
2159 ol.startIndexKey();
2160 if (cd->getLanguage()==SrcLangExt::VHDL)
2161 {
2163 ol.docify(prot);
2164 ol.writeString(" ");
2165 }
2166 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
2167 ol.endIndexKey();
2168 bool hasBrief = !cd->briefDescription().isEmpty();
2169 ol.startIndexValue(hasBrief);
2170 if (hasBrief)
2171 {
2172 ol.generateDoc(
2173 cd->briefFile(),cd->briefLine(),
2174 cd.get(),nullptr,
2175 cd->briefDescription(TRUE),
2176 FALSE, // indexWords
2177 FALSE, // isExample
2178 QCString(), // example name
2179 TRUE, // single line
2180 TRUE, // link from index
2181 Config_getBool(MARKDOWN_SUPPORT)
2182 );
2183 }
2184 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
2185
2186 //if (addToIndex)
2187 //{
2188 // addMembersToIndex(cd,LayoutDocManager::Class,cd->displayName(),cd->anchor());
2189 //}
2190 }
2191 ol.popGeneratorState();
2192 }
2193 if (!first) ol.endIndexList();
2194}
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, VHDL, OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeAnnotatedIndexGeneric().

◆ writeAnnotatedExceptionIndex()

static void writeAnnotatedExceptionIndex ( OutputList & ol)
static

Definition at line 2664 of file index.cpp.

2665{
2666 const auto &index = Index::instance();
2668 AnnotatedIndexContext(index.numAnnotatedExceptions(),index.numAnnotatedExceptionsPrinted(),
2669 LayoutNavEntry::ExceptionList,LayoutNavEntry::Exceptions,
2670 theTranslator->trExceptionList(),theTranslator->trExceptionListDescription(),
2672 "annotatedexceptions",
2674}
static void writeAnnotatedIndexGeneric(OutputList &ol, const AnnotatedIndexContext ctx)
Definition index.cpp:2547
@ AnnotatedExceptions
Definition index.h:76

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndex()

static void writeAnnotatedIndex ( OutputList & ol)
static

Definition at line 2622 of file index.cpp.

2623{
2624 const auto &index = Index::instance();
2626 AnnotatedIndexContext(index.numAnnotatedClasses(),index.numAnnotatedClassesPrinted(),
2627 LayoutNavEntry::ClassList,LayoutNavEntry::Classes,
2628 theTranslator->trCompoundList(),theTranslator->trCompoundListDescription(),
2630 "annotated",
2632}
@ AnnotatedClasses
Definition index.h:73

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedIndexGeneric()

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

Definition at line 2547 of file index.cpp.

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

static void writeAnnotatedInterfaceIndex ( OutputList & ol)
static

Definition at line 2636 of file index.cpp.

2637{
2638 const auto &index = Index::instance();
2640 AnnotatedIndexContext(index.numAnnotatedInterfaces(),index.numAnnotatedInterfacesPrinted(),
2641 LayoutNavEntry::InterfaceList,LayoutNavEntry::Interfaces,
2642 theTranslator->trInterfaceList(),theTranslator->trInterfaceListDescription(),
2644 "annotatedinterfaces",
2646}
@ AnnotatedInterfaces
Definition index.h:74

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

Referenced by writeIndexHierarchyEntries().

◆ writeAnnotatedStructIndex()

static void writeAnnotatedStructIndex ( OutputList & ol)
static

Definition at line 2650 of file index.cpp.

2651{
2652 const auto &index = Index::instance();
2654 AnnotatedIndexContext(index.numAnnotatedStructs(),index.numAnnotatedStructsPrinted(),
2655 LayoutNavEntry::StructList,LayoutNavEntry::Structs,
2656 theTranslator->trStructList(),theTranslator->trStructListDescription(),
2658 "annotatedstructs",
2660}
@ AnnotatedStructs
Definition index.h:75

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

Referenced by writeIndexHierarchyEntries().

◆ writeClassHierarchy()

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

Definition at line 1058 of file index.cpp.

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

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

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

Definition at line 2677 of file index.cpp.

2679{
2680 const ClassDef *cd=md->getClassDef();
2681 if ( cd && prevClassName!=cd->displayName())
2682 {
2683 ol.writeString(separator);
2685 cd->displayName());
2686 prevClassName = cd->displayName();
2687 }
2688}
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()

static void writeClassMemberIndex ( OutputList & ol)
static

Definition at line 3223 of file index.cpp.

3224{
3225 const auto &index = Index::instance();
3226 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3227 bool addToIndex = lne==nullptr || lne->visible();
3228
3229 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3230 {
3231 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3232 Doxygen::indexList->incContentsDepth();
3233 }
3243 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3244 {
3245 Doxygen::indexList->decContentsDepth();
3246 }
3247
3248}
static void writeClassMemberIndexFiltered(OutputList &ol, ClassMemberHighlight::Enum hl)
Definition index.cpp:3102

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

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

Definition at line 3102 of file index.cpp.

3103{
3104 const auto &index = Index::instance();
3105 if (index.numDocumentedClassMembers(hl)==0) return;
3106
3107 bool disableIndex = Config_getBool(DISABLE_INDEX);
3108 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3109 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3110 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3111
3112 bool multiPageIndex=FALSE;
3113 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3114 {
3115 multiPageIndex=TRUE;
3116 }
3117
3118 ol.pushGeneratorState();
3120
3122 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3123 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3124 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3125 bool addToIndex = lne==nullptr || lne->visible();
3126
3127 if (addToIndex)
3128 {
3129 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3130 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3131 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3132 }
3133
3134 bool first=TRUE;
3135 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3136 {
3137 QCString fileName = getCmhlInfo(hl)->fname;
3138 if (multiPageIndex)
3139 {
3140 QCString cs(letter);
3141 if (!first)
3142 {
3143 fileName+="_"+letterToLabel(cs);
3144 }
3145 if (addToIndex)
3146 {
3147 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3148 }
3149 }
3150
3151 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3152
3153 auto writeQuickLinks = [&,cap_letter=letter]()
3154 {
3156 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3157 {
3159
3160 // index item for global member list
3163 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3165
3166 // index items per category member lists
3167 for (int i=1;i<ClassMemberHighlight::Total;i++)
3168 {
3169 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3170 {
3172 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3173 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3174 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3176 }
3177 }
3178
3180
3181 // quick alphabetical index
3182 if (quickIndex)
3183 {
3184 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3185 getCmhlInfo(hl)->fname,multiPageIndex);
3186 }
3187 }
3188 };
3189
3190 ol.startFile(fileName+extension,QCString(),title);
3191 ol.startQuickIndices();
3192 if (!disableIndex && !quickLinksAfterSplitbar)
3193 {
3194 writeQuickLinks();
3195 }
3196 ol.endQuickIndices();
3197 ol.writeSplitBar(fileName);
3198 if (quickLinksAfterSplitbar)
3199 {
3200 writeQuickLinks();
3201 }
3202 ol.writeSearchInfo();
3203
3204 ol.startContents();
3205
3206 ol.startTextBlock();
3207 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3208 ol.endTextBlock();
3209
3210 writeMemberList(ol,quickIndex,
3211 multiPageIndex ? letter : std::string(),
3212 index.isClassIndexLetterUsed(hl),
3214 endFile(ol);
3215 first=FALSE;
3216 }
3217
3218 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3219
3220 ol.popGeneratorState();
3221}
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:3044
static void writeMemberList(OutputList &ol, bool useSections, const std::string &page, const Index::MemberIndexMap &memberIndexMap, Definition::DefType type)
Definition index.cpp:2731
static void startQuickIndexList(OutputList &ol, bool letterTabs=FALSE)
Definition index.cpp:345
QCString title
Definition index.cpp:3077
const char * fname
Definition index.cpp:3076
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>
static void writeClassTree ( const ListType & cl,
FTVHelp * ftv,
bool addToIndex,
bool globalOnly,
ClassDef::CompoundType ct )
static

Definition at line 1694 of file index.cpp.

1695{
1696 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
1697 for (const auto &cdi : cl)
1698 {
1699 const ClassDef *cd = get_pointer(cdi);
1700 if (cd->getLanguage()==SrcLangExt::VHDL)
1701 {
1704 )// no architecture
1705 {
1706 continue;
1707 }
1708 }
1709
1710 if (sliceOpt && cd->compoundType() != ct)
1711 {
1712 continue;
1713 }
1714
1715 if (!globalOnly ||
1716 cd->getOuterScope()==nullptr ||
1718 )
1719 {
1720 int count=0;
1721 for (const auto &ccd : cd->getClasses())
1722 {
1723 if (ccd->isLinkableInProject() && !ccd->isImplicitTemplateInstance())
1724 {
1725 count++;
1726 }
1727 }
1729 {
1730 if (ftv)
1731 {
1732 ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
1733 cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1734 }
1735 if (addToIndex &&
1736 (cd->getOuterScope()==nullptr ||
1738 )
1739 )
1740 {
1741 addMembersToIndex(cd,LayoutDocManager::Class,
1742 cd->displayName(FALSE),
1743 cd->anchor(),
1744 cd->partOfGroups().empty() && !cd->isSimple());
1745 }
1746 if (count>0)
1747 {
1748 if (ftv) ftv->incContentsDepth();
1749 writeClassTree(cd->getClasses(),ftv,addToIndex,FALSE,ct);
1750 if (ftv) ftv->decContentsDepth();
1751 }
1752 }
1753 }
1754 }
1755}
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, VHDL, and writeClassTree().

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

◆ writeClassTreeForList()

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

Definition at line 959 of file index.cpp.

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

Referenced by writeClassHierarchy().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 1982 of file index.cpp.

1984{
1985 for (const auto &nd : nsLinkedMap)
1986 {
1987 writeClassTreeInsideNamespaceElement(nd.get(),ftv,rootOnly,addToIndex,ct);
1988 }
1989}
static void writeClassTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex, ClassDef::CompoundType ct)
Definition index.cpp:1901

References writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespace() [2/2]

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

Definition at line 1973 of file index.cpp.

1975{
1976 for (const auto &nd : nsLinkedMap)
1977 {
1978 writeClassTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex,ct);
1979 }
1980}

References writeClassTreeInsideNamespaceElement().

Referenced by writeAnnotatedIndexGeneric(), and writeClassTreeInsideNamespaceElement().

◆ writeClassTreeInsideNamespaceElement()

static void writeClassTreeInsideNamespaceElement ( const NamespaceDef * nd,
FTVHelp * ftv,
bool rootOnly,
bool addToIndex,
ClassDef::CompoundType ct )
static

Definition at line 1901 of file index.cpp.

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

Referenced by writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespace().

◆ writeClassTreeToOutput()

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

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

Referenced by writeClassTreeForList(), and writeClassTreeToOutput().

◆ writeConceptIndex()

static void writeConceptIndex ( OutputList & ol)
static

Definition at line 4619 of file index.cpp.

4620{
4621 if (Index::instance().numDocumentedConcepts()==0) return;
4622 ol.pushGeneratorState();
4623 // 1.{
4626 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Concepts);
4627 QCString title = lne ? lne->title() : theTranslator->trConceptList();
4628 bool addToIndex = lne==nullptr || lne->visible();
4629
4630 startFile(ol,"concepts",QCString(),title,HighlightedItem::Concepts);
4631 startTitle(ol,QCString());
4632 ol.parseText(title);
4633 endTitle(ol,QCString(),QCString());
4634 ol.startContents();
4635 ol.startTextBlock();
4636 ol.parseText(lne ? lne->intro() : theTranslator->trConceptListDescription(Config_getBool(EXTRACT_ALL)));
4637 ol.endTextBlock();
4638
4639 // ---------------
4640 // Normal group index for Latex/RTF
4641 // ---------------
4642 // 2.{
4643 ol.pushGeneratorState();
4645
4646 bool first=TRUE;
4647 for (const auto &cd : *Doxygen::conceptLinkedMap)
4648 {
4649 if (cd->isLinkableInProject())
4650 {
4651 if (first)
4652 {
4653 ol.startIndexList();
4654 first=FALSE;
4655 }
4656 //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
4657 ol.startIndexKey();
4658 ol.writeObjectLink(QCString(),cd->getOutputFileBase(),QCString(),cd->displayName());
4659 ol.endIndexKey();
4660
4661 bool hasBrief = !cd->briefDescription().isEmpty();
4662 ol.startIndexValue(hasBrief);
4663 if (hasBrief)
4664 {
4665 //ol.docify(" (");
4666 ol.generateDoc(
4667 cd->briefFile(),cd->briefLine(),
4668 cd.get(),nullptr,
4669 cd->briefDescription(TRUE),
4670 FALSE, // index words
4671 FALSE, // isExample
4672 QCString(), // example name
4673 TRUE, // single line
4674 TRUE, // link from index
4675 Config_getBool(MARKDOWN_SUPPORT)
4676 );
4677 //ol.docify(")");
4678 }
4679 ol.endIndexValue(cd->getOutputFileBase(),hasBrief);
4680
4681 }
4682 }
4683 if (!first) ol.endIndexList();
4684
4685 ol.popGeneratorState();
4686 // 2.}
4687
4688 // ---------------
4689 // interactive group index for HTML
4690 // ---------------
4691 // 2.{
4692 ol.pushGeneratorState();
4694
4695 {
4696 if (addToIndex)
4697 {
4698 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"concepts",QCString(),TRUE,TRUE);
4699 Doxygen::indexList->incContentsDepth();
4700 }
4701 FTVHelp ftv(false);
4702 for (const auto &nd : *Doxygen::namespaceLinkedMap)
4703 {
4704 writeConceptTreeInsideNamespaceElement(nd.get(),&ftv,true,addToIndex);
4705 }
4706 writeConceptRootList(&ftv,addToIndex);
4707 TextStream t;
4708 ftv.generateTreeViewInline(t);
4709 ol.writeString(t.str().c_str());
4710 if (addToIndex)
4711 {
4712 Doxygen::indexList->decContentsDepth();
4713 }
4714 }
4715 ol.popGeneratorState();
4716 // 2.}
4717
4718 endFile(ol);
4719 ol.popGeneratorState();
4720 // 1.}
4721}
static void writeConceptRootList(FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4597
static void writeConceptTreeInsideNamespaceElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4546

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

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

Definition at line 4513 of file index.cpp.

4514{
4515 for (const auto &cd : concepts)
4516 {
4517 if (cd->isLinkableInProject())
4518 {
4519 if (ftv)
4520 {
4521 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4522 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4523 }
4524 if (addToIndex)
4525 {
4526 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4527 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4528 }
4529 }
4530 }
4531}

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

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

◆ writeConceptRootList()

static void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4597 of file index.cpp.

4598{
4599 for (const auto &cd : *Doxygen::conceptLinkedMap)
4600 {
4601 if ((cd->getOuterScope()==nullptr ||
4602 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4603 )
4604 {
4605 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4606 ftv->addContentsItem(
4607 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4608 QCString(),false,cd->partOfGroups().empty(),cd.get());
4609 if (addToIndex)
4610 {
4611 Doxygen::indexList->addContentsItem(
4612 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4613 QCString(),false,cd->partOfGroups().empty(),cd.get());
4614 }
4615 }
4616 }
4617}

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

Referenced by writeConceptIndex().

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4536 of file index.cpp.

4538{
4539 for (const auto &nd : nsLinkedMap)
4540 {
4541 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4542 }
4543}

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4546 of file index.cpp.

4548{
4549 if (!nd->isAnonymous() &&
4550 (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
4551 {
4552 bool isDir = namespaceHasNestedConcept(nd);
4553 bool isLinkable = nd->isLinkableInProject();
4554
4555 //printf("writeConceptTreeInsideNamespaceElement namespace %s isLinkable=%d isDir=%d\n",qPrint(nd->name()),isLinkable,isDir);
4556
4557 QCString ref;
4558 QCString file;
4559 if (isLinkable)
4560 {
4561 ref = nd->getReference();
4562 file = nd->getOutputFileBase();
4563 }
4564
4565 if (isDir)
4566 {
4567 ftv->addContentsItem(isDir,nd->localName(),ref,file,QCString(),FALSE,TRUE,nd);
4568
4569 if (addToIndex)
4570 {
4571 // the namespace entry is already shown under the namespace list so don't
4572 // add it to the nav index and don't create a separate index file for it otherwise
4573 // it will overwrite the one written for the namespace list.
4574 Doxygen::indexList->addContentsItem(isDir,nd->localName(),ref,file,QCString(),
4575 false, // separateIndex
4576 false // addToNavIndex
4577 );
4578 }
4579 if (addToIndex)
4580 {
4581 Doxygen::indexList->incContentsDepth();
4582 }
4583
4584 ftv->incContentsDepth();
4586 writeConceptList(nd->getConcepts(),ftv,addToIndex);
4587 ftv->decContentsDepth();
4588
4589 if (addToIndex)
4590 {
4591 Doxygen::indexList->decContentsDepth();
4592 }
4593 }
4594 }
4595}
virtual ConceptLinkedRefMap getConcepts() const =0
static void writeConceptTreeInsideNamespace(const NamespaceLinkedRefMap &nsLinkedMap, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:4536
static void writeConceptList(const ConceptLinkedRefMap &concepts, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4513
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()

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

Definition at line 895 of file index.cpp.

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

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

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

Definition at line 751 of file index.cpp.

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

static void writeExampleIndex ( OutputList & ol)
static

Definition at line 3772 of file index.cpp.

3773{
3774 if (Doxygen::exampleLinkedMap->empty()) return;
3775 ol.pushGeneratorState();
3778 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Examples);
3779 QCString title = lne ? lne->title() : theTranslator->trExamples();
3780 bool addToIndex = lne==nullptr || lne->visible();
3781
3782 startFile(ol,"examples",QCString(),title,HighlightedItem::Examples);
3783
3784 startTitle(ol,QCString());
3785 ol.parseText(title);
3786 endTitle(ol,QCString(),QCString());
3787
3788 ol.startContents();
3789
3790 if (addToIndex)
3791 {
3792 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"examples",QCString(),TRUE,TRUE);
3793 Doxygen::indexList->incContentsDepth();
3794 }
3795
3796 ol.startTextBlock();
3797 ol.parseText(lne ? lne->intro() : theTranslator->trExamplesDescription());
3798 ol.endTextBlock();
3799
3800 ol.startItemList();
3801 for (const auto &pd : *Doxygen::exampleLinkedMap)
3802 {
3803 ol.startItemListItem();
3804 QCString n=pd->getOutputFileBase();
3805 if (!pd->title().isEmpty())
3806 {
3807 ol.writeObjectLink(QCString(),n,QCString(),pd->title());
3808 if (addToIndex)
3809 {
3810 Doxygen::indexList->addContentsItem(FALSE,filterTitle(pd->title()),pd->getReference(),n,QCString(),FALSE,TRUE);
3811 }
3812 }
3813 else
3814 {
3815 ol.writeObjectLink(QCString(),n,QCString(),pd->name());
3816 if (addToIndex)
3817 {
3818 Doxygen::indexList->addContentsItem(FALSE,pd->name(),pd->getReference(),n,QCString(),FALSE,TRUE);
3819 }
3820 }
3821 ol.endItemListItem();
3822 //ol.writeString("\n");
3823 }
3824 ol.endItemList();
3825
3826 if (addToIndex)
3827 {
3828 Doxygen::indexList->decContentsDepth();
3829 }
3830 endFile(ol);
3831 ol.popGeneratorState();
3832}
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()

static void writeFileIndex ( OutputList & ol)
static

Definition at line 1538 of file index.cpp.

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

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

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

Definition at line 2690 of file index.cpp.

2692{
2693 const FileDef *fd=md->getFileDef();
2694 if (fd && prevFileName!=fd->name())
2695 {
2696 ol.writeString(separator);
2698 fd->name());
2699 prevFileName = fd->name();
2700 }
2701}
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()

static void writeFileMemberIndex ( OutputList & ol)
static

Definition at line 3399 of file index.cpp.

3400{
3401 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3402 bool addToIndex = lne==nullptr || lne->visible();
3403 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3404 {
3405 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3406 Doxygen::indexList->incContentsDepth();
3407 }
3417 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3418 {
3419 Doxygen::indexList->decContentsDepth();
3420 }
3421
3422}
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3283

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

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

Definition at line 3283 of file index.cpp.

3284{
3285 const auto &index = Index::instance();
3286 if (index.numDocumentedFileMembers(hl)==0) return;
3287
3288 bool disableIndex = Config_getBool(DISABLE_INDEX);
3289 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3290 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3291 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3292
3293 bool multiPageIndex=FALSE;
3294 if (Index::instance().numDocumentedFileMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3295 {
3296 multiPageIndex=TRUE;
3297 }
3298
3299 ol.pushGeneratorState();
3301
3303 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3304 QCString title = lne ? lne->title() : theTranslator->trFileMembers();
3305 bool addToIndex = lne==nullptr || lne->visible();
3306
3307 if (addToIndex)
3308 {
3309 Doxygen::indexList->addContentsItem(multiPageIndex,getFmhlInfo(hl)->title,QCString(),
3310 getFmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3311 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3312 }
3313
3314 bool first=TRUE;
3315 for (const auto &[letter,list] : index.isFileIndexLetterUsed(hl))
3316 {
3317 QCString fileName = getFmhlInfo(hl)->fname;
3318 if (multiPageIndex)
3319 {
3320 QCString cs(letter);
3321 if (!first)
3322 {
3323 fileName+="_"+letterToLabel(cs);
3324 }
3325 if (addToIndex)
3326 {
3327 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3328 }
3329 }
3330
3331 bool quickIndex = index.numDocumentedFileMembers(hl)>maxItemsBeforeQuickIndex;
3332
3333 auto writeQuickLinks = [&,cap_letter=letter]()
3334 {
3336 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3337 {
3339
3340 // index item for all file member lists
3343 ol.writeString(fixSpaces(getFmhlInfo(0)->title));
3345
3346 // index items for per category member lists
3347 for (int i=1;i<FileMemberHighlight::Total;i++)
3348 {
3349 if (Index::instance().numDocumentedFileMembers(static_cast<FileMemberHighlight::Enum>(i))>0)
3350 {
3352 getFmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3353 ol.writeString(fixSpaces(getFmhlInfo(i)->title));
3355 }
3356 }
3357
3359
3360 if (quickIndex)
3361 {
3362 writeQuickMemberIndex(ol,index.isFileIndexLetterUsed(hl),cap_letter,
3363 getFmhlInfo(hl)->fname,multiPageIndex);
3364 }
3365 }
3366 };
3367
3368 ol.startFile(fileName+extension,QCString(),title);
3369 ol.startQuickIndices();
3370 if (!disableIndex && !quickLinksAfterSplitbar)
3371 {
3372 writeQuickLinks();
3373 }
3374 ol.endQuickIndices();
3375 ol.writeSplitBar(fileName);
3376 if (quickLinksAfterSplitbar)
3377 {
3378 writeQuickLinks();
3379 }
3380 ol.writeSearchInfo();
3381
3382 ol.startContents();
3383
3384 ol.startTextBlock();
3385 ol.parseText(hl == FileMemberHighlight::All && lne ? lne->intro() : theTranslator->trFileMembersDescriptionTotal(hl));
3386 ol.endTextBlock();
3387
3388 writeMemberList(ol,quickIndex,
3389 multiPageIndex ? letter : std::string(),
3390 index.isFileIndexLetterUsed(hl),
3392 endFile(ol);
3393 first=FALSE;
3394 }
3395 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3396 ol.popGeneratorState();
3397}
const char * fname
Definition index.cpp:3256

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

static void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 1200 of file index.cpp.

1201{
1202 if (Index::instance().numHierarchyClasses()==0) return;
1204 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
1205 QCString title = lne ? lne->title() : theTranslator->trClassHierarchy();
1206 startFile(ol,"inherits",QCString(),title,HighlightedItem::ClassHierarchy,FALSE,"hierarchy");
1207 startTitle(ol,QCString());
1208 ol.parseText(title);
1209 endTitle(ol,QCString(),QCString());
1210 ol.startContents();
1211 ol.startTextBlock();
1212 ol.startParagraph();
1213 ol.startTextLink("hierarchy",QCString());
1214 ol.parseText(theTranslator->trGotoTextualHierarchy());
1215 ol.endTextLink();
1216 ol.endParagraph();
1217 ol.endTextBlock();
1220 endFile(ol);
1221 ol.enableAll();
1222}
Represents a graphical class hierarchy.
void writeGraphicalHierarchy(DotGfxHierarchyTable &g)
Definition outputlist.h:667
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()

static void writeGraphicalExceptionHierarchy ( OutputList & ol)
static

Definition at line 1410 of file index.cpp.

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

static void writeGraphicalInterfaceHierarchy ( OutputList & ol)
static

Definition at line 1305 of file index.cpp.

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

4001{
4002 if (!Config_getBool(HAVE_DOT) || !Config_getBool(GENERATE_HTML)) return;
4003 ol.pushGeneratorState();
4005
4006 DotLegendGraph gd;
4007 gd.writeGraph(Config_getString(HTML_OUTPUT));
4008
4009 bool oldStripCommentsState = Config_getBool(STRIP_CODE_COMMENTS);
4010 bool oldCreateSubdirs = Config_getBool(CREATE_SUBDIRS);
4011 // temporarily disable the stripping of comments for our own code example!
4012 Config_updateBool(STRIP_CODE_COMMENTS,FALSE);
4013 // temporarily disable create subdirs for linking to our example
4014 Config_updateBool(CREATE_SUBDIRS,FALSE);
4015
4016 startFile(ol,"graph_legend",QCString(),theTranslator->trLegendTitle());
4017 startTitle(ol,QCString());
4018 ol.parseText(theTranslator->trLegendTitle());
4019 endTitle(ol,QCString(),QCString());
4020 ol.startContents();
4021 QCString legendDocs = theTranslator->trLegendDocs();
4022 int s = legendDocs.find("<center>");
4023 int e = legendDocs.find("</center>");
4024 QCString imgExt = getDotImageExtension();
4025 if (imgExt=="svg" && s!=-1 && e!=-1)
4026 {
4027 legendDocs = legendDocs.left(s+8) + "[!-- " + "SVG 0 --]" + legendDocs.mid(e);
4028 //printf("legendDocs=%s\n",qPrint(legendDocs));
4029 }
4030
4031 {
4032 auto fd = createFileDef("","graph_legend.dox");
4033 ol.generateDoc("graph_legend",1,fd.get(),nullptr,legendDocs,FALSE,FALSE,
4035 }
4036
4037 // restore config settings
4038 Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState);
4039 Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs);
4040
4041 endFile(ol);
4042 ol.popGeneratorState();
4043}
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:267
QCString getDotImageExtension()
Definition util.cpp:6776

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

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

Definition at line 4281 of file index.cpp.

4282{
4283 if (ftv)
4284 {
4285 ol.pushGeneratorState();
4287 }
4288 startIndexHierarchy(ol,0);
4289 for (const auto &gd : *Doxygen::groupLinkedMap)
4290 {
4291 if (gd->isVisibleInHierarchy())
4292 {
4293 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4294 }
4295 }
4296 endIndexHierarchy(ol,0);
4297 if (ftv)
4298 {
4299 ol.popGeneratorState();
4300 }
4301}
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4051

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

Referenced by writeTopicIndex().

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4051 of file index.cpp.

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

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

static void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 1331 of file index.cpp.

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

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

static void writeHierarchicalIndex ( OutputList & ol)
static

Definition at line 1119 of file index.cpp.

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

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

static void writeHierarchicalInterfaceIndex ( OutputList & ol)
static

Definition at line 1226 of file index.cpp.

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

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

static void writeIndex ( OutputList & ol)
static

Definition at line 4762 of file index.cpp.

4763{
4764 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4765 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4766 bool disableIndex = Config_getBool(DISABLE_INDEX);
4767 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4768 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4769 QCString projectName = Config_getString(PROJECT_NAME);
4770 // save old generator state
4771 ol.pushGeneratorState();
4772
4773 QCString projPrefix;
4774 if (!projectName.isEmpty())
4775 {
4776 projPrefix=projectName+" ";
4777 }
4778
4779 //--------------------------------------------------------------------
4780 // write HTML index
4781 //--------------------------------------------------------------------
4783
4784 QCString defFileName =
4785 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4786 int defLine =
4787 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4788
4789 QCString title;
4790 if (!mainPageHasTitle())
4791 {
4792 title = theTranslator->trMainPage();
4793 }
4794 else if (Doxygen::mainPage)
4795 {
4796 title = filterTitle(Doxygen::mainPage->title());
4797 }
4798
4799 QCString indexName="index";
4800 ol.startFile(indexName,QCString(),title);
4801
4803 {
4804 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4805 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4806 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4807 if (hasTitle) // to avoid duplicate entries in the treeview
4808 {
4809 Doxygen::indexList->addContentsItem(hasSubs,
4810 title,
4811 QCString(),
4812 indexName,
4813 QCString(),
4814 hasSubs,
4815 TRUE);
4816 }
4817 if (hasSubs)
4818 {
4819 writePages(Doxygen::mainPage.get(),nullptr);
4820 }
4821 }
4822
4823 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4824 ol.startQuickIndices();
4825 if (!disableIndex && !quickLinksAfterSplitbar)
4826 {
4828 }
4829 ol.endQuickIndices();
4830 ol.writeSplitBar(indexName);
4831 if (quickLinksAfterSplitbar)
4832 {
4834 }
4835 ol.writeSearchInfo();
4836 bool headerWritten=FALSE;
4838 {
4839 if (!Doxygen::mainPage->title().isEmpty())
4840 {
4841 if (Doxygen::mainPage->title().lower() != "notitle")
4842 ol.startPageDoc(Doxygen::mainPage->title());
4843 else
4844 ol.startPageDoc("");
4845 }
4846 else
4847 ol.startPageDoc(projectName);
4848 }
4849 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4850 {
4851 if (Doxygen::mainPage->title().lower()!="notitle")
4852 {
4853 ol.startHeaderSection();
4855 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4856 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4857 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT));
4858 headerWritten = TRUE;
4859 }
4860 }
4861 else
4862 {
4863 if (!projectName.isEmpty())
4864 {
4865 ol.startHeaderSection();
4867 ol.parseText(theTranslator->trDocumentation(projectName));
4868 headerWritten = TRUE;
4869 }
4870 }
4871 if (headerWritten)
4872 {
4874 ol.endHeaderSection();
4875 }
4876
4877 ol.startContents();
4878 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4879 {
4881 }
4882
4884 {
4885 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
4886 {
4887 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4888 }
4889
4890 ol.startTextBlock();
4891 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4892 Doxygen::mainPage->documentation(),true,false,
4893 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4894 ol.endTextBlock();
4895 ol.endPageDoc();
4896 }
4897
4900 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4901 Doxygen::indexList->addIndexFile(fn);
4902
4903 endFile(ol);
4904
4906
4907 //--------------------------------------------------------------------
4908 // write LaTeX/RTF index
4909 //--------------------------------------------------------------------
4913
4915 {
4916 msg("Generating main page...\n");
4917 Doxygen::mainPage->writeDocumentation(ol);
4918 }
4919
4920 ol.startFile("refman",QCString(),QCString());
4924
4925 if (projPrefix.isEmpty())
4926 {
4927 ol.parseText(theTranslator->trReferenceManual());
4928 }
4929 else
4930 {
4931 ol.parseText(projPrefix);
4932 }
4933
4934 if (!Config_getString(PROJECT_NUMBER).isEmpty())
4935 {
4936 ol.startProjectNumber();
4937 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
4938 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4939 ol.endProjectNumber();
4940 }
4943 ol.parseText(theTranslator->trGeneratedBy());
4947
4948 ol.lastIndexPage();
4950 {
4953 }
4954 const auto &index = Index::instance();
4955 if (index.numDocumentedPages()>0)
4956 {
4959 }
4960
4962 if (!Config_getBool(LATEX_HIDE_INDICES))
4963 {
4964 //if (indexedPages>0)
4965 //{
4966 // ol.startIndexSection(isPageIndex);
4967 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
4968 // ol.endIndexSection(isPageIndex);
4969 //}
4970 if (index.numDocumentedModules()>0)
4971 {
4973 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
4975 }
4976 if (index.numDocumentedGroups()>0)
4977 {
4979 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
4981 }
4982 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
4983 {
4984 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
4985 if (lne)
4986 {
4988 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
4990 }
4991 }
4992 if (index.numDocumentedConcepts()>0)
4993 {
4995 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
4997 }
4998 if (index.numHierarchyInterfaces()>0)
4999 {
5001 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5003 }
5004 if (index.numHierarchyClasses()>0)
5005 {
5006 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5007 if (lne)
5008 {
5010 ol.parseText(/*projPrefix+*/
5011 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5012 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5013 theTranslator->trHierarchicalIndex()
5014 ));
5016 }
5017 }
5018 if (index.numHierarchyExceptions()>0)
5019 {
5021 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5023 }
5024 if (index.numAnnotatedInterfacesPrinted()>0)
5025 {
5027 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5029 }
5030 if (index.numAnnotatedClassesPrinted()>0)
5031 {
5033 ol.parseText(/*projPrefix+*/
5034 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5035 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5036 theTranslator->trCompoundIndex()
5037 ));
5039 }
5040 if (index.numAnnotatedStructsPrinted()>0)
5041 {
5043 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5045 }
5046 if (index.numAnnotatedExceptionsPrinted()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5051 }
5052 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5053 {
5055 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5057 }
5058 }
5060
5061 if (index.numDocumentedModules()>0)
5062 {
5064 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5066 }
5067 if (index.numDocumentedGroups()>0)
5068 {
5070 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5072 }
5073 if (index.numDocumentedNamespaces()>0)
5074 {
5076 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5078 }
5079 if (index.numDocumentedConcepts()>0)
5080 {
5082 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5084 }
5085 if (index.numAnnotatedInterfacesPrinted()>0)
5086 {
5088 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5090 }
5091 if (index.numAnnotatedClassesPrinted()>0)
5092 {
5094 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5096 }
5097 if (index.numAnnotatedStructsPrinted()>0)
5098 {
5100 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5102 }
5103 if (index.numAnnotatedExceptionsPrinted()>0)
5104 {
5106 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5108 }
5109 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5110 {
5112 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5114 }
5115 if (!Doxygen::exampleLinkedMap->empty())
5116 {
5118 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5120 }
5122 endFile(ol);
5123
5124 ol.popGeneratorState();
5125}
static const QCString crawlFileName
Definition sitemap.h:75
void endPageDoc()
Definition outputlist.h:623
void endIndexSection(IndexSection is)
Definition outputlist.h:388
void startProjectNumber()
Definition outputlist.h:392
void lastIndexPage()
Definition outputlist.h:673
void startPageDoc(const QCString &pageTitle)
Definition outputlist.h:621
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:5399

References addHtmlExtensionIfMissing(), Config_getBool, Config_getString, Crawlmap::crawlFileName, OutputList::disable(), OutputList::disableAllBut(), Docbook, OutputList::enable(), 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 5648 of file index.cpp.

5649{
5650 writeMenuData();
5652 if (lne)
5653 {
5655 }
5656}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5129
static void writeMenuData()
Definition index.cpp:5632

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

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5129 of file index.cpp.

5130{
5131 auto isRef = [](const QCString &s)
5132 {
5133 return s.startsWith("@ref") || s.startsWith("\\ref");
5134 };
5135 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5136 const auto &index = Index::instance();
5137 for (const auto &lne : entries)
5138 {
5139 LayoutNavEntry::Kind kind = lne->kind();
5140 size_t idx = static_cast<size_t>(kind);
5141 if (idx>=indexWritten.size())
5142 {
5143 size_t oldSize = indexWritten.size();
5144 size_t newSize = idx+1;
5145 indexWritten.resize(newSize);
5146 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5147 }
5148 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5149 bool addToIndex=lne->visible();
5150 bool needsClosing=FALSE;
5151 if (!indexWritten.at(idx))
5152 {
5153 switch(kind)
5154 {
5155 case LayoutNavEntry::MainPage:
5156 msg("Generating index page...\n");
5157 writeIndex(ol);
5158 break;
5159 case LayoutNavEntry::Pages:
5160 msg("Generating page index...\n");
5161 writePageIndex(ol);
5162 break;
5163 case LayoutNavEntry::Topics:
5164 msg("Generating topic index...\n");
5165 writeTopicIndex(ol);
5166 break;
5167 case LayoutNavEntry::Modules:
5168 {
5169 if (index.numDocumentedModules()>0 && addToIndex)
5170 {
5171 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5172 Doxygen::indexList->incContentsDepth();
5173 needsClosing=TRUE;
5174 }
5175 }
5176 break;
5177 case LayoutNavEntry::ModuleList:
5178 msg("Generating module index...\n");
5179 writeModuleIndex(ol);
5180 break;
5181 case LayoutNavEntry::ModuleMembers:
5182 msg("Generating module member index...\n");
5184 break;
5185 case LayoutNavEntry::Namespaces:
5186 {
5187 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5188 if (showNamespaces)
5189 {
5190 if (index.numDocumentedNamespaces()>0 && addToIndex)
5191 {
5192 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5193 Doxygen::indexList->incContentsDepth();
5194 needsClosing=TRUE;
5195 }
5196 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5197 {
5198 msg("Generating namespace index...\n");
5200 }
5201 }
5202 }
5203 break;
5204 case LayoutNavEntry::NamespaceList:
5205 {
5206 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5207 if (showNamespaces)
5208 {
5209 msg("Generating namespace index...\n");
5211 }
5212 }
5213 break;
5214 case LayoutNavEntry::NamespaceMembers:
5215 msg("Generating namespace member index...\n");
5217 break;
5218 case LayoutNavEntry::Classes:
5219 if (index.numAnnotatedClasses()>0 && addToIndex)
5220 {
5221 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5222 Doxygen::indexList->incContentsDepth();
5223 needsClosing=TRUE;
5224 }
5225 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5226 {
5227 msg("Generating annotated compound index...\n");
5229 }
5230 break;
5231 case LayoutNavEntry::Concepts:
5232 msg("Generating concept index...\n");
5234 break;
5235 case LayoutNavEntry::ClassList:
5236 msg("Generating annotated compound index...\n");
5238 break;
5239 case LayoutNavEntry::ClassIndex:
5240 msg("Generating alphabetical compound index...\n");
5242 break;
5243 case LayoutNavEntry::ClassHierarchy:
5244 msg("Generating hierarchical class index...\n");
5246 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5247 {
5248 msg("Generating graphical class hierarchy...\n");
5250 }
5251 break;
5252 case LayoutNavEntry::ClassMembers:
5253 if (!sliceOpt)
5254 {
5255 msg("Generating member index...\n");
5257 }
5258 break;
5259 case LayoutNavEntry::Interfaces:
5260 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5261 {
5262 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5263 Doxygen::indexList->incContentsDepth();
5264 needsClosing=TRUE;
5265 }
5266 break;
5267 case LayoutNavEntry::InterfaceList:
5268 if (sliceOpt)
5269 {
5270 msg("Generating annotated interface index...\n");
5272 }
5273 break;
5274 case LayoutNavEntry::InterfaceIndex:
5275 if (sliceOpt)
5276 {
5277 msg("Generating alphabetical interface index...\n");
5279 }
5280 break;
5281 case LayoutNavEntry::InterfaceHierarchy:
5282 if (sliceOpt)
5283 {
5284 msg("Generating hierarchical interface index...\n");
5286 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5287 {
5288 msg("Generating graphical interface hierarchy...\n");
5290 }
5291 }
5292 break;
5293 case LayoutNavEntry::Structs:
5294 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5295 {
5296 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5297 Doxygen::indexList->incContentsDepth();
5298 needsClosing=TRUE;
5299 }
5300 break;
5301 case LayoutNavEntry::StructList:
5302 if (sliceOpt)
5303 {
5304 msg("Generating annotated struct index...\n");
5306 }
5307 break;
5308 case LayoutNavEntry::StructIndex:
5309 if (sliceOpt)
5310 {
5311 msg("Generating alphabetical struct index...\n");
5313 }
5314 break;
5315 case LayoutNavEntry::Exceptions:
5316 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5317 {
5318 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5319 Doxygen::indexList->incContentsDepth();
5320 needsClosing=TRUE;
5321 }
5322 break;
5323 case LayoutNavEntry::ExceptionList:
5324 if (sliceOpt)
5325 {
5326 msg("Generating annotated exception index...\n");
5328 }
5329 break;
5330 case LayoutNavEntry::ExceptionIndex:
5331 if (sliceOpt)
5332 {
5333 msg("Generating alphabetical exception index...\n");
5335 }
5336 break;
5337 case LayoutNavEntry::ExceptionHierarchy:
5338 if (sliceOpt)
5339 {
5340 msg("Generating hierarchical exception index...\n");
5342 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5343 {
5344 msg("Generating graphical exception hierarchy...\n");
5346 }
5347 }
5348 break;
5349 case LayoutNavEntry::Files:
5350 {
5351 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5352 {
5353 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5354 Doxygen::indexList->incContentsDepth();
5355 needsClosing=TRUE;
5356 }
5357 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5358 {
5359 msg("Generating file index...\n");
5360 writeFileIndex(ol);
5361 }
5362 }
5363 break;
5364 case LayoutNavEntry::FileList:
5365 msg("Generating file index...\n");
5366 writeFileIndex(ol);
5367 break;
5368 case LayoutNavEntry::FileGlobals:
5369 msg("Generating file member index...\n");
5371 break;
5372 case LayoutNavEntry::Examples:
5373 msg("Generating example index...\n");
5375 break;
5376 case LayoutNavEntry::User:
5377 if (addToIndex)
5378 {
5379 // prepend a ! or ^ marker to the URL to avoid tampering with it
5380 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5381 bool isRelative=url.at(0)=='!';
5382 if (!url.isEmpty() && !isRelative) // absolute URL
5383 {
5384 url.prepend("^"); // prepend ^ to absolute URL
5385 }
5386 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5387 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5388 }
5389 break;
5390 case LayoutNavEntry::UserGroup:
5391 if (addToIndex)
5392 {
5393 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5394 if (!url.isEmpty())
5395 {
5396 if (url=="!") // result of a "[none]" url
5397 {
5398 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5399 }
5400 else
5401 {
5402 bool isRelative=url.at(0)=='!';
5403 if (!isRelative) // absolute URL
5404 {
5405 url.prepend("^"); // prepend ^ to absolute URL
5406 }
5407 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5408 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5409 }
5410 }
5411 else
5412 {
5413 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5414 }
5415 Doxygen::indexList->incContentsDepth();
5416 needsClosing=TRUE;
5417 }
5418 writeUserGroupStubPage(ol,lne.get());
5419 break;
5420 case LayoutNavEntry::None:
5421 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5422 break;
5423 }
5424 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5425 {
5426 indexWritten.at(idx)=TRUE;
5427 }
5428 }
5429 writeIndexHierarchyEntries(ol,lne->children());
5430 if (needsClosing)
5431 {
5432 switch(kind)
5433 {
5434 case LayoutNavEntry::Modules:
5435 case LayoutNavEntry::Namespaces:
5436 case LayoutNavEntry::Classes:
5437 case LayoutNavEntry::Files:
5438 case LayoutNavEntry::UserGroup:
5439 Doxygen::indexList->decContentsDepth();
5440 break;
5441 default:
5442 break;
5443 }
5444 }
5445 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5446 }
5447}
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:1200
static void writeAnnotatedStructIndex(OutputList &ol)
Definition index.cpp:2650
static void writeAlphabeticalExceptionIndex(OutputList &ol)
Definition index.cpp:2493
static void writeClassMemberIndex(OutputList &ol)
Definition index.cpp:3223
static std::vector< bool > indexWritten
Definition index.cpp:5127
static void writeAnnotatedIndex(OutputList &ol)
Definition index.cpp:2622
static void writeFileIndex(OutputList &ol)
Definition index.cpp:1538
static void writeGraphicalInterfaceHierarchy(OutputList &ol)
Definition index.cpp:1305
static void writeAlphabeticalIndex(OutputList &ol)
Definition index.cpp:2406
static void writeAnnotatedInterfaceIndex(OutputList &ol)
Definition index.cpp:2636
static void writePageIndex(OutputList &ol)
Definition index.cpp:3926
static void writeNamespaceIndex(OutputList &ol)
Definition index.cpp:1991
static void writeAnnotatedExceptionIndex(OutputList &ol)
Definition index.cpp:2664
static void writeHierarchicalInterfaceIndex(OutputList &ol)
Definition index.cpp:1226
static void writeUserGroupStubPage(OutputList &ol, LayoutNavEntry *lne)
Definition index.cpp:4725
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4305
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3747
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1410
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3772
static void writeAlphabeticalInterfaceIndex(OutputList &ol)
Definition index.cpp:2435
static void writeAlphabeticalStructIndex(OutputList &ol)
Definition index.cpp:2464
static void writeConceptIndex(OutputList &ol)
Definition index.cpp:4619
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4445
static void writeIndex(OutputList &ol)
Definition index.cpp:4762
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1331
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3575
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1119
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3399
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:6414

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

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

Definition at line 2731 of file index.cpp.

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

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

Definition at line 463 of file index.cpp.

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

static void writeMenuData ( )
static

Definition at line 5632 of file index.cpp.

5633{
5634 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5635 QCString outputDir = Config_getBool(HTML_OUTPUT);
5637 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5638 if (t.is_open())
5639 {
5641 t << "var menudata={";
5642 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5643 if (hasChildren) t << "]";
5644 t << "}\n";
5645 }
5646}
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:72
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()

static void writeModuleIndex ( OutputList & ol)
static

Definition at line 4445 of file index.cpp.

4446{
4447 if (ModuleManager::instance().numDocumentedModules()==0) return;
4448 ol.pushGeneratorState();
4449 // 1.{
4450
4453 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleList);
4454 if (lne==nullptr) lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Modules); // fall back
4455 QCString title = lne ? lne->title() : theTranslator->trModules();
4456 bool addToIndex = lne==nullptr || lne->visible();
4457
4458 startFile(ol,"modules",QCString(),title,HighlightedItem::Modules);
4459 startTitle(ol,QCString());
4460 ol.parseText(title);
4461 endTitle(ol,QCString(),QCString());
4462 ol.startContents();
4463 ol.startTextBlock();
4464 ol.parseText(lne ? lne->intro() : theTranslator->trModulesListDescription(Config_getBool(EXTRACT_ALL)));
4465 ol.endTextBlock();
4466
4467 // ---------------
4468 // Normal group index for Latex/RTF
4469 // ---------------
4470 // 2.{
4471 ol.pushGeneratorState();
4473 Doxygen::indexList->disable();
4474
4475 writeModuleList(ol,nullptr,FALSE);
4476
4477 Doxygen::indexList->enable();
4478 ol.popGeneratorState();
4479 // 2.}
4480
4481 // ---------------
4482 // interactive group index for HTML
4483 // ---------------
4484 // 2.{
4485 ol.pushGeneratorState();
4487
4488 {
4489 if (addToIndex)
4490 {
4491 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"modules",QCString(),TRUE,TRUE);
4492 Doxygen::indexList->incContentsDepth();
4493 }
4494 FTVHelp ftv(false);
4495 writeModuleList(ol,&ftv,addToIndex);
4496 TextStream t;
4497 ftv.generateTreeViewInline(t);
4498 ol.writeString(t.str().c_str());
4499 if (addToIndex)
4500 {
4501 Doxygen::indexList->decContentsDepth();
4502 }
4503 }
4504 ol.popGeneratorState();
4505 // 2.}
4506 endFile(ol);
4507 ol.popGeneratorState();
4508 // 1.}
4509}
static ModuleManager & instance()
static void writeModuleList(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4421

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

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

Definition at line 2716 of file index.cpp.

2718{
2719 const ModuleDef *mod=md->getModuleDef();
2720 if (mod && prevModuleName!=mod->displayName())
2721 {
2722 ol.writeString(separator);
2723 // link to the member declaration in the module page
2724 ol.writeObjectLink(mod->getReference(),mod->getOutputFileBase(),"r_"+md->anchor(),
2725 mod->displayName());
2726 prevModuleName = mod->displayName();
2727 }
2728}
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()

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

Definition at line 4421 of file index.cpp.

4422{
4423 if (ftv)
4424 {
4425 ol.pushGeneratorState();
4427 }
4428 startIndexHierarchy(ol,0);
4429 for (const auto &mod : ModuleManager::instance().modules())
4430 {
4431 if (mod->isPrimaryInterface())
4432 {
4433 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4434 }
4435 }
4436 endIndexHierarchy(ol,0);
4437 if (ftv)
4438 {
4439 ol.popGeneratorState();
4440 }
4441}
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4374

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

Referenced by writeModuleIndex().

◆ writeModuleMemberIndex()

static void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3747 of file index.cpp.

3748{
3749 const auto &index = Index::instance();
3750 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3751 bool addToIndex = lne==nullptr || lne->visible();
3752 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3753 {
3754 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3755 Doxygen::indexList->incContentsDepth();
3756 }
3757 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3764 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3765 {
3766 Doxygen::indexList->decContentsDepth();
3767 }
3768}
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3627

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

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

Definition at line 3627 of file index.cpp.

3629{
3630 const auto &index = Index::instance();
3631 if (index.numDocumentedModuleMembers(hl)==0) return;
3632
3633 bool disableIndex = Config_getBool(DISABLE_INDEX);
3634 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3635 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3636 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3637
3638 bool multiPageIndex=FALSE;
3639 if (index.numDocumentedModuleMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3640 {
3641 multiPageIndex=TRUE;
3642 }
3643
3644 ol.pushGeneratorState();
3646
3648 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3649 QCString title = lne ? lne->title() : theTranslator->trModulesMembers();
3650 bool addToIndex = lne==nullptr || lne->visible();
3651
3652 if (addToIndex)
3653 {
3654 Doxygen::indexList->addContentsItem(multiPageIndex,getMmhlInfo(hl)->title,QCString(),
3655 getMmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3656 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3657 }
3658
3659 bool first=TRUE;
3660 for (const auto &[letter,list] : index.isModuleIndexLetterUsed(hl))
3661 {
3662 QCString fileName = getMmhlInfo(hl)->fname;
3663 if (multiPageIndex)
3664 {
3665 QCString cs(letter);
3666 if (!first)
3667 {
3668 fileName+="_"+letterToLabel(cs);
3669 }
3670 if (addToIndex)
3671 {
3672 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3673 }
3674 }
3675
3676 bool quickIndex = index.numDocumentedModuleMembers(hl)>maxItemsBeforeQuickIndex;
3677
3678 auto writeQuickLinks = [&,cap_letter=letter]()
3679 {
3681 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3682 {
3684
3685 // index item for all namespace member lists
3688 ol.writeString(fixSpaces(getMmhlInfo(0)->title));
3690
3691 // index items per category member lists
3692 for (int i=1;i<ModuleMemberHighlight::Total;i++)
3693 {
3694 if (index.numDocumentedModuleMembers(static_cast<ModuleMemberHighlight::Enum>(i))>0)
3695 {
3697 getMmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3698 ol.writeString(fixSpaces(getMmhlInfo(i)->title));
3700 }
3701 }
3702
3704
3705 if (quickIndex)
3706 {
3707 writeQuickMemberIndex(ol,index.isModuleIndexLetterUsed(hl),cap_letter,
3708 getMmhlInfo(hl)->fname,multiPageIndex);
3709 }
3710 }
3711 };
3712
3713 ol.startFile(fileName+extension,QCString(),title);
3714 ol.startQuickIndices();
3715 if (!disableIndex && !quickLinksAfterSplitbar)
3716 {
3717 writeQuickLinks();
3718 }
3719 ol.endQuickIndices();
3720 ol.writeSplitBar(fileName);
3721 if (quickLinksAfterSplitbar)
3722 {
3723 writeQuickLinks();
3724 }
3725 ol.writeSearchInfo();
3726
3727 ol.startContents();
3728
3729 ol.startTextBlock();
3730 ol.parseText(hl == ModuleMemberHighlight::All && lne ? lne->intro() : theTranslator->trModuleMembersDescriptionTotal(hl));
3731 ol.endTextBlock();
3732
3733 writeMemberList(ol,quickIndex,
3734 multiPageIndex ? letter : std::string(),
3735 index.isModuleIndexLetterUsed(hl),
3737 endFile(ol);
3738 first=FALSE;
3739 }
3740 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3741 ol.popGeneratorState();
3742}
const char * fname
Definition index.cpp:3607

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

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

Definition at line 1783 of file index.cpp.

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

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

Definition at line 4374 of file index.cpp.

4376{
4377 int visibleMembers = mod->countVisibleMembers();
4378 bool isDir=visibleMembers>0;
4379 if (addToIndex)
4380 {
4381 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4382 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4383 }
4384 if (ftv)
4385 {
4386 ftv->addContentsItem(false,mod->name(),
4387 mod->getReference(),mod->getOutputFileBase(),QCString(),
4388 false,false,mod);
4389 }
4390 ol.startIndexListItem();
4392 ol.parseText(mod->qualifiedName());
4394 if (mod->isReference())
4395 {
4396 ol.startTypewriter();
4397 ol.docify(" [external]");
4398 ol.endTypewriter();
4399 }
4400 if (addToIndex && isDir)
4401 {
4402 Doxygen::indexList->incContentsDepth();
4403 }
4404 if (isDir)
4405 {
4406 //ftv->incContentsDepth();
4407 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4408 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4409 writeModuleMembers(mod,addToIndex);
4410 //ftv->decContentsDepth();
4411 }
4412 if (addToIndex && isDir)
4413 {
4414 Doxygen::indexList->decContentsDepth();
4415 }
4416 ol.endIndexListItem();
4417}
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:1783

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

static void writeNamespaceIndex ( OutputList & ol)
static

Definition at line 1991 of file index.cpp.

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

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, VHDL, LayoutNavEntry::visible(), writeNamespaceTree(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeIndexHierarchyEntries().

◆ writeNamespaceLinkForMember()

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

Definition at line 2703 of file index.cpp.

2705{
2706 const NamespaceDef *nd=md->getNamespaceDef();
2707 if (nd && prevNamespaceName!=nd->displayName())
2708 {
2709 ol.writeString(separator);
2711 nd->displayName());
2712 prevNamespaceName = nd->displayName();
2713 }
2714}

References Definition::anchor(), Definition::displayName(), MemberDef::getNamespaceDef(), Definition::getOutputFileBase(), Definition::getReference(), OutputList::writeObjectLink(), and OutputList::writeString().

Referenced by writeMemberList().

◆ writeNamespaceMemberIndex()

static void writeNamespaceMemberIndex ( OutputList & ol)
static

Definition at line 3575 of file index.cpp.

3576{
3577 const auto &index = Index::instance();
3578 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3579 bool addToIndex = lne==nullptr || lne->visible();
3580 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3581 {
3582 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3583 Doxygen::indexList->incContentsDepth();
3584 }
3585 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3594 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3595 {
3596 Doxygen::indexList->decContentsDepth();
3597 }
3598
3599}
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3458

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

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

Definition at line 3458 of file index.cpp.

3460{
3461 const auto &index = Index::instance();
3462 if (index.numDocumentedNamespaceMembers(hl)==0) return;
3463
3464 bool disableIndex = Config_getBool(DISABLE_INDEX);
3465 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
3466 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
3467 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3468
3469 bool multiPageIndex=FALSE;
3470 if (index.numDocumentedNamespaceMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3471 {
3472 multiPageIndex=TRUE;
3473 }
3474
3475 ol.pushGeneratorState();
3477
3479 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3480 QCString title = lne ? lne->title() : theTranslator->trNamespaceMembers();
3481 bool addToIndex = lne==nullptr || lne->visible();
3482
3483 if (addToIndex)
3484 {
3485 Doxygen::indexList->addContentsItem(multiPageIndex,getNmhlInfo(hl)->title,QCString(),
3486 getNmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3487 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3488 }
3489
3490 bool first=TRUE;
3491 for (const auto &[letter,list] : index.isNamespaceIndexLetterUsed(hl))
3492 {
3493 QCString fileName = getNmhlInfo(hl)->fname;
3494 if (multiPageIndex)
3495 {
3496 QCString cs(letter);
3497 if (!first)
3498 {
3499 fileName+="_"+letterToLabel(cs);
3500 }
3501 if (addToIndex)
3502 {
3503 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3504 }
3505 }
3506
3507 bool quickIndex = index.numDocumentedNamespaceMembers(hl)>maxItemsBeforeQuickIndex;
3508
3509 auto writeQuickLinks = [&,cap_letter=letter]()
3510 {
3512 if (!Config_getBool(HTML_DYNAMIC_MENUS))
3513 {
3515
3516 // index item for all namespace member lists
3519 ol.writeString(fixSpaces(getNmhlInfo(0)->title));
3521
3522 // index items per category member lists
3523 for (int i=1;i<NamespaceMemberHighlight::Total;i++)
3524 {
3525 if (index.numDocumentedNamespaceMembers(static_cast<NamespaceMemberHighlight::Enum>(i))>0)
3526 {
3528 getNmhlInfo(i)->fname+Doxygen::htmlFileExtension,hl==i,TRUE,first);
3529 ol.writeString(fixSpaces(getNmhlInfo(i)->title));
3531 }
3532 }
3533
3535
3536 if (quickIndex)
3537 {
3538 writeQuickMemberIndex(ol,index.isNamespaceIndexLetterUsed(hl),cap_letter,
3539 getNmhlInfo(hl)->fname,multiPageIndex);
3540 }
3541 }
3542 };
3543
3544 ol.startFile(fileName+extension,QCString(),title);
3545 ol.startQuickIndices();
3546 if (!disableIndex && !quickLinksAfterSplitbar)
3547 {
3548 writeQuickLinks();
3549 }
3550 ol.endQuickIndices();
3551 ol.writeSplitBar(fileName);
3552 if (quickLinksAfterSplitbar)
3553 {
3554 writeQuickLinks();
3555 }
3556 ol.writeSearchInfo();
3557
3558 ol.startContents();
3559
3560 ol.startTextBlock();
3561 ol.parseText(hl == NamespaceMemberHighlight::All && lne ? lne->intro() : theTranslator->trNamespaceMembersDescriptionTotal(hl));
3562 ol.endTextBlock();
3563
3564 writeMemberList(ol,quickIndex,
3565 multiPageIndex ? letter : std::string(),
3566 index.isNamespaceIndexLetterUsed(hl),
3568 endFile(ol);
3569 first=FALSE;
3570 }
3571 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3572 ol.popGeneratorState();
3573}
@ NamespaceMembers
Definition index.h:78
const char * fname
Definition index.cpp:3430

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

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

Definition at line 1757 of file index.cpp.

1758{
1759 for (const auto &lde : LayoutDocManager::instance().docEntries(LayoutDocManager::Namespace))
1760 {
1761 if (lde->kind()==LayoutDocEntry::MemberDef)
1762 {
1763 const LayoutDocEntryMemberDef *lmd = dynamic_cast<const LayoutDocEntryMemberDef*>(lde.get());
1764 if (lmd)
1765 {
1766 MemberList *ml = nd->getMemberList(lmd->type);
1767 if (ml)
1768 {
1769 for (const auto &md : *ml)
1770 {
1771 //printf(" member %s visible=%d\n",qPrint(md->name()),md->visibleInIndex());
1772 if (md->visibleInIndex())
1773 {
1774 writeMemberToIndex(nd,md,addToIndex);
1775 }
1776 }
1777 }
1778 }
1779 }
1780 }
1781}
virtual MemberList * getMemberList(MemberListType lt) const =0

References NamespaceDef::getMemberList(), LayoutDocManager::instance(), LayoutDocEntryMemberDef::type, and writeMemberToIndex().

Referenced by writeNamespaceTreeElement().

◆ writeNamespaceTree() [1/2]

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

Definition at line 1886 of file index.cpp.

1888{
1889 for (const auto &nd : nsLinkedMap)
1890 {
1891 if (nd->isVisibleInHierarchy())
1892 {
1893 writeNamespaceTreeElement(nd.get(),ftv,rootOnly,addToIndex);
1894 }
1895 }
1896}
static void writeNamespaceTreeElement(const NamespaceDef *nd, FTVHelp *ftv, bool rootOnly, bool addToIndex)
Definition index.cpp:1814

References writeNamespaceTreeElement().

◆ writeNamespaceTree() [2/2]

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

Definition at line 1874 of file index.cpp.

1876{
1877 for (const auto &nd : nsLinkedMap)
1878 {
1879 if (nd->isVisibleInHierarchy())
1880 {
1881 writeNamespaceTreeElement(nd,ftv,rootOnly,addToIndex);
1882 }
1883 }
1884}

References writeNamespaceTreeElement().

Referenced by writeNamespaceIndex(), and writeNamespaceTreeElement().

◆ writeNamespaceTreeElement()

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

Definition at line 1814 of file index.cpp.

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

Referenced by writeNamespaceTree(), and writeNamespaceTree().

◆ writePageIndex()

static void writePageIndex ( OutputList & ol)
static

Definition at line 3926 of file index.cpp.

3927{
3928 if (Index::instance().numIndexedPages()==0) return;
3929 ol.pushGeneratorState();
3931 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3932 QCString title = lne ? lne->title() : theTranslator->trRelatedPages();
3933 startFile(ol,"pages",QCString(),title,HighlightedItem::Pages);
3934 startTitle(ol,QCString());
3935 ol.parseText(title);
3936 endTitle(ol,QCString(),QCString());
3937 ol.startContents();
3938 ol.startTextBlock();
3939 ol.parseText(lne ? lne->intro() : theTranslator->trRelatedPagesDescription());
3940 ol.endTextBlock();
3941
3942 {
3943 FTVHelp ftv(false);
3944 for (const auto &pd : *Doxygen::pageLinkedMap)
3945 {
3946 if ((pd->getOuterScope()==nullptr ||
3947 pd->getOuterScope()->definitionType()!=Definition::TypePage) && // not a sub page
3948 pd->visibleInIndex()
3949 )
3950 {
3951 writePages(pd.get(),&ftv);
3952 }
3953 }
3954 TextStream t;
3955 ftv.generateTreeViewInline(t);
3956 ol.writeString(t.str().c_str());
3957 }
3958
3959// ol.popGeneratorState();
3960 // ------
3961
3962 endFile(ol);
3963 ol.popGeneratorState();
3964}

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

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

Definition at line 3866 of file index.cpp.

3867{
3868 //printf("writePages()=%s pd=%p mainpage=%p\n",qPrint(pd->name()),(void*)pd,(void*)Doxygen::mainPage.get());
3869 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Pages);
3870 bool addToIndex = lne==nullptr || lne->visible();
3871 if (!addToIndex) return;
3872
3873 bool hasSubPages = pd->hasSubPages();
3874 bool hasSections = pd->hasSections();
3875
3876 if (pd->visibleInIndex())
3877 {
3878 QCString pageTitle;
3879
3880 if (pd->title().isEmpty())
3881 pageTitle=pd->name();
3882 else
3883 pageTitle=filterTitle(pd->title());
3884
3885 if (ftv)
3886 {
3887 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
3888 ftv->addContentsItem(
3889 hasSubPages,pageTitle,
3890 pd->getReference(),pd->getOutputFileBase(),
3891 QCString(),hasSubPages,TRUE,pd);
3892 }
3893 if (addToIndex && pd!=Doxygen::mainPage.get())
3894 {
3895 Doxygen::indexList->addContentsItem(
3896 hasSubPages || hasSections,pageTitle,
3897 pd->getReference(),pd->getOutputFileBase(),
3898 QCString(),hasSubPages,TRUE,pd);
3899 }
3900 }
3901 if (hasSubPages && ftv) ftv->incContentsDepth();
3902 bool doIndent = (hasSections || hasSubPages) &&
3903 (pd!=Doxygen::mainPage.get() || mainPageHasOwnTitle());
3904 if (doIndent)
3905 {
3906 Doxygen::indexList->incContentsDepth();
3907 }
3908 if (hasSections)
3909 {
3910 pd->addSectionsToIndex();
3911 }
3912 for (const auto &subPage : pd->getSubPages())
3913 {
3914 writePages(subPage,ftv);
3915 }
3916 if (hasSubPages && ftv) ftv->decContentsDepth();
3917 if (doIndent)
3918 {
3919 Doxygen::indexList->decContentsDepth();
3920 }
3921 //printf("end writePages()=%s\n",qPrint(pd->title()));
3922}
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:3855

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

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

Definition at line 3044 of file index.cpp.

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

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

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

◆ writeSingleFileIndex()

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

Definition at line 1458 of file index.cpp.

1459{
1460 //printf("Found filedef %s\n",qPrint(fd->name()));
1461 bool doc = fd->isLinkableInProject();
1462 bool src = fd->generateSourceFile();
1463 bool nameOk = !fd->isDocumentationFile();
1464 if (nameOk && (doc || src) && !fd->isReference())
1465 {
1466 QCString path;
1467 if (Config_getBool(FULL_PATH_NAMES))
1468 {
1469 path=stripFromPath(fd->getPath());
1470 }
1471 QCString fullName=fd->name();
1472 if (!path.isEmpty())
1473 {
1474 if (path.at(path.length()-1)!='/') fullName.prepend("/");
1475 fullName.prepend(path);
1476 }
1477
1478 ol.startIndexKey();
1479 ol.docify(path);
1480 if (doc)
1481 {
1483 //if (addToIndex)
1484 //{
1485 // addMembersToIndex(fd,LayoutDocManager::File,fullName,QCString());
1486 //}
1487 }
1488 else if (src)
1489 {
1491 }
1492 if (doc && src)
1493 {
1494 ol.pushGeneratorState();
1496 ol.docify(" ");
1498 ol.docify("[");
1499 ol.parseText(theTranslator->trCode());
1500 ol.docify("]");
1501 ol.endTextLink();
1502 ol.popGeneratorState();
1503 }
1504 ol.endIndexKey();
1505 bool hasBrief = !fd->briefDescription().isEmpty();
1506 ol.startIndexValue(hasBrief);
1507 if (hasBrief)
1508 {
1509 //ol.docify(" (");
1510 ol.generateDoc(
1511 fd->briefFile(),fd->briefLine(),
1512 fd,nullptr,
1514 FALSE, // index words
1515 FALSE, // isExample
1516 QCString(), // example name
1517 TRUE, // single line
1518 TRUE, // link from index
1519 Config_getBool(MARKDOWN_SUPPORT)
1520 );
1521 //ol.docify(")");
1522 }
1523 if (doc)
1524 {
1525 ol.endIndexValue(fd->getOutputFileBase(),hasBrief);
1526 }
1527 else // src
1528 {
1529 ol.endIndexValue(fd->getSourceFileBase(),hasBrief);
1530 }
1531 //ol.popGeneratorState();
1532 // --------------------------------------------------------
1533 }
1534}
virtual int briefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString getSourceFileBase() const =0
virtual QCString briefFile() const =0
virtual QCString includeName() const =0
virtual QCString getPath() const =0
virtual bool generateSourceFile() const =0
virtual bool isDocumentationFile() const =0
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h: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()

static void writeTopicIndex ( OutputList & ol)
static

Definition at line 4305 of file index.cpp.

4306{
4307 if (Index::instance().numDocumentedGroups()==0) return;
4308 ol.pushGeneratorState();
4309 // 1.{
4312 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Topics);
4313 QCString title = lne ? lne->title() : theTranslator->trTopics();
4314 bool addToIndex = lne==nullptr || lne->visible();
4315
4316 startFile(ol,"topics",QCString(),title,HighlightedItem::Topics);
4317 startTitle(ol,QCString());
4318 ol.parseText(title);
4319 endTitle(ol,QCString(),QCString());
4320 ol.startContents();
4321 ol.startTextBlock();
4322 ol.parseText(lne ? lne->intro() : theTranslator->trTopicListDescription());
4323 ol.endTextBlock();
4324
4325 // ---------------
4326 // Normal group index for Latex/RTF
4327 // ---------------
4328 // 2.{
4329 ol.pushGeneratorState();
4331 Doxygen::indexList->disable();
4332
4333 writeGroupHierarchy(ol,nullptr,FALSE);
4334
4335 Doxygen::indexList->enable();
4336 ol.popGeneratorState();
4337 // 2.}
4338
4339 // ---------------
4340 // interactive group index for HTML
4341 // ---------------
4342 // 2.{
4343 ol.pushGeneratorState();
4345
4346 {
4347 if (addToIndex)
4348 {
4349 Doxygen::indexList->addContentsItem(TRUE,title,QCString(),"topics",QCString(),TRUE,TRUE);
4350 Doxygen::indexList->incContentsDepth();
4351 }
4352 FTVHelp ftv(false);
4353 writeGroupHierarchy(ol,&ftv,addToIndex);
4354 TextStream t;
4355 ftv.generateTreeViewInline(t);
4357 ol.writeString(t.str().c_str());
4358 if (addToIndex)
4359 {
4360 Doxygen::indexList->decContentsDepth();
4361 }
4362 }
4363 ol.popGeneratorState();
4364 // 2.}
4365
4366 endFile(ol);
4367 ol.popGeneratorState();
4368 // 1.}
4369}
static void writeGroupHierarchy(OutputList &ol, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4281

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

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

Definition at line 4725 of file index.cpp.

4726{
4727 if (lne->baseFile().startsWith("usergroup"))
4728 {
4729 ol.pushGeneratorState();
4732 startTitle(ol,QCString());
4733 ol.parseText(lne->title());
4734 endTitle(ol,QCString(),QCString());
4735 ol.startContents();
4736 int count=0;
4737 for (const auto &entry: lne->children())
4738 {
4739 if (entry->visible()) count++;
4740 }
4741 if (count>0)
4742 {
4743 ol.writeString("<ul>\n");
4744 for (const auto &entry: lne->children())
4745 {
4746 if (entry->visible())
4747 {
4748 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4749 fixSpaces(entry->title())+"</span></a></li>\n");
4750 }
4751 }
4752 ol.writeString("</ul>\n");
4753 }
4754 endFile(ol);
4755 ol.popGeneratorState();
4756 }
4757}
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 5127 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex