Doxygen
Loading...
Searching...
No Matches
index.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2021 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16#ifndef INDEX_H
17#define INDEX_H
18
19#include <memory>
20#include <vector>
21#include <map>
22#include "qcstring.h"
23#include "construct.h"
24
25class Definition;
26class OutputList;
28class NamespaceDef;
29class MemberDef;
30
57
96
97// Note: we can't use enum class for the enums below as they are also used as an array index,
98// so we wrap them in a namespace instead
99
101{
115} // namespace ClassMemberHighlight
116
118{
132} // namespace FileMemberHighlight
133
135{
148} // namespace NamespaceMemberHighlight
149
151{
162} // namespace ModuleMemberHighlight
163
164class Index
165{
166 public:
167 using MemberIndexList = std::vector<const MemberDef *>;
168 using MemberIndexMap = std::map<std::string,MemberIndexList>;
169
170 static Index &instance();
171
172 void countDataStructures();
173 void addClassMemberNameToIndex(const MemberDef *md);
174 void addFileMemberNameToIndex(const MemberDef *md);
175 void addNamespaceMemberNameToIndex(const MemberDef *md);
176 void addModuleMemberNameToIndex(const MemberDef *md);
178
179 // ---- getters
180 int numAnnotatedClasses() const;
181 int numAnnotatedClassesPrinted() const;
182 int numHierarchyClasses() const;
183 int numAnnotatedInterfaces() const;
185 int numHierarchyInterfaces() const;
186 int numAnnotatedStructs() const;
187 int numAnnotatedStructsPrinted() const;
188 int numAnnotatedExceptions() const;
190 int numHierarchyExceptions() const;
191 int numDocumentedGroups() const;
192 int numDocumentedNamespaces() const;
193 int numDocumentedConcepts() const;
194 int numDocumentedModules() const;
195 int numIndexedPages() const;
196 int numDocumentedFiles() const;
197 int numDocumentedPages() const;
198 int numDocumentedDirs() const;
207
208 private:
209 void resetDocumentedClassMembers(int i);
210 void resetDocumentedFileMembers(int i);
213 void incrementDocumentedClassMembers(int i,const std::string &letter,const MemberDef *md);
214 void incrementDocumentedFileMembers(int i,const std::string &letter,const MemberDef *md);
215 void incrementDocumentedNamespaceMembers(int i,const std::string &letter,const MemberDef *md);
216 void incrementDocumentedModuleMembers(int i,const std::string &letter,const MemberDef *md);
217 Index();
220 struct Private;
221 std::unique_ptr<Private> p;
222};
223
224void writeGraphInfo(OutputList &ol);
226void startTitle(OutputList &ol,const QCString &fileName,const DefinitionMutable *def=nullptr);
227void endTitle(OutputList &ol,const QCString &fileName,const QCString &name);
228void startFile(OutputList &ol,const QCString &name,const QCString &manName,
230 bool additionalIndices=FALSE,const QCString &altSidebarName=QCString(), int hierarchyLevel=0);
231void endFile(OutputList &ol,bool skipNavIndex=FALSE,bool skipEndContents=FALSE,
232 const QCString &navPath=QCString());
233void endFileWithNavPath(OutputList &ol,const Definition *d);
234
235#endif
The common base class of all entity definitions found in the sources.
Definition definition.h:76
void incrementDocumentedNamespaceMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:205
int numAnnotatedInterfacesPrinted() const
Definition index.cpp:116
void addClassMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2836
std::vector< const MemberDef * > MemberIndexList
Definition index.h:167
void resetDocumentedNamespaceMembers(int i)
Definition index.cpp:168
int numDocumentedFiles() const
Definition index.cpp:128
int numDocumentedNamespaces() const
Definition index.cpp:124
int numIndexedPages() const
Definition index.cpp:127
int numAnnotatedClassesPrinted() const
Definition index.cpp:113
int numDocumentedGroups() const
Definition index.cpp:123
void resetDocumentedModuleMembers(int i)
Definition index.cpp:174
int numDocumentedModules() const
Definition index.cpp:126
void incrementDocumentedFileMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:199
int numAnnotatedStructs() const
Definition index.cpp:118
int numDocumentedConcepts() const
Definition index.cpp:125
void addNamespaceMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2900
void resetDocumentedClassMembers(int i)
Definition index.cpp:156
int numAnnotatedStructsPrinted() const
Definition index.cpp:119
void incrementDocumentedClassMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:193
MemberIndexMap isClassIndexLetterUsed(ClassMemberHighlight::Enum e) const
Definition index.cpp:136
void addFileMemberNameToIndex(const MemberDef *md)
Definition index.cpp:2948
void incrementDocumentedModuleMembers(int i, const std::string &letter, const MemberDef *md)
Definition index.cpp:211
int numHierarchyInterfaces() const
Definition index.cpp:117
int numDocumentedClassMembers(ClassMemberHighlight::Enum e) const
Definition index.cpp:131
int numDocumentedModuleMembers(ModuleMemberHighlight::Enum e) const
Definition index.cpp:134
void addModuleMemberNameToIndex(const MemberDef *md)
Definition index.cpp:3000
int numDocumentedNamespaceMembers(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:133
int numDocumentedPages() const
Definition index.cpp:129
int numHierarchyExceptions() const
Definition index.cpp:122
int numAnnotatedExceptionsPrinted() const
Definition index.cpp:121
int numDocumentedFileMembers(FileMemberHighlight::Enum e) const
Definition index.cpp:132
int numAnnotatedExceptions() const
Definition index.cpp:120
MemberIndexMap isFileIndexLetterUsed(FileMemberHighlight::Enum e) const
Definition index.cpp:141
void sortMemberIndexLists()
Definition index.cpp:218
std::map< std::string, MemberIndexList > MemberIndexMap
Definition index.h:168
static Index & instance()
Definition index.cpp:106
void countDataStructures()
Definition index.cpp:262
int numHierarchyClasses() const
Definition index.cpp:114
MemberIndexMap isModuleIndexLetterUsed(ModuleMemberHighlight::Enum e) const
Definition index.cpp:151
void resetDocumentedFileMembers(int i)
Definition index.cpp:162
int numDocumentedDirs() const
Definition index.cpp:130
int numAnnotatedInterfaces() const
Definition index.cpp:115
Index()
Definition index.cpp:100
std::unique_ptr< Private > p
Definition index.h:221
int numAnnotatedClasses() const
Definition index.cpp:112
MemberIndexMap isNamespaceIndexLetterUsed(NamespaceMemberHighlight::Enum e) const
Definition index.cpp:146
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
An abstract interface of a namespace symbol.
Class representing a list of output generators that are written to in parallel.
Definition outputlist.h:314
This is an alternative implementation of QCString.
Definition qcstring.h:101
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
void writeGraphInfo(OutputList &ol)
Definition index.cpp:3946
void endTitle(OutputList &ol, const QCString &fileName, const QCString &name)
Definition index.cpp:395
void endFile(OutputList &ol, bool skipNavIndex=FALSE, bool skipEndContents=FALSE, const QCString &navPath=QCString())
Definition index.cpp:421
HighlightedItem
Definition index.h:59
@ AnnotatedExceptions
Definition index.h:76
@ InterfaceVisible
Definition index.h:89
@ InterfaceHierarchy
Definition index.h:66
@ AnnotatedInterfaces
Definition index.h:74
@ NamespaceMembers
Definition index.h:78
@ AnnotatedClasses
Definition index.h:73
@ AnnotatedStructs
Definition index.h:75
@ ExceptionVisible
Definition index.h:91
@ NamespaceVisible
Definition index.h:92
@ ExceptionHierarchy
Definition index.h:67
void startTitle(OutputList &ol, const QCString &fileName, const DefinitionMutable *def=nullptr)
Definition index.cpp:386
void writeIndexHierarchy(OutputList &ol)
Definition index.cpp:5587
IndexSection
Definition index.h:32
@ isMainPage
Definition index.h:35
@ isTitlePageAuthor
Definition index.h:34
@ isFileIndex
Definition index.h:43
@ isFileDocumentation
Definition index.h:51
@ isPageDocumentation
Definition index.h:53
@ isDirDocumentation
Definition index.h:47
@ isModuleDocumentation
Definition index.h:45
@ isClassHierarchyIndex
Definition index.h:41
@ isModuleIndex
Definition index.h:36
@ isTopicIndex
Definition index.h:37
@ isConceptIndex
Definition index.h:40
@ isExampleDocumentation
Definition index.h:52
@ isClassDocumentation
Definition index.h:49
@ isPageIndex
Definition index.h:44
@ isCompoundIndex
Definition index.h:42
@ isEndIndex
Definition index.h:55
@ isConceptDocumentation
Definition index.h:50
@ isDirIndex
Definition index.h:38
@ isNamespaceIndex
Definition index.h:39
@ isNamespaceDocumentation
Definition index.h:48
@ isTitlePageStart
Definition index.h:33
@ isTopicDocumentation
Definition index.h:46
@ isPageDocumentation2
Definition index.h:54
void startFile(OutputList &ol, const QCString &name, const QCString &manName, const QCString &title, HighlightedItem hli=HighlightedItem::None, bool additionalIndices=FALSE, const QCString &altSidebarName=QCString(), int hierarchyLevel=0)
Definition index.cpp:402
void endFileWithNavPath(OutputList &ol, const Definition *d)
Definition index.cpp:441
#define FALSE
Definition qcstring.h:34