|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * |
|
6 * Copyright (C) 1997-2008 by Dimitri van Heesch. |
|
7 * |
|
8 * Permission to use, copy, modify, and distribute this software and its |
|
9 * documentation under the terms of the GNU General Public License is hereby |
|
10 * granted. No representations are made about the suitability of this software |
|
11 * for any purpose. It is provided "as is" without express or implied warranty. |
|
12 * See the GNU General Public License for more details. |
|
13 * |
|
14 * Documents produced by Doxygen are derivative works derived from the |
|
15 * input used in their production; they are not affected by this license. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef DOXYGEN_H |
|
20 #define DOXYGEN_H |
|
21 |
|
22 #include "qtbc.h" |
|
23 #include <qtextstream.h> |
|
24 #include <qdatetime.h> |
|
25 #include <qcache.h> |
|
26 #include "groupdef.h" |
|
27 #include "filedef.h" |
|
28 #include "classdef.h" |
|
29 #include "memberdef.h" |
|
30 #include "classlist.h" |
|
31 #include "membername.h" |
|
32 #include "filename.h" |
|
33 #include "namespacedef.h" |
|
34 #include "formula.h" |
|
35 #include "section.h" |
|
36 #include "membergroup.h" |
|
37 #include "reflist.h" |
|
38 #include "dirdef.h" |
|
39 #include "index.h" |
|
40 #include "docsets.h" |
|
41 |
|
42 class PageSList; |
|
43 class PageSDict; |
|
44 class PageDef; |
|
45 class SearchIndex; |
|
46 class ParserManager; |
|
47 class ObjCache; |
|
48 class Store; |
|
49 class QFileInfo; |
|
50 class BufStr; |
|
51 |
|
52 typedef QList<QCString> StringList; |
|
53 typedef QDict<FileDef> FileDict; |
|
54 typedef QDict<GroupDef> GroupDict; |
|
55 |
|
56 class StringDict : public QDict<QCString> |
|
57 { |
|
58 public: |
|
59 StringDict(uint size=17) : QDict<QCString>(size) {} |
|
60 virtual ~StringDict() {} |
|
61 }; |
|
62 |
|
63 struct LookupInfo |
|
64 { |
|
65 LookupInfo() : classDef(0), typeDef(0) {} |
|
66 LookupInfo(ClassDef *cd,MemberDef *td,QCString ts,QCString rt) |
|
67 : classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {} |
|
68 ClassDef *classDef; |
|
69 MemberDef *typeDef; |
|
70 QCString templSpec; |
|
71 QCString resolvedType; |
|
72 }; |
|
73 |
|
74 extern QCString g_spaces; |
|
75 |
|
76 /*! \brief This class serves as a namespace for global variables used by doxygen. |
|
77 * |
|
78 * All fields in this class are public and static, so they can be used directly. |
|
79 */ |
|
80 class Doxygen |
|
81 { |
|
82 public: |
|
83 static ClassSDict *classSDict; |
|
84 static ClassSDict *hiddenClasses; |
|
85 static PageSDict *exampleSDict; |
|
86 static PageSDict *pageSDict; |
|
87 static PageDef *mainPage; |
|
88 static bool insideMainPage; |
|
89 static FileNameDict *includeNameDict; |
|
90 static FileNameDict *exampleNameDict; |
|
91 static FileNameDict *inputNameDict; |
|
92 static FileNameList *inputNameList; |
|
93 static FileNameDict *imageNameDict; |
|
94 static FileNameDict *dotFileNameDict; |
|
95 static QStrList tagfileList; |
|
96 static MemberNameSDict *memberNameSDict; |
|
97 static MemberNameSDict *functionNameSDict; |
|
98 static QTextStream tagFile; |
|
99 static SectionDict sectionDict; |
|
100 static StringDict namespaceAliasDict; |
|
101 static GroupSDict *groupSDict; |
|
102 static NamespaceSDict *namespaceSDict; |
|
103 static FormulaList formulaList; |
|
104 static FormulaDict formulaDict; |
|
105 static FormulaDict formulaNameDict; |
|
106 static StringDict tagDestinationDict; |
|
107 static StringDict aliasDict; |
|
108 static QIntDict<MemberGroupInfo> memGrpInfoDict; |
|
109 static QDict<void> expandAsDefinedDict; |
|
110 static NamespaceDef *globalScope; |
|
111 static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ... |
|
112 static QCString htmlFileExtension; |
|
113 static bool parseSourcesNeeded; |
|
114 static QTime runningTime; |
|
115 static SearchIndex *searchIndex; |
|
116 static QDict<DefinitionIntf> *symbolMap; |
|
117 static bool outputToWizard; |
|
118 static QDict<int> *htmlDirMap; |
|
119 static QCache<LookupInfo> lookupCache; |
|
120 static DirSDict *directories; |
|
121 static SDict<DirRelation> dirRelations; |
|
122 static ParserManager *parserManager; |
|
123 static bool suppressDocWarnings; |
|
124 static ObjCache *symbolCache; |
|
125 static Store *symbolStorage; |
|
126 static QCString objDBFileName; |
|
127 static QCString entryDBFileName; |
|
128 static bool gatherDefines; |
|
129 static bool userComments; |
|
130 static IndexList indexList; |
|
131 static int subpageNestingLevel; |
|
132 static QCString spaces; |
|
133 }; |
|
134 |
|
135 void initDoxygen(); |
|
136 void readConfiguration(int argc, char **argv); |
|
137 void checkConfiguration(); |
|
138 void adjustConfiguration(); |
|
139 void searchInputFiles(StringList &inputFiles); |
|
140 void parseInput(); |
|
141 void generateOutput(); |
|
142 void readAliases(); |
|
143 void readFormulaRepository(); |
|
144 int readFileOrDirectory(const char *s, |
|
145 FileNameList *fnList, |
|
146 FileNameDict *fnDict, |
|
147 StringDict *exclDict, |
|
148 QStrList *patList, |
|
149 QStrList *exclPatList, |
|
150 StringList *resultList, |
|
151 StringDict *resultDict, |
|
152 bool recursive, |
|
153 bool errorIfNotExist=TRUE, |
|
154 QDict<void> *killDict = 0 |
|
155 ); |
|
156 int readDir(QFileInfo *fi, |
|
157 FileNameList *fnList, |
|
158 FileNameDict *fnDict, |
|
159 StringDict *exclDict, |
|
160 QStrList *patList, |
|
161 QStrList *exclPatList, |
|
162 StringList *resultList, |
|
163 StringDict *resultDict, |
|
164 bool errorIfNotExist, |
|
165 bool recursive, |
|
166 QDict<void> *killDict |
|
167 ); |
|
168 void copyAndFilterFile(const char *fileName,BufStr &dest); |
|
169 |
|
170 #define NEWMATCH |
|
171 |
|
172 #endif |