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

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

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

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

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

int countDirs ( )
static

Definition at line 4012 of file index.cpp.

4013{
4014 int count=0;
4015 for (const auto &dd : *Doxygen::dirLinkedMap)
4016 {
4017 if (dd->isLinkableInProject())
4018 {
4019 count++;
4020 }
4021 }
4022 return count;
4023}
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129

References Doxygen::dirLinkedMap.

Referenced by Index::countDataStructures().

◆ countFiles()

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

Definition at line 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:6565

References fileVisibleInIndex(), and Doxygen::inputNameLinkedMap.

Referenced by Index::countDataStructures().

◆ countGroups()

int countGroups ( )
static

Definition at line 3996 of file index.cpp.

3997{
3998 int count=0;
3999 for (const auto &gd : *Doxygen::groupLinkedMap)
4000 {
4001 if (!gd->isReference())
4002 {
4003 //gd->visited=FALSE;
4004 count++;
4005 }
4006 }
4007 return count;
4008}
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114

References Doxygen::groupLinkedMap.

Referenced by Index::countDataStructures().

◆ countNamespaces()

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

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

Definition at line 3865 of file index.cpp.

3866{
3867 docPages=indexPages=0;
3868 for (const auto &pd : *Doxygen::pageLinkedMap)
3869 {
3870 if (pd->visibleInIndex() && !pd->hasParentPage())
3871 {
3872 indexPages++;
3873 }
3874 if (pd->documentedPage())
3875 {
3876 docPages++;
3877 }
3878 }
3879}
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100

References Doxygen::pageLinkedMap.

Referenced by Index::countDataStructures().

◆ dirHasVisibleChildren()

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

void endQuickIndexItem ( OutputList & ol)
static

◆ endQuickIndexList()

void endQuickIndexList ( OutputList & ol)
static

◆ endTitle()

◆ get_pointer() [1/3]

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

Definition at line 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()

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

const FmhlInfo * getFmhlInfo ( size_t hl)
static

Definition at line 3267 of file index.cpp.

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

References Config_getBool, and theTranslator.

Referenced by renderQuickLinksAsJs(), and writeFileMemberIndexFiltered().

◆ getMmhlInfo()

const MmhlInfo * getMmhlInfo ( size_t hl)
static

Definition at line 3632 of file index.cpp.

3633{
3634 static MmhlInfo nmhlInfo[] =
3635 {
3636 MmhlInfo("modulemembers", theTranslator->trAll()),
3637 MmhlInfo("modulemembers_func",theTranslator->trFunctions()),
3638 MmhlInfo("modulemembers_vars",theTranslator->trVariables()),
3639 MmhlInfo("modulemembers_type",theTranslator->trTypedefs()),
3640 MmhlInfo("modulemembers_enum",theTranslator->trEnumerations()),
3641 MmhlInfo("modulemembers_eval",theTranslator->trEnumerationValues())
3642 };
3643 return &nmhlInfo[hl];
3644}
Helper class representing a module member in the navigation menu.
Definition index.cpp:3626

References theTranslator.

Referenced by renderQuickLinksAsJs(), and writeModuleMemberIndexFiltered().

◆ getNmhlInfo()

const NmhlInfo * getNmhlInfo ( size_t hl)
static

Definition at line 3448 of file index.cpp.

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

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

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

bool mainPageHasOwnTitle ( )
static

Definition at line 3883 of file index.cpp.

3884{
3885 QCString projectName = Config_getString(PROJECT_NAME);
3886 QCString title;
3888 {
3889 title = filterTitle(Doxygen::mainPage->title());
3890 }
3891 return !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
3892}
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:6760
QCString filterTitle(const QCString &title)
Definition util.cpp:6086

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

Referenced by writePages().

◆ MemberIndexMap_add()

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

Definition at line 180 of file index.cpp.

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

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

◆ quickLinkVisible()

bool quickLinkVisible ( LayoutNavEntry::Kind kind)
static

Definition at line 5477 of file index.cpp.

5478{
5479 const auto &index = Index::instance();
5480 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5481 bool showFiles = Config_getBool(SHOW_FILES);
5482 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5483 switch (kind)
5484 {
5485 case LayoutNavEntry::MainPage: return TRUE;
5486 case LayoutNavEntry::User: return TRUE;
5487 case LayoutNavEntry::UserGroup: return TRUE;
5488 case LayoutNavEntry::Pages: return index.numIndexedPages()>0;
5489 case LayoutNavEntry::Topics: return index.numDocumentedGroups()>0;
5490 case LayoutNavEntry::Modules: return index.numDocumentedModules()>0;
5491 case LayoutNavEntry::ModuleList: return index.numDocumentedModules()>0;
5492 case LayoutNavEntry::ModuleMembers: return index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0;
5493 case LayoutNavEntry::Namespaces: return index.numDocumentedNamespaces()>0 && showNamespaces;
5494 case LayoutNavEntry::NamespaceList: return index.numDocumentedNamespaces()>0 && showNamespaces;
5495 case LayoutNavEntry::NamespaceMembers: return index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0;
5496 case LayoutNavEntry::Concepts: return index.numDocumentedConcepts()>0;
5497 case LayoutNavEntry::Classes: return index.numAnnotatedClasses()>0;
5498 case LayoutNavEntry::ClassList: return index.numAnnotatedClasses()>0;
5499 case LayoutNavEntry::ClassIndex: return index.numAnnotatedClasses()>0;
5500 case LayoutNavEntry::ClassHierarchy: return index.numHierarchyClasses()>0;
5501 case LayoutNavEntry::ClassMembers: return index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && !sliceOpt;
5502 case LayoutNavEntry::Interfaces: return index.numAnnotatedInterfaces()>0;
5503 case LayoutNavEntry::InterfaceList: return index.numAnnotatedInterfaces()>0;
5504 case LayoutNavEntry::InterfaceIndex: return index.numAnnotatedInterfaces()>0;
5505 case LayoutNavEntry::InterfaceHierarchy: return index.numHierarchyInterfaces()>0;
5506 case LayoutNavEntry::Structs: return index.numAnnotatedStructs()>0;
5507 case LayoutNavEntry::StructList: return index.numAnnotatedStructs()>0;
5508 case LayoutNavEntry::StructIndex: return index.numAnnotatedStructs()>0;
5509 case LayoutNavEntry::Exceptions: return index.numAnnotatedExceptions()>0;
5510 case LayoutNavEntry::ExceptionList: return index.numAnnotatedExceptions()>0;
5511 case LayoutNavEntry::ExceptionIndex: return index.numAnnotatedExceptions()>0;
5512 case LayoutNavEntry::ExceptionHierarchy: return index.numHierarchyExceptions()>0;
5513 case LayoutNavEntry::Files: return index.numDocumentedFiles()>0 && showFiles;
5514 case LayoutNavEntry::FileList: return index.numDocumentedFiles()>0 && showFiles;
5515 case LayoutNavEntry::FileGlobals: return index.numDocumentedFileMembers(FileMemberHighlight::All)>0;
5516 case LayoutNavEntry::Examples: return !Doxygen::exampleLinkedMap->empty();
5517 case LayoutNavEntry::None: // should never happen, means not properly initialized
5518 assert(kind != LayoutNavEntry::None);
5519 return FALSE;
5520 }
5521 return FALSE;
5522}
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 5525 of file index.cpp.

