1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
/******************************************************************************
*
* Copyright (C) 1997-2015 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef DOXYGEN_H
#define DOXYGEN_H
#include <qdatetime.h>
#include "containers.h"
#include "ftextstream.h"
#include "membergroup.h"
#include "dirdef.h"
#include "memberlist.h"
#include "define.h"
#include "cache.h"
#include "symbolmap.h"
#define THREAD_LOCAL thread_local
#define AtomicInt std::atomic_int
#define AtomicBool std::atomic_bool
class RefList;
class PageLinkedMap;
class PageDef;
class SearchIndexIntf;
class ParserManager;
class QFileInfo;
class BufStr;
class CiteDict;
class MemberDef;
class GroupDef;
class GroupLinkedMap;
class FileDef;
class ClassDef;
class ClassLinkedMap;
class MemberNameLinkedMap;
class FileNameLinkedMap;
class NamespaceLinkedMap;
class NamespaceDef;
class DirRelationLinkedMap;
class IndexList;
class FormulaList;
class FormulaDict;
class FormulaNameDict;
class Preprocessor;
struct MemberGroupInfo;
class NamespaceDefMutable;
struct LookupInfo
{
LookupInfo() = default;
LookupInfo(const ClassDef *cd,const MemberDef *td,QCString ts,QCString rt)
: classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {}
const ClassDef *classDef = 0;
const MemberDef *typeDef = 0;
QCString templSpec;
QCString resolvedType;
};
using ClangUsrMap = std::unordered_map<std::string,const Definition *>;
/*! \brief This class serves as a namespace for global variables used by doxygen.
*
* All fields in this class are public and static, so they can be used directly.
*/
class Doxygen
{
public:
static ClassLinkedMap *classLinkedMap;
static ClassLinkedMap *hiddenClassLinkedMap;
static PageLinkedMap *exampleLinkedMap;
static PageLinkedMap *pageLinkedMap;
static std::unique_ptr<PageDef> mainPage;
static bool insideMainPage;
static FileNameLinkedMap *includeNameLinkedMap;
static FileNameLinkedMap *exampleNameLinkedMap;
static StringSet inputPaths;
static FileNameLinkedMap *inputNameLinkedMap;
static FileNameLinkedMap *imageNameLinkedMap;
static FileNameLinkedMap *dotFileNameLinkedMap;
static FileNameLinkedMap *mscFileNameLinkedMap;
static FileNameLinkedMap *diaFileNameLinkedMap;
static MemberNameLinkedMap *memberNameLinkedMap;
static MemberNameLinkedMap *functionNameLinkedMap;
static StringUnorderedMap namespaceAliasMap;
static GroupLinkedMap *groupLinkedMap;
static NamespaceLinkedMap *namespaceLinkedMap;
static StringMap tagDestinationMap;
static StringMap aliasMap;
static MemberGroupInfoMap memberGroupInfoMap;
static StringUnorderedSet expandAsDefinedSet;
static NamespaceDefMutable *globalScope;
static QCString htmlFileExtension;
static bool parseSourcesNeeded;
static SearchIndexIntf *searchIndex;
static SymbolMap<Definition> symbolMap;
static ClangUsrMap *clangUsrMap;
static bool outputToWizard;
static Cache<std::string,LookupInfo> *lookupCache;
static DirLinkedMap *dirLinkedMap;
static DirRelationLinkedMap dirRelations;
static ParserManager *parserManager;
static bool suppressDocWarnings;
static QCString filterDBFileName;
static bool userComments;
static IndexList *indexList;
static int subpageNestingLevel;
static QCString spaces;
static bool generatingXmlOutput;
static DefinesPerFileList macroDefinitions;
static bool clangAssistedParsing;
};
void initDoxygen();
void readConfiguration(int argc, char **argv);
void checkConfiguration();
void adjustConfiguration();
void parseInput();
void generateOutput();
void readAliases();
void readFormulaRepository(QCString dir, bool cmp = FALSE);
void cleanUpDoxygen();
int readFileOrDirectory(const char *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
);
void copyAndFilterFile(const char *fileName,BufStr &dest);
#endif
|