diff options
Diffstat (limited to 'src/doxygen.h')
-rw-r--r-- | src/doxygen.h | 145 |
1 files changed, 56 insertions, 89 deletions
diff --git a/src/doxygen.h b/src/doxygen.h index a23a678..1886c0e 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -17,56 +17,53 @@ #define DOXYGEN_H #include <qdatetime.h> -#include <qcache.h> #include <qstrlist.h> #include <qdict.h> #include <qintdict.h> +#include "containers.h" #include "ftextstream.h" #include "sortdict.h" #include "membergroup.h" #include "dirdef.h" #include "memberlist.h" -#include "docgroup.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 PageSList; -class PageSDict; +class PageLinkedMap; class PageDef; class SearchIndexIntf; class ParserManager; -class ObjCache; -class Store; class QFileInfo; class BufStr; class CiteDict; class MemberDef; class GroupDef; -class GroupSDict; +class GroupLinkedMap; class FileDef; class ClassDef; -class ClassSDict; -class GenericsSDict; -class MemberNameSDict; -class FileNameDict; -class FileNameList; -class NamespaceSDict; +class ClassLinkedMap; +class MemberNameLinkedMap; +class FileNameLinkedMap; +class NamespaceLinkedMap; class NamespaceDef; -class DefinitionIntf; -class DirSDict; -class DirRelation; +class DirRelationLinkedMap; class IndexList; class FormulaList; class FormulaDict; class FormulaNameDict; -class SectionDict; class Preprocessor; struct MemberGroupInfo; +class NamespaceDefMutable; typedef QList<QCString> StringList; typedef QListIterator<QCString> StringListIterator; -//typedef QDict<FileDef> FileDict; -//typedef QDict<GroupDef> GroupDict; class StringDict : public QDict<QCString> { @@ -77,16 +74,16 @@ class StringDict : public QDict<QCString> struct LookupInfo { - LookupInfo() : classDef(0), typeDef(0) {} + LookupInfo() = default; LookupInfo(const ClassDef *cd,const MemberDef *td,QCString ts,QCString rt) : classDef(cd), typeDef(td), templSpec(ts),resolvedType(rt) {} - const ClassDef *classDef; - const MemberDef *typeDef; + const ClassDef *classDef = 0; + const MemberDef *typeDef = 0; QCString templSpec; QCString resolvedType; }; -extern QCString g_spaces; +using ClangUsrMap = std::unordered_map<std::string,const Definition *>; /*! \brief This class serves as a namespace for global variables used by doxygen. * @@ -95,102 +92,72 @@ extern QCString g_spaces; class Doxygen { public: - static ClassSDict *classSDict; - static ClassSDict *hiddenClasses; - static PageSDict *exampleSDict; - static PageSDict *pageSDict; - static PageDef *mainPage; + static ClassLinkedMap *classLinkedMap; + static ClassLinkedMap *hiddenClassLinkedMap; + static PageLinkedMap *exampleLinkedMap; + static PageLinkedMap *pageLinkedMap; + static std::unique_ptr<PageDef> mainPage; static bool insideMainPage; - static FileNameDict *includeNameDict; - static FileNameDict *exampleNameDict; - static QDict<void> inputPaths; - static FileNameDict *inputNameDict; - static FileNameList *inputNameList; - static FileNameDict *imageNameDict; - static FileNameDict *dotFileNameDict; - static FileNameDict *mscFileNameDict; - static FileNameDict *diaFileNameDict; - static QStrList tagfileList; - static MemberNameSDict *memberNameSDict; - static MemberNameSDict *functionNameSDict; - static SectionDict *sectionDict; - static StringDict namespaceAliasDict; - static GroupSDict *groupSDict; - static NamespaceSDict *namespaceSDict; - static FormulaList *formulaList; - static FormulaDict *formulaDict; - static FormulaDict *formulaNameDict; + 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 StringDict tagDestinationDict; static StringDict aliasDict; - static QIntDict<MemberGroupInfo> memGrpInfoDict; - static QDict<void> expandAsDefinedDict; - static NamespaceDef *globalScope; - static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ... + static MemberGroupInfoMap memberGroupInfoMap; + static StringUnorderedSet expandAsDefinedSet; + static NamespaceDefMutable *globalScope; static QCString htmlFileExtension; static bool parseSourcesNeeded; - static QTime runningTime; static SearchIndexIntf *searchIndex; - static QDict<DefinitionIntf> *symbolMap; - static QDict<Definition> *clangUsrMap; + static SymbolMap<Definition> symbolMap; + static ClangUsrMap *clangUsrMap; static bool outputToWizard; - static QDict<int> *htmlDirMap; - static QCache<LookupInfo> *lookupCache; - static DirSDict *directories; - static SDict<DirRelation> dirRelations; + static Cache<std::string,LookupInfo> *lookupCache; + static DirLinkedMap *dirLinkedMap; + static DirRelationLinkedMap dirRelations; static ParserManager *parserManager; static bool suppressDocWarnings; - static Store *symbolStorage; - static QCString objDBFileName; - static QCString entryDBFileName; static QCString filterDBFileName; - static CiteDict *citeDict; - static bool gatherDefines; static bool userComments; static IndexList *indexList; static int subpageNestingLevel; static QCString spaces; static bool generatingXmlOutput; - static bool markdownSupport; - static GenericsSDict *genericsDict; - static DocGroup docGroup; - static Preprocessor *preprocessor; + static DefinesPerFileList macroDefinitions; + static bool clangAssistedParsing; }; void initDoxygen(); void readConfiguration(int argc, char **argv); void checkConfiguration(); void adjustConfiguration(); -void searchInputFiles(StringList &inputFiles); void parseInput(); void generateOutput(); void readAliases(); void readFormulaRepository(QCString dir, bool cmp = FALSE); void cleanUpDoxygen(); int readFileOrDirectory(const char *s, - FileNameList *fnList, - FileNameDict *fnDict, - StringDict *exclDict, - QStrList *patList, - QStrList *exclPatList, - StringList *resultList, - StringDict *resultDict, + FileNameLinkedMap *fnDict, + StringUnorderedSet *exclSet, + const StringVector *patList, + const StringVector *exclPatList, + StringVector *resultList, + StringUnorderedSet *resultSet, bool recursive, bool errorIfNotExist=TRUE, - QDict<void> *killDict = 0, - QDict<void> *paths = 0 + StringUnorderedSet *killSet = 0, + StringSet *paths = 0 ); -int readDir(QFileInfo *fi, - FileNameList *fnList, - FileNameDict *fnDict, - StringDict *exclDict, - QStrList *patList, - QStrList *exclPatList, - StringList *resultList, - StringDict *resultDict, - bool errorIfNotExist, - bool recursive, - QDict<void> *killDict - ); void copyAndFilterFile(const char *fileName,BufStr &dest); #endif |