5530{
5531 // index items per category member lists
5532 bool firstMember=TRUE;
5533 for (std::size_t i=0;i<total;i++)
5534 {
5535 if (numDocumented(i)>0)
5536 {
5537 t << ",";
5538 if (firstMember)
5539 {
5540 t << "children:[";
5541 firstMember=FALSE;
5542 }
5543 t << "\n{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\""
5544 << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\"";
5545
5546 // Check if we have many members, then add sub entries per letter...
5547 // quick alphabetical index
5548 bool quickIndex = numDocumented(i)>maxItemsBeforeQuickIndex;
5549 if (quickIndex)
5550 {
5551 bool multiPageIndex=FALSE;
5552 if (numDocumented(i)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
5553 {
5554 multiPageIndex=TRUE;
5555 }
5556 t << ",children:[\n";
5557 bool firstLetter=TRUE;
5558 for (const auto &[letter,list] : getMemberList(i))
5559 {
5560 if (!firstLetter) t << ",\n";
5561 QCString ci(letter);
5562 QCString is(letterToLabel(ci));
5563 QCString anchor;
5565 QCString fullName = getInfo(i)->fname;
5566 if (!multiPageIndex || firstLetter)
5567 anchor=fullName+extension+"#index_";
5568 else // other pages of multi page index
5569 anchor=fullName+"_"+is+extension+"#index_";
5570 t << "{text:\"" << convertToJSString(ci) << "\",url:\""
5571 << convertToJSString(anchor+convertToId(is)) << "\"}";
5572 firstLetter=FALSE;
5573 }
5574 t << "]";
5575 }
5576 t << "}";
5577 }
5578 }
5579 if (!firstMember)
5580 {
5581 t << "]";
5582 }
5583}
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:4532
QCString convertToId(const QCString &s)
Definition util.cpp:4381

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

Referenced by renderQuickLinksAsJs().

◆ renderQuickLinksAsJs()

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

Definition at line 5585 of file index.cpp.

5586{
5587 int count=0;
5588 for (const auto &entry : root->children())
5589 {
5590 if (entry->visible() && quickLinkVisible(entry->kind())) count++;
5591 }
5592 if (count>0) // at least one item is visible
5593 {
5594 bool firstChild = TRUE;
5595 if (!first) t << ",";
5596 t << "children:[\n";
5597 for (const auto &entry : root->children())
5598 {
5599 if (entry->visible() && quickLinkVisible(entry->kind()))
5600 {
5601 if (!firstChild) t << ",\n";
5602 firstChild=FALSE;
5603 QCString url = entry->url();
5604 if (isURL(url)) url = "^" + url;
5605 t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\""
5606 << convertToJSString(url) << "\"";
5607 bool hasChildren=FALSE;
5608 if (entry->kind()==LayoutNavEntry::ModuleMembers)
5609 {
5610 auto numDoc = [](std::size_t i) {
5612 };
5613 auto memList = [](std::size_t i) {
5615 };
5616 renderMemberIndicesAsJs(t,numDoc,memList,getMmhlInfo,static_cast<std::size_t>(ModuleMemberHighlight::Total));
5617 }
5618 if (entry->kind()==LayoutNavEntry::NamespaceMembers)
5619 {
5620 auto numDoc = [](std::size_t i) {
5622 };
5623 auto memList = [](std::size_t i) {
5625 };
5626 renderMemberIndicesAsJs(t,numDoc,memList,getNmhlInfo,static_cast<std::size_t>(NamespaceMemberHighlight::Total));
5627 }
5628 else if (entry->kind()==LayoutNavEntry::ClassMembers)
5629 {
5630 auto numDoc = [](std::size_t i) {
5632 };
5633 auto memList = [](std::size_t i) {
5635 };
5636 renderMemberIndicesAsJs(t,numDoc,memList,getCmhlInfo,static_cast<std::size_t>(ClassMemberHighlight::Total));
5637 }
5638 else if (entry->kind()==LayoutNavEntry::FileGlobals)
5639 {
5640 auto numDoc = [](std::size_t i) {
5642 };
5643 auto memList = [](std::size_t i) {
5645 };
5646 renderMemberIndicesAsJs(t,numDoc,memList,getFmhlInfo,static_cast<std::size_t>(FileMemberHighlight::Total));
5647 }
5648 else // recursive into child list
5649 {
5650 hasChildren = renderQuickLinksAsJs(t,entry.get(),FALSE);
5651 }
5652 if (hasChildren) t << "]";
5653 t << "}";
5654 }
5655 }
5656 }
5657 return count>0;
5658}
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:2685
static bool renderQuickLinksAsJs(std::ostream &t, LayoutNavEntry *root, bool first)
Definition index.cpp:5585
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:5525
static const FmhlInfo * getFmhlInfo(size_t hl)
Definition index.cpp:3267
static const MmhlInfo * getMmhlInfo(size_t hl)
Definition index.cpp:3632
static const NmhlInfo * getNmhlInfo(size_t hl)
Definition index.cpp:3448
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:6391

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, bool extraTabs=false)
Definition outputlist.h:613

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

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

◆ startIndexHierarchy()

◆ startQuickIndexItem()

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

Definition at line 364 of file index.cpp.

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

References FALSE, and OutputList::writeString().

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

◆ startQuickIndexList()

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

Definition at line 345 of file index.cpp.

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

References FALSE, and OutputList::writeString().

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

◆ startTitle()

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

Definition at line 384 of file index.cpp.

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

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
Definition types.h:207
std::string convertUTF8ToUpper(const std::string &input)
Converts the input string into a upper case version, also taking into account non-ASCII characters th...
Definition utf8.cpp:192
std::string getUTF8CharAt(const std::string &input, size_t pos)
Returns the UTF8 character found at byte position pos in the input string.
Definition utf8.cpp:127
void extractNamespaceName(const QCString &scopeName, QCString &className, QCString &namespaceName, bool allowEmptyClass)
Definition util.cpp:4206
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Returns the scope separator to use given the programming language lang.
Definition util.cpp:6375
int getPrefixIndex(const QCString &name)
Definition util.cpp:3745

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

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

