namespacedef.h

来自「doxygen(一个自动从源代码生成文档的工具)的源代码」· C头文件 代码 · 共 164 行

H
164
字号
/****************************************************************************** * * $Id: namespacedef.h,v 1.18 2001/03/19 19:27:41 root Exp $ * * Copyright (C) 1997-2001 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 NAMESPACEDEF_H#define NAMESPACEDEF_H#include "qtbc.h"#include <qstrlist.h>#include <qdict.h>#include "sortdict.h"#include "definition.h"#include "memberlist.h"class ClassDef;class ClassList;class OutputList;class ClassSDict;class MemberDef;class NamespaceList;class MemberGroupDict;class MemberGroupList;class NamespaceSDict;class NamespaceDef : public Definition{  public:    NamespaceDef(const char *defFileName,int defLine,                 const char *name,const char *ref=0);   ~NamespaceDef();    DefType definitionType() { return TypeNamespace; }    QCString getOutputFileBase() const;    void insertUsedFile(const char *fname);    void writeDocumentation(OutputList &ol);    void insertClass(ClassDef *cd);    void insertNamespace(NamespaceDef *nd);    void insertMember(MemberDef *md);    void computeAnchors();    int countMembers();    void addUsingDirective(NamespaceDef *nd);    NamespaceList *getUsedNamespaces() const { return usingDirList; }    void addUsingDeclaration(ClassDef *cd);    ClassList *getUsedClasses() const { return usingDeclList; }        bool isLinkableInProject() const    {      int i = name().findRev("::");      if (i==-1) i=0; else i+=2;      return !name().isEmpty() && name().at(i)!='@' &&              hasDocumentation() && !isReference();    }    bool isLinkable() const    {      return isLinkableInProject() || isReference();    }    void addMembersToMemberGroup();    void distributeMemberGroupDocumentation();    virtual Definition *findInnerCompound(const char *name);    void addInnerCompound(Definition *d);    void addListReferences();      //protected:  //  void addMemberListToGroup(MemberList *,bool (MemberDef::*)() const);  public:        // members in the declaration part of the documentation    MemberList decDefineMembers;    MemberList decProtoMembers;    MemberList decTypedefMembers;    MemberList decEnumMembers;    MemberList decFuncMembers;    MemberList decVarMembers;    // members in the documentation part of the documentation    MemberList docAllMemberList;    MemberList docDefineMembers;    MemberList docProtoMembers;    MemberList docTypedefMembers;    MemberList docEnumMembers;    MemberList docFuncMembers;    MemberList docVarMembers;    /*! Classes inside this namespace */    ClassSDict *classSDict;    /*! Namespaces inside this namespace */    NamespaceSDict *namespaceSDict;  private:    //QCString reference;    QCString fileName;    QStrList files;    NamespaceList *usingDirList;    ClassList *usingDeclList;    SDict<Definition> *m_innerCompounds;    MemberList allMemberList;    /* user defined member groups */    MemberGroupList    *memberGroupList;    MemberGroupDict    *memberGroupDict;};class NamespaceList : public QList<NamespaceDef>{   public:   ~NamespaceList() {}    int compareItems(GCI item1,GCI item2)    {      return stricmp(((NamespaceDef *)item1)->name(),                    ((NamespaceDef *)item2)->name()                   );    }};class NamespaceListIterator : public QListIterator<NamespaceDef>{  public:    NamespaceListIterator(const NamespaceList &l) :       QListIterator<NamespaceDef>(l) {}};class NamespaceDict : public QDict<NamespaceDef>{  public:    NamespaceDict(int size) : QDict<NamespaceDef>(size) {}   ~NamespaceDict() {}};class NamespaceSDict : public SDict<NamespaceDef>{  public:    NamespaceSDict(int size) : SDict<NamespaceDef>(size) {}   ~NamespaceSDict() {}    int compareItems(GCI item1,GCI item2)    {      return stricmp(((NamespaceDef *)item1)->name(),                    ((NamespaceDef *)item2)->name()                   );    }};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?