Doxygen
doxygen.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 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 DOXYGEN_H
17 #define DOXYGEN_H
18 
19 #include "containers.h"
20 #include "membergroup.h"
21 #include "dirdef.h"
22 #include "memberlist.h"
23 #include "define.h"
24 #include "cache.h"
25 #include "symbolmap.h"
26 
27 #define THREAD_LOCAL thread_local
28 #define AtomicInt std::atomic_int
29 #define AtomicBool std::atomic_bool
30 
31 class RefList;
32 class PageLinkedMap;
33 class PageDef;
34 class SearchIndexIntf;
35 class ParserManager;
36 class BufStr;
37 class CiteDict;
38 class MemberDef;
39 class GroupDef;
40 class GroupLinkedMap;
41 class FileDef;
42 class ClassDef;
43 class ClassLinkedMap;
44 class ConceptLinkedMap;
46 class FileNameLinkedMap;
47 class NamespaceLinkedMap;
48 class NamespaceDef;
50 class IndexList;
51 class FormulaList;
52 class FormulaDict;
53 class FormulaNameDict;
54 class Preprocessor;
55 struct MemberGroupInfo;
57 
58 struct LookupInfo
59 {
60  LookupInfo() = default;
61  LookupInfo(const ClassDef *cd,const MemberDef *td,QCString ts,QCString rt)
62  : classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {}
63  const ClassDef *classDef = 0;
64  const MemberDef *typeDef = 0;
67 };
68 
69 using ClangUsrMap = std::unordered_map<std::string,const Definition *>;
70 
71 /*! \brief This class serves as a namespace for global variables used by doxygen.
72  *
73  * All fields in this class are public and static, so they can be used directly.
74  */
75 class Doxygen
76 {
77  public:
83  static std::unique_ptr<PageDef> mainPage;
84  static bool insideMainPage;
104  static bool parseSourcesNeeded;
112  static bool suppressDocWarnings;
116  static QCString spaces;
117  static bool generatingXmlOutput;
119  static bool clangAssistedParsing;
120 };
121 
122 void initDoxygen();
123 void readConfiguration(int argc, char **argv);
124 void checkConfiguration();
125 void adjustConfiguration();
126 void parseInput();
127 void generateOutput();
128 void readAliases();
129 void readFormulaRepository(QCString dir, bool cmp = FALSE);
130 void cleanUpDoxygen();
131 void readFileOrDirectory(const QCString &s,
132  FileNameLinkedMap *fnDict,
133  StringUnorderedSet *exclSet,
134  const StringVector *patList,
135  const StringVector *exclPatList,
136  StringVector *resultList,
137  StringUnorderedSet *resultSet,
138  bool recursive,
139  bool errorIfNotExist=TRUE,
140  StringUnorderedSet *killSet = 0,
141  StringSet *paths = 0
142  );
143 void copyAndFilterFile(const char *fileName,BufStr &dest);
144 
145 #endif
StringVector
std::vector< std::string > StringVector
Definition: containers.h:32
initDoxygen
void initDoxygen()
Definition: doxygen.cpp:10610
Cache< std::string, LookupInfo >
Doxygen
This class serves as a namespace for global variables used by doxygen.
Definition: doxygen.h:75
Doxygen::mainPage
static std::unique_ptr< PageDef > mainPage
Definition: doxygen.h:83
membergroup.h
Doxygen::namespaceAliasMap
static StringUnorderedMap namespaceAliasMap
Definition: doxygen.h:95
Doxygen::imageNameLinkedMap
static FileNameLinkedMap * imageNameLinkedMap
Definition: doxygen.h:89
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
Doxygen::diaFileNameLinkedMap
static FileNameLinkedMap * diaFileNameLinkedMap
Definition: doxygen.h:92
Doxygen::hiddenClassLinkedMap
static ClassLinkedMap * hiddenClassLinkedMap
Definition: doxygen.h:79
BufStr
Buffer used to store strings
Definition: bufstr.h:29
Doxygen::tagDestinationMap
static StringMap tagDestinationMap
Definition: doxygen.h:98
Doxygen::conceptLinkedMap
static ConceptLinkedMap * conceptLinkedMap
Definition: doxygen.h:80
LookupInfo::resolvedType
QCString resolvedType
Definition: doxygen.h:66
Doxygen::dotFileNameLinkedMap
static FileNameLinkedMap * dotFileNameLinkedMap
Definition: doxygen.h:90
Preprocessor
Definition: pre.h:26
Doxygen::pageLinkedMap
static PageLinkedMap * pageLinkedMap
Definition: doxygen.h:82
Doxygen::indexList
static IndexList * indexList
Definition: doxygen.h:114
copyAndFilterFile
void copyAndFilterFile(const char *fileName, BufStr &dest)
Doxygen::globalScope
static NamespaceDefMutable * globalScope
Definition: doxygen.h:102
StringUnorderedMap
std::unordered_map< std::string, std::string > StringUnorderedMap
Definition: containers.h:27
StringSet
std::set< std::string > StringSet
Definition: containers.h:30
Doxygen::macroDefinitions
static DefinesPerFileList macroDefinitions
Definition: doxygen.h:118
LookupInfo::templSpec
QCString templSpec
Definition: doxygen.h:65
Doxygen::aliasMap
static StringMap aliasMap
Definition: doxygen.h:99
Doxygen::parseSourcesNeeded
static bool parseSourcesNeeded
Definition: doxygen.h:104
Doxygen::dirLinkedMap
static DirLinkedMap * dirLinkedMap
Definition: doxygen.h:109
checkConfiguration
void checkConfiguration()
check and resolve config options
Definition: doxygen.cpp:11143
ClangUsrMap
std::unordered_map< std::string, const Definition * > ClangUsrMap
Definition: doxygen.h:69
Doxygen::exampleNameLinkedMap
static FileNameLinkedMap * exampleNameLinkedMap
Definition: doxygen.h:86
FileNameLinkedMap
Ordered dictionary of FileName objects.
Definition: filename.h:72
symbolmap.h
Doxygen::symbolMap
static SymbolMap< Definition > * symbolMap
Definition: doxygen.h:106
DirLinkedMap
A linked map of directories
Definition: dirdef.h:176
Doxygen::generatingXmlOutput
static bool generatingXmlOutput
Definition: doxygen.h:117
StringUnorderedSet
std::unordered_set< std::string > StringUnorderedSet
Definition: containers.h:28
PageDef
A model of a page symbol.
Definition: pagedef.h:25
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
LookupInfo::LookupInfo
LookupInfo()=default
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
cleanUpDoxygen
void cleanUpDoxygen()
Definition: doxygen.cpp:10694
Doxygen::subpageNestingLevel
static int subpageNestingLevel
Definition: doxygen.h:115
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
Doxygen::clangAssistedParsing
static bool clangAssistedParsing
Definition: doxygen.h:119
Doxygen::functionNameLinkedMap
static MemberNameLinkedMap * functionNameLinkedMap
Definition: doxygen.h:94
RefList
List of cross-referenced items
Definition: reflist.h:78
GroupLinkedMap
Definition: groupdef.h:123
Doxygen::parserManager
static ParserManager * parserManager
Definition: doxygen.h:111
MemberGroupInfoMap
std::unordered_map< int, std::unique_ptr< MemberGroupInfo > > MemberGroupInfoMap
Definition: membergroup.h:125
Doxygen::inputPaths
static StringSet inputPaths
Definition: doxygen.h:87
parseInput
void parseInput()
Definition: doxygen.cpp:11558
MemberNameLinkedMap
Ordered dictionary of MemberName objects.
Definition: membername.h:61
IndexList
A list of index interfaces.
Definition: index.h:55
Doxygen::groupLinkedMap
static GroupLinkedMap * groupLinkedMap
Definition: doxygen.h:96
Doxygen::memberGroupInfoMap
static MemberGroupInfoMap memberGroupInfoMap
Definition: doxygen.h:100
PageLinkedMap
Definition: pagedef.h:74
TRUE
#define TRUE
Definition: qcstring.h:36
Doxygen::expandAsDefinedSet
static StringUnorderedSet expandAsDefinedSet
Definition: doxygen.h:101
Doxygen::dirRelations
static DirRelationLinkedMap dirRelations
Definition: doxygen.h:110
DirRelationLinkedMap
Definition: dirdef.h:185
ConceptLinkedMap
Definition: conceptdef.h:63
adjustConfiguration
void adjustConfiguration()
adjust globals that depend on configuration settings.
Definition: doxygen.cpp:11153
memberlist.h
dirdef.h
readAliases
void readAliases()
Definition: doxygen.cpp:10432
MemberGroupInfo
Data collected for a member group
Definition: membergroup.h:114
cache.h
LookupInfo::typeDef
const MemberDef * typeDef
Definition: doxygen.h:64
containers.h
Doxygen::searchIndex
static SearchIndexIntf * searchIndex
Definition: doxygen.h:105
Doxygen::filterDBFileName
static QCString filterDBFileName
Definition: doxygen.h:113
Doxygen::memberNameLinkedMap
static MemberNameLinkedMap * memberNameLinkedMap
Definition: doxygen.h:93
define.h
Doxygen::htmlFileExtension
static QCString htmlFileExtension
Definition: doxygen.h:103
DefinesPerFileList
std::unordered_map< std::string, DefineList > DefinesPerFileList
Definition: define.h:49
Doxygen::insideMainPage
static bool insideMainPage
Definition: doxygen.h:84
ParserManager
Manages programming language parsers.
Definition: parserintf.h:145
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
readConfiguration
void readConfiguration(int argc, char **argv)
Definition: doxygen.cpp:10738
Doxygen::mscFileNameLinkedMap
static FileNameLinkedMap * mscFileNameLinkedMap
Definition: doxygen.h:91
Doxygen::lookupCache
static Cache< std::string, LookupInfo > * lookupCache
Definition: doxygen.h:108
NamespaceDefMutable
Definition: namespacedef.h:106
LookupInfo::classDef
const ClassDef * classDef
Definition: doxygen.h:63
FileDef
A model of a file symbol.
Definition: filedef.h:73
StringMap
std::map< std::string, std::string > StringMap
Definition: containers.h:29
Doxygen::suppressDocWarnings
static bool suppressDocWarnings
Definition: doxygen.h:112
SearchIndexIntf
Definition: searchindex.h:67
LookupInfo::LookupInfo
LookupInfo(const ClassDef *cd, const MemberDef *td, QCString ts, QCString rt)
Definition: doxygen.h:61
generateOutput
void generateOutput()
Definition: doxygen.cpp:12168
SymbolMap< Definition >
ClassLinkedMap
Definition: classlist.h:26
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
readFileOrDirectory
void readFileOrDirectory(const QCString &s, FileNameLinkedMap *fnDict, StringUnorderedSet *exclSet, const StringVector *patList, const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool recursive, bool errorIfNotExist=TRUE, StringUnorderedSet *killSet=0, StringSet *paths=0)
Definition: doxygen.cpp:10302
readFormulaRepository
void readFormulaRepository(QCString dir, bool cmp=FALSE)
NamespaceLinkedMap
Definition: namespacedef.h:41
LookupInfo
Definition: doxygen.h:58
Doxygen::clangUsrMap
static ClangUsrMap * clangUsrMap
Definition: doxygen.h:107
Doxygen::spaces
static QCString spaces
Definition: doxygen.h:116
FALSE
#define FALSE
Definition: qcstring.h:33
Doxygen::exampleLinkedMap
static PageLinkedMap * exampleLinkedMap
Definition: doxygen.h:81
Doxygen::includeNameLinkedMap
static FileNameLinkedMap * includeNameLinkedMap
Definition: doxygen.h:85
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108