◆ writeAlphabeticalExceptionIndex()

void writeAlphabeticalExceptionIndex ( OutputList & ol)
static

Definition at line 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()

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

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

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

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

Referenced by writeAnnotatedIndexGeneric().

◆ writeAnnotatedExceptionIndex()

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

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

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

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

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

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

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

void writeClassMemberIndex ( OutputList & ol)
static

Definition at line 3230 of file index.cpp.

3231{
3232 const auto &index = Index::instance();
3233 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3234 bool addToIndex = lne==nullptr || lne->visible();
3235
3236 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3237 {
3238 Doxygen::indexList->addContentsItem(TRUE,lne ? lne->title() : theTranslator->trCompoundMembers(),QCString(),"functions",QCString());
3239 Doxygen::indexList->incContentsDepth();
3240 }
3250 if (index.numDocumentedClassMembers(ClassMemberHighlight::All)>0 && addToIndex)
3251 {
3252 Doxygen::indexList->decContentsDepth();
3253 }
3254
3255}
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()

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 dynamicMenus = Config_getBool(HTML_DYNAMIC_MENUS);
3111 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
3112
3113 bool multiPageIndex=FALSE;
3114 if (index.numDocumentedClassMembers(hl)>MAX_ITEMS_BEFORE_MULTIPAGE_INDEX)
3115 {
3116 multiPageIndex=TRUE;
3117 }
3118
3119 ol.pushGeneratorState();
3121
3123 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassMembers);
3124 QCString title = lne ? lne->title() : theTranslator->trCompoundMembers();
3125 if (hl!=ClassMemberHighlight::All) title+=QCString(" - ")+getCmhlInfo(hl)->title;
3126 bool addToIndex = lne==nullptr || lne->visible();
3127
3128 if (addToIndex)
3129 {
3130 Doxygen::indexList->addContentsItem(multiPageIndex,getCmhlInfo(hl)->title,QCString(),
3131 getCmhlInfo(hl)->fname,QCString(),multiPageIndex,TRUE);
3132 if (multiPageIndex) Doxygen::indexList->incContentsDepth();
3133 }
3134
3135 bool first=TRUE;
3136 for (const auto &[letter,list] : index.isClassIndexLetterUsed(hl))
3137 {
3138 QCString fileName = getCmhlInfo(hl)->fname;
3139 if (multiPageIndex)
3140 {
3141 QCString cs(letter);
3142 if (!first)
3143 {
3144 fileName+="_"+letterToLabel(cs);
3145 }
3146 if (addToIndex)
3147 {
3148 Doxygen::indexList->addContentsItem(FALSE,cs,QCString(),fileName,QCString(),FALSE,TRUE);
3149 }
3150 }
3151
3152 bool quickIndex = index.numDocumentedClassMembers(hl)>maxItemsBeforeQuickIndex;
3153
3154 auto writeQuickLinks = [&,cap_letter=letter]()
3155 {
3157 if (!dynamicMenus)
3158 {
3160
3161 // index item for global member list
3164 ol.writeString(fixSpaces(getCmhlInfo(0)->title));
3166
3167 // index items per category member lists
3168 for (int i=1;i<ClassMemberHighlight::Total;i++)
3169 {
3170 if (index.numDocumentedClassMembers(static_cast<ClassMemberHighlight::Enum>(i))>0)
3171 {
3173 ol.writeString(fixSpaces(getCmhlInfo(i)->title));
3174 //printf("multiPageIndex=%d first=%d fileName=%s file=%s title=%s\n",
3175 // multiPageIndex,first,qPrint(fileName),getCmhlInfo(i)->fname,qPrint(getCmhlInfo(i)->title));
3177 }
3178 }
3179
3181
3182 // quick alphabetical index
3183 if (quickIndex)
3184 {
3185 writeQuickMemberIndex(ol,index.isClassIndexLetterUsed(hl),cap_letter,
3186 getCmhlInfo(hl)->fname,multiPageIndex);
3187 }
3188
3189 ol.writeString("</div><!-- main-nav -->\n");
3190 }
3191 };
3192
3193 ol.startFile(fileName+extension,QCString(),title);
3194 ol.startQuickIndices();
3195 if (!disableIndex && !quickLinksAfterSplitbar)
3196 {
3197 writeQuickLinks();
3198 }
3199 ol.endQuickIndices();
3200 ol.writeSplitBar(fileName);
3201 if (quickLinksAfterSplitbar)
3202 {
3203 writeQuickLinks();
3204 if (!dynamicMenus)
3205 {
3206 ol.writeString("<div id=\"doc-content\">\n");
3207 }
3208 }
3209 ol.writeSearchInfo();
3210
3211 ol.startContents();
3212
3213 ol.startTextBlock();
3214 ol.parseText(hl == ClassMemberHighlight::All && lne ? lne->intro() : theTranslator->trCompoundMembersDescriptionTotal(hl));
3215 ol.endTextBlock();
3216
3217 writeMemberList(ol,quickIndex,
3218 multiPageIndex ? letter : std::string(),
3219 index.isClassIndexLetterUsed(hl),
3221 endFile(ol);
3222 first=FALSE;
3223 }
3224
3225 if (multiPageIndex && addToIndex) Doxygen::indexList->decContentsDepth();
3226
3227 ol.popGeneratorState();
3228}
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>
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, and writeClassTree().

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

◆ writeClassTreeForList()

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

Definition at line 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, and writeClassTreeToOutput().

Referenced by writeClassHierarchy().

◆ writeClassTreeInsideNamespace() [1/2]

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

Definition at line 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]

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

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, writeClassTree(), and writeClassTreeInsideNamespace().

Referenced by writeClassTreeInsideNamespace(), and writeClassTreeInsideNamespace().

◆ writeClassTreeToOutput()

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

Generates HTML Help tree of classes

Definition at line 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;
622 if (cd->getLanguage()==SrcLangExt::VHDL && VhdlDocGen::convert(cd->protection())!=VhdlDocGen::ENTITYCLASS)
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, and writeClassTreeToOutput().

Referenced by writeClassTreeForList(), and writeClassTreeToOutput().

◆ writeConceptIndex()

void writeConceptIndex ( OutputList & ol)
static

Definition at line 4647 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeConceptList()

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

Definition at line 4541 of file index.cpp.

4542{
4543 for (const auto &cd : concepts)
4544 {
4545 if (cd->isLinkableInProject())
4546 {
4547 if (ftv)
4548 {
4549 ftv->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4550 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty(),cd);
4551 }
4552 if (addToIndex)
4553 {
4554 Doxygen::indexList->addContentsItem(false,cd->displayName(FALSE),cd->getReference(),
4555 cd->getOutputFileBase(),QCString(),false,cd->partOfGroups().empty());
4556 }
4557 }
4558 }
4559}

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

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

