00001 /****************************************************************************** 00002 * 00003 * $Id: doxygen.h,v 1.39 2001/03/19 19:27:40 root Exp $ 00004 * 00005 * 00006 * Copyright (C) 1997-2008 by Dimitri van Heesch. 00007 * 00008 * Permission to use, copy, modify, and distribute this software and its 00009 * documentation under the terms of the GNU General Public License is hereby 00010 * granted. No representations are made about the suitability of this software 00011 * for any purpose. It is provided "as is" without express or implied warranty. 00012 * See the GNU General Public License for more details. 00013 * 00014 * Documents produced by Doxygen are derivative works derived from the 00015 * input used in their production; they are not affected by this license. 00016 * 00017 */ 00018 00019 #ifndef DOXYGEN_H 00020 #define DOXYGEN_H 00021 00022 #include "qtbc.h" 00023 #include <qtextstream.h> 00024 #include <qdatetime.h> 00025 #include <qcache.h> 00026 #include "groupdef.h" 00027 #include "filedef.h" 00028 #include "classdef.h" 00029 #include "memberdef.h" 00030 #include "classlist.h" 00031 #include "membername.h" 00032 #include "filename.h" 00033 #include "namespacedef.h" 00034 #include "formula.h" 00035 #include "section.h" 00036 #include "membergroup.h" 00037 #include "reflist.h" 00038 #include "dirdef.h" 00039 #include "index.h" 00040 #include "docsets.h" 00041 00042 class PageSList; 00043 class PageSDict; 00044 class PageDef; 00045 class SearchIndex; 00046 class DirDef; 00047 class ParserManager; 00048 class ObjCache; 00049 class Store; 00050 class QFileInfo; 00051 class BufStr; 00052 00053 typedef QList<QCString> StringList; 00054 typedef QDict<FileDef> FileDict; 00055 typedef QDict<GroupDef> GroupDict; 00056 00057 class StringDict : public QDict<QCString> 00058 { 00059 public: 00060 StringDict(uint size=17) : QDict<QCString>(size) {} 00061 virtual ~StringDict() {} 00062 }; 00063 00064 struct LookupInfo 00065 { 00066 LookupInfo() : classDef(0), typeDef(0) {} 00067 LookupInfo(ClassDef *cd,MemberDef *td,QCString ts,QCString rt) 00068 : classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {} 00069 ClassDef *classDef; 00070 MemberDef *typeDef; 00071 QCString templSpec; 00072 QCString resolvedType; 00073 }; 00074 00075 extern QCString spaces; 00076 00081 class Doxygen 00082 { 00083 public: 00084 static ClassSDict *classSDict; 00085 static ClassSDict *hiddenClasses; 00086 static PageSDict *exampleSDict; 00087 static PageSDict *pageSDict; 00088 static PageDef *mainPage; 00089 static bool insideMainPage; 00090 static FileNameDict *includeNameDict; 00091 static FileNameDict *exampleNameDict; 00092 static FileNameDict *inputNameDict; 00093 static FileNameList *inputNameList; 00094 static FileNameDict *imageNameDict; 00095 static FileNameDict *dotFileNameDict; 00096 static QStrList tagfileList; 00097 static MemberNameSDict *memberNameSDict; 00098 static MemberNameSDict *functionNameSDict; 00099 static QTextStream tagFile; 00100 static SectionDict sectionDict; 00101 static StringDict namespaceAliasDict; 00102 static GroupSDict *groupSDict; 00103 static NamespaceSDict *namespaceSDict; 00104 static FormulaList formulaList; 00105 static FormulaDict formulaDict; 00106 static FormulaDict formulaNameDict; 00107 static StringDict tagDestinationDict; 00108 static StringDict aliasDict; 00109 static QIntDict<MemberGroupInfo> memGrpInfoDict; 00110 static QDict<void> expandAsDefinedDict; 00111 static NamespaceDef *globalScope; 00112 static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ... 00113 static QCString htmlFileExtension; 00114 static bool parseSourcesNeeded; 00115 static double sysElapsedTime; 00116 static QTime runningTime; 00117 static SearchIndex *searchIndex; 00118 static QDict<DefinitionIntf> *symbolMap; 00119 static bool outputToWizard; 00120 static QDict<int> *htmlDirMap; 00121 static QCache<LookupInfo> lookupCache; 00122 static DirSDict *directories; 00123 static SDict<DirRelation> dirRelations; 00124 static ParserManager *parserManager; 00125 static bool suppressDocWarnings; 00126 static ObjCache *symbolCache; 00127 static Store *symbolStorage; 00128 static QCString objDBFileName; 00129 static QCString entryDBFileName; 00130 static bool gatherDefines; 00131 static bool userComments; 00132 static IndexList indexList; 00133 }; 00134 00135 void initDoxygen(); 00136 void readConfiguration(int argc, char **argv); 00137 void checkConfiguration(); 00138 void parseInput(); 00139 void generateOutput(); 00140 void readAliases(); 00141 void readFormulaRepository(); 00142 int readFileOrDirectory(const char *s, 00143 FileNameList *fnList, 00144 FileNameDict *fnDict, 00145 StringDict *exclDict, 00146 QStrList *patList, 00147 QStrList *exclPatList, 00148 StringList *resultList, 00149 StringDict *resultDict, 00150 bool recursive, 00151 bool errorIfNotExist=TRUE, 00152 QDict<void> *killDict = 0 00153 ); 00154 int readDir(QFileInfo *fi, 00155 FileNameList *fnList, 00156 FileNameDict *fnDict, 00157 StringDict *exclDict, 00158 QStrList *patList, 00159 QStrList *exclPatList, 00160 StringList *resultList, 00161 StringDict *resultDict, 00162 bool errorIfNotExist, 00163 bool recursive, 00164 QDict<void> *killDict 00165 ); 00166 void copyAndFilterFile(const char *fileName,BufStr &dest); 00167 00168 #define NEWMATCH 00169 00170 #endif