◆ writeConceptRootList()

void writeConceptRootList ( FTVHelp * ftv,
bool addToIndex )
static

Definition at line 4625 of file index.cpp.

4626{
4627 for (const auto &cd : *Doxygen::conceptLinkedMap)
4628 {
4629 if ((cd->getOuterScope()==nullptr ||
4630 cd->getOuterScope()==Doxygen::globalScope) && cd->isLinkableInProject()
4631 )
4632 {
4633 //printf("*** adding %s hasSubPages=%d hasSections=%d\n",qPrint(pageTitle),hasSubPages,hasSections);
4634 ftv->addContentsItem(
4635 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4636 QCString(),false,cd->partOfGroups().empty(),cd.get());
4637 if (addToIndex)
4638 {
4639 Doxygen::indexList->addContentsItem(
4640 false,cd->localName(),cd->getReference(),cd->getOutputFileBase(),
4641 QCString(),false,cd->partOfGroups().empty(),cd.get());
4642 }
4643 }
4644 }
4645}

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

Referenced by writeConceptIndex().

◆ writeConceptTreeInsideNamespace()

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

Definition at line 4564 of file index.cpp.

4566{
4567 for (const auto &nd : nsLinkedMap)
4568 {
4569 writeConceptTreeInsideNamespaceElement(nd,ftv,rootOnly,addToIndex);
4570 }
4571}

References writeConceptTreeInsideNamespaceElement().

Referenced by writeConceptTreeInsideNamespaceElement().

◆ writeConceptTreeInsideNamespaceElement()

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

Definition at line 4574 of file index.cpp.

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

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

Referenced by writeConceptIndex(), and writeConceptTreeInsideNamespace().

◆ writeDirHierarchy()

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

Definition at line 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()

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

void writeExampleIndex ( OutputList & ol)
static

Definition at line 3800 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeFileIndex()

void writeFileIndex ( OutputList & ol)
static

Definition at line 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:1888
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()

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

void writeFileMemberIndex ( OutputList & ol)
static

Definition at line 3413 of file index.cpp.

3414{
3415 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::FileGlobals);
3416 bool addToIndex = lne==nullptr || lne->visible();
3417 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3418 {
3419 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trFileMembers(),QCString(),"globals",QCString());
3420 Doxygen::indexList->incContentsDepth();
3421 }
3431 if (Index::instance().numDocumentedFileMembers(FileMemberHighlight::All)>0 && addToIndex)
3432 {
3433 Doxygen::indexList->decContentsDepth();
3434 }
3435
3436}
static void writeFileMemberIndexFiltered(OutputList &ol, FileMemberHighlight::Enum hl)
Definition index.cpp:3290

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

Referenced by writeIndexHierarchyEntries().

◆ writeFileMemberIndexFiltered()

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

Definition at line 3290 of file index.cpp.

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

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

Referenced by writeFileMemberIndex().

◆ writeGraphicalClassHierarchy()

void writeGraphicalClassHierarchy ( OutputList & ol)
static

Definition at line 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()

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

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

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

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

Referenced by generateOutput().

◆ writeGroupHierarchy()

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

Definition at line 4309 of file index.cpp.

4310{
4311 if (ftv)
4312 {
4313 ol.pushGeneratorState();
4315 }
4316 startIndexHierarchy(ol,0);
4317 for (const auto &gd : *Doxygen::groupLinkedMap)
4318 {
4319 if (gd->isVisibleInHierarchy())
4320 {
4321 writeGroupTreeNode(ol,gd.get(),0,ftv,addToIndex);
4322 }
4323 }
4324 endIndexHierarchy(ol,0);
4325 if (ftv)
4326 {
4327 ol.popGeneratorState();
4328 }
4329}
static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4079

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

Referenced by writeTopicIndex().

◆ writeGroupTreeNode()

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

write groups as hierarchical trees

Definition at line 4079 of file index.cpp.

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

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

Referenced by writeGroupHierarchy(), and writeGroupTreeNode().

◆ writeHierarchicalExceptionIndex()

void writeHierarchicalExceptionIndex ( OutputList & ol)
static

Definition at line 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()

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

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

void writeIndex ( OutputList & ol)
static

Definition at line 4790 of file index.cpp.

4791{
4792 bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
4793 bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL);
4794 bool disableIndex = Config_getBool(DISABLE_INDEX);
4795 bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
4796 bool fullSidebar = Config_getBool(FULL_SIDEBAR);
4797 QCString projectName = Config_getString(PROJECT_NAME);
4798 // save old generator state
4799 ol.pushGeneratorState();
4800
4801 QCString projPrefix;
4802 if (!projectName.isEmpty())
4803 {
4804 projPrefix=projectName+" ";
4805 }
4806
4807 //--------------------------------------------------------------------
4808 // write HTML index
4809 //--------------------------------------------------------------------
4811
4812 QCString defFileName =
4813 Doxygen::mainPage ? Doxygen::mainPage->docFile() : QCString("[generated]");
4814 int defLine =
4815 Doxygen::mainPage ? Doxygen::mainPage->docLine() : -1;
4816
4817 QCString title;
4818 if (!mainPageHasTitle())
4819 {
4820 title = theTranslator->trMainPage();
4821 }
4822 else if (Doxygen::mainPage)
4823 {
4824 title = filterTitle(Doxygen::mainPage->title());
4825 }
4826
4827 QCString indexName="index";
4828 ol.startFile(indexName,QCString(),title);
4829
4831 {
4832 bool hasSubs = Doxygen::mainPage->hasSubPages() || Doxygen::mainPage->hasSections();
4833 bool hasTitle = !projectName.isEmpty() && mainPageHasTitle() && qstricmp(title,projectName)!=0;
4834 //printf("** mainPage title=%s hasTitle=%d hasSubs=%d\n",qPrint(title),hasTitle,hasSubs);
4835 if (hasTitle) // to avoid duplicate entries in the treeview
4836 {
4837 Doxygen::indexList->addContentsItem(hasSubs,
4838 title,
4839 QCString(),
4840 indexName,
4841 QCString(),
4842 hasSubs,
4843 TRUE);
4844 }
4845 if (hasSubs)
4846 {
4847 writePages(Doxygen::mainPage.get(),nullptr);
4848 }
4849 }
4850
4851 bool quickLinksAfterSplitbar = !disableIndex && generateTreeView && fullSidebar;
4852 ol.startQuickIndices();
4853 if (!disableIndex && !quickLinksAfterSplitbar)
4854 {
4856 }
4857 ol.endQuickIndices();
4858 ol.writeSplitBar(indexName);
4859 if (quickLinksAfterSplitbar)
4860 {
4862 }
4863 ol.writeSearchInfo();
4864 bool headerWritten=FALSE;
4866 {
4867 if (!Doxygen::mainPage->title().isEmpty())
4868 {
4869 if (Doxygen::mainPage->title().lower() != "notitle")
4870 ol.startPageDoc(Doxygen::mainPage->title());
4871 else
4872 ol.startPageDoc("");
4873 }
4874 else
4875 ol.startPageDoc(projectName);
4876 }
4877 if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty())
4878 {
4879 if (Doxygen::mainPage->title().lower()!="notitle")
4880 {
4881 ol.startHeaderSection();
4883 ol.generateDoc(Doxygen::mainPage->docFile(),Doxygen::mainPage->getStartBodyLine(),
4884 Doxygen::mainPage.get(),nullptr,Doxygen::mainPage->title(),false,false,
4885 QCString(),true,false,Config_getBool(MARKDOWN_SUPPORT));
4886 headerWritten = TRUE;
4887 }
4888 }
4889 else
4890 {
4891 if (!projectName.isEmpty())
4892 {
4893 ol.startHeaderSection();
4895 ol.parseText(theTranslator->trDocumentation(projectName));
4896 headerWritten = TRUE;
4897 }
4898 }
4899 if (headerWritten)
4900 {
4902 ol.endHeaderSection();
4903 }
4904
4905 ol.startContents();
4906 if (Config_getBool(DISABLE_INDEX) && Doxygen::mainPage==nullptr)
4907 {
4909 }
4910
4912 {
4913 if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
4914 {
4915 Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
4916 }
4917
4918 ol.startTextBlock();
4919 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,
4920 Doxygen::mainPage->documentation(),true,false,
4921 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4922 ol.endTextBlock();
4923 ol.endPageDoc();
4924 }
4925
4928 ol.writeString("<a href=\"" + fn + "\"></a>\n");
4929 Doxygen::indexList->addIndexFile(fn);
4930
4931 endFile(ol);
4932
4934
4935 //--------------------------------------------------------------------
4936 // write LaTeX/RTF index
4937 //--------------------------------------------------------------------
4941
4943 {
4944 msg("Generating main page...\n");
4945 Doxygen::mainPage->writeDocumentation(ol);
4946 }
4947
4948 ol.startFile("refman",QCString(),QCString());
4952
4953 if (projPrefix.isEmpty())
4954 {
4955 ol.parseText(theTranslator->trReferenceManual());
4956 }
4957 else
4958 {
4959 ol.parseText(projPrefix);
4960 }
4961
4962 if (!Config_getString(PROJECT_NUMBER).isEmpty())
4963 {
4964 ol.startProjectNumber();
4965 ol.generateDoc(defFileName,defLine,Doxygen::mainPage.get(),nullptr,Config_getString(PROJECT_NUMBER),false,false,
4966 QCString(),false,false,Config_getBool(MARKDOWN_SUPPORT));
4967 ol.endProjectNumber();
4968 }
4971 ol.parseText(theTranslator->trGeneratedBy());
4975
4976 ol.lastIndexPage();
4978 {
4981 }
4982 const auto &index = Index::instance();
4983 if (index.numDocumentedPages()>0)
4984 {
4987 }
4988
4990 if (!Config_getBool(LATEX_HIDE_INDICES))
4991 {
4992 //if (indexedPages>0)
4993 //{
4994 // ol.startIndexSection(isPageIndex);
4995 // ol.parseText(/*projPrefix+*/ theTranslator->trPageIndex());
4996 // ol.endIndexSection(isPageIndex);
4997 //}
4998 if (index.numDocumentedModules()>0)
4999 {
5001 ol.parseText(/*projPrefix+*/ theTranslator->trModuleIndex());
5003 }
5004 if (index.numDocumentedGroups()>0)
5005 {
5007 ol.parseText(/*projPrefix+*/ theTranslator->trTopicIndex());
5009 }
5010 if (Config_getBool(SHOW_NAMESPACES) && (index.numDocumentedNamespaces()>0))
5011 {
5012 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces);
5013 if (lne)
5014 {
5016 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModulesIndex():theTranslator->trNamespaceIndex()));
5018 }
5019 }
5020 if (index.numDocumentedConcepts()>0)
5021 {
5023 ol.parseText(/*projPrefix+*/theTranslator->trConceptIndex());
5025 }
5026 if (index.numHierarchyInterfaces()>0)
5027 {
5029 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5031 }
5032 if (index.numHierarchyClasses()>0)
5033 {
5034 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassHierarchy);
5035 if (lne)
5036 {
5038 ol.parseText(/*projPrefix+*/
5039 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5040 vhdlOpt ? theTranslator->trHierarchicalIndex() :
5041 theTranslator->trHierarchicalIndex()
5042 ));
5044 }
5045 }
5046 if (index.numHierarchyExceptions()>0)
5047 {
5049 ol.parseText(/*projPrefix+*/theTranslator->trHierarchicalIndex());
5051 }
5052 if (index.numAnnotatedInterfacesPrinted()>0)
5053 {
5055 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceIndex());
5057 }
5058 if (index.numAnnotatedClassesPrinted()>0)
5059 {
5061 ol.parseText(/*projPrefix+*/
5062 (fortranOpt ? theTranslator->trCompoundIndexFortran() :
5063 vhdlOpt ? theTranslator->trDesignUnitIndex() :
5064 theTranslator->trCompoundIndex()
5065 ));
5067 }
5068 if (index.numAnnotatedStructsPrinted()>0)
5069 {
5071 ol.parseText(/*projPrefix+*/theTranslator->trStructIndex());
5073 }
5074 if (index.numAnnotatedExceptionsPrinted()>0)
5075 {
5077 ol.parseText(/*projPrefix+*/theTranslator->trExceptionIndex());
5079 }
5080 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5081 {
5083 ol.parseText(/*projPrefix+*/theTranslator->trFileIndex());
5085 }
5086 }
5088
5089 if (index.numDocumentedModules()>0)
5090 {
5092 ol.parseText(/*projPrefix+*/theTranslator->trModuleDocumentation());
5094 }
5095 if (index.numDocumentedGroups()>0)
5096 {
5098 ol.parseText(/*projPrefix+*/theTranslator->trTopicDocumentation());
5100 }
5101 if (index.numDocumentedNamespaces()>0)
5102 {
5104 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trModuleDocumentation():theTranslator->trNamespaceDocumentation()));
5106 }
5107 if (index.numDocumentedConcepts()>0)
5108 {
5110 ol.parseText(/*projPrefix+*/theTranslator->trConceptDocumentation());
5112 }
5113 if (index.numAnnotatedInterfacesPrinted()>0)
5114 {
5116 ol.parseText(/*projPrefix+*/theTranslator->trInterfaceDocumentation());
5118 }
5119 if (index.numAnnotatedClassesPrinted()>0)
5120 {
5122 ol.parseText(/*projPrefix+*/(fortranOpt?theTranslator->trTypeDocumentation():theTranslator->trClassDocumentation()));
5124 }
5125 if (index.numAnnotatedStructsPrinted()>0)
5126 {
5128 ol.parseText(/*projPrefix+*/theTranslator->trStructDocumentation());
5130 }
5131 if (index.numAnnotatedExceptionsPrinted()>0)
5132 {
5134 ol.parseText(/*projPrefix+*/theTranslator->trExceptionDocumentation());
5136 }
5137 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0)
5138 {
5140 ol.parseText(/*projPrefix+*/theTranslator->trFileDocumentation());
5142 }
5143 if (!Doxygen::exampleLinkedMap->empty())
5144 {
5146 ol.parseText(/*projPrefix+*/theTranslator->trExamples());
5148 }
5150 endFile(ol);
5151
5152 ol.popGeneratorState();
5153}
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:5408

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

5677{
5678 writeMenuData();
5680 if (lne)
5681 {
5683 }
5684}
static void writeIndexHierarchyEntries(OutputList &ol, const LayoutNavEntryList &entries)
Definition index.cpp:5157
static void writeMenuData()
Definition index.cpp:5660

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

Referenced by generateOutput().

◆ writeIndexHierarchyEntries()

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

Definition at line 5157 of file index.cpp.

5158{
5159 auto isRef = [](const QCString &s)
5160 {
5161 return s.startsWith("@ref") || s.startsWith("\\ref");
5162 };
5163 bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE);
5164 const auto &index = Index::instance();
5165 for (const auto &lne : entries)
5166 {
5167 LayoutNavEntry::Kind kind = lne->kind();
5168 size_t idx = static_cast<size_t>(kind);
5169 if (idx>=indexWritten.size())
5170 {
5171 size_t oldSize = indexWritten.size();
5172 size_t newSize = idx+1;
5173 indexWritten.resize(newSize);
5174 for (size_t i=oldSize; i<newSize; i++) indexWritten.at(i)=FALSE;
5175 }
5176 //printf("starting %s kind=%d\n",qPrint(lne->title()),lne->kind());
5177 bool addToIndex=lne->visible();
5178 bool needsClosing=FALSE;
5179 if (!indexWritten.at(idx))
5180 {
5181 switch(kind)
5182 {
5183 case LayoutNavEntry::MainPage:
5184 msg("Generating index page...\n");
5185 writeIndex(ol);
5186 break;
5187 case LayoutNavEntry::Pages:
5188 msg("Generating page index...\n");
5189 writePageIndex(ol);
5190 break;
5191 case LayoutNavEntry::Topics:
5192 msg("Generating topic index...\n");
5193 writeTopicIndex(ol);
5194 break;
5195 case LayoutNavEntry::Modules:
5196 {
5197 if (index.numDocumentedModules()>0 && addToIndex)
5198 {
5199 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5200 Doxygen::indexList->incContentsDepth();
5201 needsClosing=TRUE;
5202 }
5203 }
5204 break;
5205 case LayoutNavEntry::ModuleList:
5206 msg("Generating module index...\n");
5207 writeModuleIndex(ol);
5208 break;
5209 case LayoutNavEntry::ModuleMembers:
5210 msg("Generating module member index...\n");
5212 break;
5213 case LayoutNavEntry::Namespaces:
5214 {
5215 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5216 if (showNamespaces)
5217 {
5218 if (index.numDocumentedNamespaces()>0 && addToIndex)
5219 {
5220 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5221 Doxygen::indexList->incContentsDepth();
5222 needsClosing=TRUE;
5223 }
5224 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Namespaces)!=lne.get()) // for backward compatibility with old layout file
5225 {
5226 msg("Generating namespace index...\n");
5228 }
5229 }
5230 }
5231 break;
5232 case LayoutNavEntry::NamespaceList:
5233 {
5234 bool showNamespaces = Config_getBool(SHOW_NAMESPACES);
5235 if (showNamespaces)
5236 {
5237 msg("Generating namespace index...\n");
5239 }
5240 }
5241 break;
5242 case LayoutNavEntry::NamespaceMembers:
5243 msg("Generating namespace member index...\n");
5245 break;
5246 case LayoutNavEntry::Classes:
5247 if (index.numAnnotatedClasses()>0 && addToIndex)
5248 {
5249 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5250 Doxygen::indexList->incContentsDepth();
5251 needsClosing=TRUE;
5252 }
5253 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Classes)!=lne.get()) // for backward compatibility with old layout file
5254 {
5255 msg("Generating annotated compound index...\n");
5257 }
5258 break;
5259 case LayoutNavEntry::Concepts:
5260 msg("Generating concept index...\n");
5262 break;
5263 case LayoutNavEntry::ClassList:
5264 msg("Generating annotated compound index...\n");
5266 break;
5267 case LayoutNavEntry::ClassIndex:
5268 msg("Generating alphabetical compound index...\n");
5270 break;
5271 case LayoutNavEntry::ClassHierarchy:
5272 msg("Generating hierarchical class index...\n");
5274 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5275 {
5276 msg("Generating graphical class hierarchy...\n");
5278 }
5279 break;
5280 case LayoutNavEntry::ClassMembers:
5281 if (!sliceOpt)
5282 {
5283 msg("Generating member index...\n");
5285 }
5286 break;
5287 case LayoutNavEntry::Interfaces:
5288 if (sliceOpt && index.numAnnotatedInterfaces()>0 && addToIndex)
5289 {
5290 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5291 Doxygen::indexList->incContentsDepth();
5292 needsClosing=TRUE;
5293 }
5294 break;
5295 case LayoutNavEntry::InterfaceList:
5296 if (sliceOpt)
5297 {
5298 msg("Generating annotated interface index...\n");
5300 }
5301 break;
5302 case LayoutNavEntry::InterfaceIndex:
5303 if (sliceOpt)
5304 {
5305 msg("Generating alphabetical interface index...\n");
5307 }
5308 break;
5309 case LayoutNavEntry::InterfaceHierarchy:
5310 if (sliceOpt)
5311 {
5312 msg("Generating hierarchical interface index...\n");
5314 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5315 {
5316 msg("Generating graphical interface hierarchy...\n");
5318 }
5319 }
5320 break;
5321 case LayoutNavEntry::Structs:
5322 if (sliceOpt && index.numAnnotatedStructs()>0 && addToIndex)
5323 {
5324 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5325 Doxygen::indexList->incContentsDepth();
5326 needsClosing=TRUE;
5327 }
5328 break;
5329 case LayoutNavEntry::StructList:
5330 if (sliceOpt)
5331 {
5332 msg("Generating annotated struct index...\n");
5334 }
5335 break;
5336 case LayoutNavEntry::StructIndex:
5337 if (sliceOpt)
5338 {
5339 msg("Generating alphabetical struct index...\n");
5341 }
5342 break;
5343 case LayoutNavEntry::Exceptions:
5344 if (sliceOpt && index.numAnnotatedExceptions()>0 && addToIndex)
5345 {
5346 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5347 Doxygen::indexList->incContentsDepth();
5348 needsClosing=TRUE;
5349 }
5350 break;
5351 case LayoutNavEntry::ExceptionList:
5352 if (sliceOpt)
5353 {
5354 msg("Generating annotated exception index...\n");
5356 }
5357 break;
5358 case LayoutNavEntry::ExceptionIndex:
5359 if (sliceOpt)
5360 {
5361 msg("Generating alphabetical exception index...\n");
5363 }
5364 break;
5365 case LayoutNavEntry::ExceptionHierarchy:
5366 if (sliceOpt)
5367 {
5368 msg("Generating hierarchical exception index...\n");
5370 if (Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY))
5371 {
5372 msg("Generating graphical exception hierarchy...\n");
5374 }
5375 }
5376 break;
5377 case LayoutNavEntry::Files:
5378 {
5379 if (Config_getBool(SHOW_FILES) && index.numDocumentedFiles()>0 && addToIndex)
5380 {
5381 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString());
5382 Doxygen::indexList->incContentsDepth();
5383 needsClosing=TRUE;
5384 }
5385 if (LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::Files)!=lne.get()) // for backward compatibility with old layout file
5386 {
5387 msg("Generating file index...\n");
5388 writeFileIndex(ol);
5389 }
5390 }
5391 break;
5392 case LayoutNavEntry::FileList:
5393 msg("Generating file index...\n");
5394 writeFileIndex(ol);
5395 break;
5396 case LayoutNavEntry::FileGlobals:
5397 msg("Generating file member index...\n");
5399 break;
5400 case LayoutNavEntry::Examples:
5401 msg("Generating example index...\n");
5403 break;
5404 case LayoutNavEntry::User:
5405 if (addToIndex)
5406 {
5407 // prepend a ! or ^ marker to the URL to avoid tampering with it
5408 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5409 bool isRelative=url.at(0)=='!';
5410 if (!url.isEmpty() && !isRelative) // absolute URL
5411 {
5412 url.prepend("^"); // prepend ^ to absolute URL
5413 }
5414 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5415 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5416 }
5417 break;
5418 case LayoutNavEntry::UserGroup:
5419 if (addToIndex)
5420 {
5421 QCString url = correctURL(lne->url(),"!"); // add ! to relative URL
5422 if (!url.isEmpty())
5423 {
5424 if (url=="!") // result of a "[none]" url
5425 {
5426 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),QCString(),QCString(),FALSE,FALSE);
5427 }
5428 else
5429 {
5430 bool isRelative=url.at(0)=='!';
5431 if (!isRelative) // absolute URL
5432 {
5433 url.prepend("^"); // prepend ^ to absolute URL
5434 }
5435 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),
5436 url,QCString(),FALSE,isRef(lne->baseFile()) || isRelative);
5437 }
5438 }
5439 else
5440 {
5441 Doxygen::indexList->addContentsItem(TRUE,lne->title(),QCString(),lne->baseFile(),QCString(),TRUE,TRUE);
5442 }
5443 Doxygen::indexList->incContentsDepth();
5444 needsClosing=TRUE;
5445 }
5446 writeUserGroupStubPage(ol,lne.get());
5447 break;
5448 case LayoutNavEntry::None:
5449 assert(kind != LayoutNavEntry::None); // should never happen, means not properly initialized
5450 break;
5451 }
5452 if (kind!=LayoutNavEntry::User && kind!=LayoutNavEntry::UserGroup) // User entry may appear multiple times
5453 {
5454 indexWritten.at(idx)=TRUE;
5455 }
5456 }
5457 writeIndexHierarchyEntries(ol,lne->children());
5458 if (needsClosing)
5459 {
5460 switch(kind)
5461 {
5462 case LayoutNavEntry::Modules:
5463 case LayoutNavEntry::Namespaces:
5464 case LayoutNavEntry::Classes:
5465 case LayoutNavEntry::Files:
5466 case LayoutNavEntry::UserGroup:
5467 Doxygen::indexList->decContentsDepth();
5468 break;
5469 default:
5470 break;
5471 }
5472 }
5473 //printf("ending %s kind=%d\n",qPrint(lne->title()),lne->kind());
5474 }
5475}
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:3230
static std::vector< bool > indexWritten
Definition index.cpp:5155
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:3954
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:4753
static void writeTopicIndex(OutputList &ol)
Definition index.cpp:4333
static void writeModuleMemberIndex(OutputList &ol)
Definition index.cpp:3775
static void writeGraphicalExceptionHierarchy(OutputList &ol)
Definition index.cpp:1410
static void writeExampleIndex(OutputList &ol)
Definition index.cpp:3800
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:4647
static void writeModuleIndex(OutputList &ol)
Definition index.cpp:4473
static void writeIndex(OutputList &ol)
Definition index.cpp:4790
static void writeHierarchicalExceptionIndex(OutputList &ol)
Definition index.cpp:1331
static void writeNamespaceMemberIndex(OutputList &ol)
Definition index.cpp:3596
static void writeHierarchicalIndex(OutputList &ol)
Definition index.cpp:1119
static void writeFileMemberIndex(OutputList &ol)
Definition index.cpp:3413
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:6403

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

Referenced by writeIndexHierarchy(), and writeIndexHierarchyEntries().

◆ writeMemberList()

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

Definition at line 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()

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

void writeMenuData ( )
static

Definition at line 5660 of file index.cpp.

5661{
5662 if (!Config_getBool(GENERATE_HTML) || Config_getBool(DISABLE_INDEX)) return;
5663 QCString outputDir = Config_getBool(HTML_OUTPUT);
5665 std::ofstream t = Portable::openOutputStream(outputDir+"/menudata.js");
5666 if (t.is_open())
5667 {
5669 t << "var menudata={";
5670 bool hasChildren = renderQuickLinksAsJs(t,root,TRUE);
5671 if (hasChildren) t << "]";
5672 t << "}\n";
5673 }
5674}
constexpr auto JAVASCRIPT_LICENSE_TEXT
Definition ftvhelp.h:71
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665

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

Referenced by writeIndexHierarchy().

◆ writeModuleIndex()

void writeModuleIndex ( OutputList & ol)
static

Definition at line 4473 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeModuleLinkForMember()

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

Definition at line 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()

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

Definition at line 4449 of file index.cpp.

4450{
4451 if (ftv)
4452 {
4453 ol.pushGeneratorState();
4455 }
4456 startIndexHierarchy(ol,0);
4457 for (const auto &mod : ModuleManager::instance().modules())
4458 {
4459 if (mod->isPrimaryInterface())
4460 {
4461 writeModuleTreeNode(ol,mod.get(),ftv,addToIndex);
4462 }
4463 }
4464 endIndexHierarchy(ol,0);
4465 if (ftv)
4466 {
4467 ol.popGeneratorState();
4468 }
4469}
static void writeModuleTreeNode(OutputList &ol, const ModuleDef *mod, FTVHelp *ftv, bool addToIndex)
Definition index.cpp:4402

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

Referenced by writeModuleIndex().

◆ writeModuleMemberIndex()

void writeModuleMemberIndex ( OutputList & ol)
static

Definition at line 3775 of file index.cpp.

3776{
3777 const auto &index = Index::instance();
3778 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ModuleMembers);
3779 bool addToIndex = lne==nullptr || lne->visible();
3780 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3781 {
3782 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trModulesMembers(),QCString(),"modulemembers",QCString());
3783 Doxygen::indexList->incContentsDepth();
3784 }
3785 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3792 if (index.numDocumentedModuleMembers(ModuleMemberHighlight::All)>0 && addToIndex)
3793 {
3794 Doxygen::indexList->decContentsDepth();
3795 }
3796}
static void writeModuleMemberIndexFiltered(OutputList &ol, ModuleMemberHighlight::Enum hl)
Definition index.cpp:3648

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

Referenced by writeIndexHierarchyEntries().

◆ writeModuleMemberIndexFiltered()

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

Definition at line 3648 of file index.cpp.

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

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

Referenced by writeModuleMemberIndex().

◆ writeModuleMembers()

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

Definition at line 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()

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

Definition at line 4402 of file index.cpp.

4404{
4405 int visibleMembers = mod->countVisibleMembers();
4406 bool isDir=visibleMembers>0;
4407 if (addToIndex)
4408 {
4409 Doxygen::indexList->addContentsItem(isDir,mod->name(),
4410 mod->getReference(),mod->getOutputFileBase(),QCString(),isDir,TRUE);
4411 }
4412 if (ftv)
4413 {
4414 ftv->addContentsItem(false,mod->name(),
4415 mod->getReference(),mod->getOutputFileBase(),QCString(),
4416 false,false,mod);
4417 }
4418 ol.startIndexListItem();
4420 ol.parseText(mod->qualifiedName());
4422 if (mod->isReference())
4423 {
4424 ol.startTypewriter();
4425 ol.docify(" [external]");
4426 ol.endTypewriter();
4427 }
4428 if (addToIndex && isDir)
4429 {
4430 Doxygen::indexList->incContentsDepth();
4431 }
4432 if (isDir)
4433 {
4434 //ftv->incContentsDepth();
4435 writeClassTree(mod->getClasses(),nullptr,addToIndex,FALSE,ClassDef::Class);
4436 writeConceptList(mod->getConcepts(),nullptr,addToIndex);
4437 writeModuleMembers(mod,addToIndex);
4438 //ftv->decContentsDepth();
4439 }
4440 if (addToIndex && isDir)
4441 {
4442 Doxygen::indexList->decContentsDepth();
4443 }
4444 ol.endIndexListItem();
4445}
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()

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

Referenced by writeIndexHierarchyEntries().

◆ writeNamespaceLinkForMember()

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

Definition at line 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()

void writeNamespaceMemberIndex ( OutputList & ol)
static

Definition at line 3596 of file index.cpp.

3597{
3598 const auto &index = Index::instance();
3599 LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::NamespaceMembers);
3600 bool addToIndex = lne==nullptr || lne->visible();
3601 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3602 {
3603 Doxygen::indexList->addContentsItem(true,lne ? lne->title() : theTranslator->trNamespaceMembers(),QCString(),"namespacemembers",QCString());
3604 Doxygen::indexList->incContentsDepth();
3605 }
3606 //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
3615 if (index.numDocumentedNamespaceMembers(NamespaceMemberHighlight::All)>0 && addToIndex)
3616 {
3617 Doxygen::indexList->decContentsDepth();
3618 }
3619
3620}
static void writeNamespaceMemberIndexFiltered(OutputList &ol, NamespaceMemberHighlight::Enum hl)
Definition index.cpp:3472

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

Referenced by writeIndexHierarchyEntries().

◆ writeNamespaceMemberIndexFiltered()

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

Definition at line 3472 of file index.cpp.

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

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

Referenced by writeNamespaceMemberIndex().

◆ writeNamespaceMembers()

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

Definition at line 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]

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]

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

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(), writeClassTree(), writeConceptList(), writeNamespaceMembers(), and writeNamespaceTree().

Referenced by writeNamespaceTree(), and writeNamespaceTree().

◆ writePageIndex()

void writePageIndex ( OutputList & ol)
static

Definition at line 3954 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writePages()

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

Definition at line 3894 of file index.cpp.

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

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

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

◆ writeQuickMemberIndex()

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

Definition at line 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()

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

void writeTopicIndex ( OutputList & ol)
static

Definition at line 4333 of file index.cpp.

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

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

Referenced by writeIndexHierarchyEntries().

◆ writeUserGroupStubPage()

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

Definition at line 4753 of file index.cpp.

4754{
4755 if (lne->baseFile().startsWith("usergroup"))
4756 {
4757 ol.pushGeneratorState();
4760 startTitle(ol,QCString());
4761 ol.parseText(lne->title());
4762 endTitle(ol,QCString(),QCString());
4763 ol.startContents();
4764 int count=0;
4765 for (const auto &entry: lne->children())
4766 {
4767 if (entry->visible()) count++;
4768 }
4769 if (count>0)
4770 {
4771 ol.writeString("<ul>\n");
4772 for (const auto &entry: lne->children())
4773 {
4774 if (entry->visible())
4775 {
4776 ol.writeString("<li><a href=\""+entry->url()+"\"><span>"+
4777 fixSpaces(entry->title())+"</span></a></li>\n");
4778 }
4779 }
4780 ol.writeString("</ul>\n");
4781 }
4782 endFile(ol);
4783 ol.popGeneratorState();
4784 }
4785}
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 5155 of file index.cpp.

Referenced by writeIndexHierarchyEntries().

◆ maxItemsBeforeQuickIndex