⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classdef.h

📁 doxygen(一个自动从源代码生成文档的工具)的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/****************************************************************************** * * $Id: classdef.h,v 1.39 2001/03/19 19:27:39 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 CLASSDEF_H#define CLASSDEF_H#include "qtbc.h"#include <qlist.h>#include <qdict.h>#include <qstrlist.h>#include "entry.h"#include "memberlist.h"#include "definition.h"#include "sortdict.h"class MemberDict;class ClassList;class ClassSDict;class OutputList;class FileDef;class BaseClassList;class NamespaceDef;class MemberDef;class ExampleSDict;class MemberNameInfoSDict;class UsesClassDict;class MemberGroupList;class MemberGroupDict;class QTextStream;class PackageDef;class GroupDef;class StringDict;struct IncludeInfo;/*! \brief This class contains all information about a compound. * *  A compound can be a class, struct, union, interface, or exception. *  \note This class should be renamed to CompoundDef */class ClassDef : public Definition{  public:    /*! \name Public API     *  \{     */    /*! The various compound types */    enum CompoundType { Class=Entry::CLASS_SEC,                         Struct=Entry::STRUCT_SEC,                         Union=Entry::UNION_SEC,                        Interface=Entry::INTERFACE_SEC,                        Exception=Entry::EXCEPTION_SEC                      };    DefType definitionType() { return TypeClass; }    QCString getOutputFileBase() const;     QCString getInstanceOutputFileBase() const;     QCString getFileBase() const;    QCString getSourceFileBase() const;     QCString getReference() const;    bool isReference() const;    bool hasDocumentation() const;    /*! Returns the name as it is appears in the documentation */    QCString displayName() const;    /*! Returns the type of compound this is */    CompoundType compoundType() const { return m_compType; }     /*! Returns the type of compound as a string */    QCString compoundTypeString() const;    /*! Returns the list of base classes from which this class directly     *  inherits.     */    BaseClassList *baseClasses() { return m_inherits; }        /*! Returns the list of sub classes that directly inherit from this class     */    BaseClassList *subClasses() { return m_inheritedBy; }    /*! Returns a dictionary of all members. This includes any inherited      *  members. Members are sorted alphabetically.     */     MemberNameInfoSDict *memberNameInfoSDict() { return m_allMemberNameInfoSDict; }    void writeDocumentation(OutputList &ol);    void writeDocumentationForInnerClasses(OutputList &ol);    void writeMemberList(OutputList &ol);    void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);    /*! Return the protection level (Public,Protected,Private) in which      *  this compound was found.     */    Protection protection() const { return m_prot; }    /*! returns TRUE iff a link is possible to an item within this project.     */    bool isLinkableInProject() const;    /*! return TRUE iff a link to this class is possible (either within      *  this project, or as a cross-reference to another project).     */    bool isLinkable() const;    /*! the class is visible in a class diagram, or class hierarchy */    bool isVisibleInHierarchy();        /*! Returns the template arguments of this class      *  Will return 0 if not applicable.     */    ArgumentList *templateArguments() const { return m_tempArgs; }    /*! Returns the template arguments that this nested class "inherits"      *  from its outer class (doxygen assumes there is only one!).      *  Will return 0 if not applicable.     */    ArgumentList *outerTemplateArguments() const;        /*! Returns the namespace this compound is in, or 0 if it has a global     *  scope.     */    NamespaceDef *getNamespaceDef() { return m_nspace; }    /*! Returns the file in which this compound's definition can be found.     *  Should not return 0 (but it might be a good idea to check anyway).     */    FileDef      *getFileDef() const { return m_fileDef; }    /*! Returns the Java package this class is in or 0 if not applicable.      */     PackageDef   *packageDef() const;    MemberDef    *getMemberByName(const QCString &);        /*! Returns TRUE iff \a bcd is a direct or indirect base class of this     *  class. This function will recusively traverse all branches of the     *  inheritance tree.     */    bool isBaseClass(ClassDef *bcd);    /*! Returns a sorted dictionary with all template instances found for     *  this template class. Returns 0 if not a template or no instances.     */    QDict<ClassDef> *getTemplateInstances() const { return m_templateInstances; }    /*! Returns the template master of which this class is an instance.     *  Returns 0 if not applicable.     */    ClassDef *templateMaster() const { return m_templateMaster; }     UsesClassDict *usedImplementationClasses() const     {       return m_usesImplClassDict;     }    UsesClassDict *usedInterfaceClasses() const    {      return m_usesIntfClassDict;    }    /*! Returns the definition of a nested compound if     *  available, or 0 otherwise.     *  @param name The name of the nested compound     */    virtual Definition *findInnerCompound(const char *name);    /*! Returns the template parameter lists that form the template     *  declaration of this class.     *       *  Example: <code>template<class T> class TC {};</code>     *  will return a list with one ArgumentList containing one argument     *  with type="class" and name="T".     */    void getTemplateParameterLists(QList<ArgumentList> &lists) const;    QCString qualifiedNameWithTemplateParameters(        QList<ArgumentList> *actualParams=0) const;    /*! Returns TRUE if there is at least one pure virtual member in this     *  class.     */    bool isAbstract() const { return m_isAbstract; }    /*! returns the name of the class including outer classes, but not     *  including namespaces.     */    QCString className() const;    /* member lists by protection */    MemberList pubMembers;    MemberList proMembers;    MemberList priMembers;    MemberList pubStaticMembers;    MemberList proStaticMembers;    MemberList priStaticMembers;    MemberList pubSlots;    MemberList proSlots;    MemberList priSlots;    MemberList pubAttribs;    MemberList proAttribs;    MemberList priAttribs;    MemberList pubStaticAttribs;    MemberList proStaticAttribs;    MemberList priStaticAttribs;    MemberList pubTypes;    MemberList proTypes;    MemberList priTypes;    MemberList related;    MemberList signals;    MemberList friends;    MemberList dcopMethods;    MemberList properties;        /* member list by types */    MemberList constructors;    MemberList typedefMembers;    MemberList enumMembers;    MemberList enumValMembers;    MemberList functionMembers;    MemberList relatedMembers;    MemberList variableMembers;    MemberList propertyMembers;    /*! \} Public API */    /*! \name Doxygen internal API     *  \{     */    void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0);    void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0);    void setIncludeFile(FileDef *fd,const char *incName,bool local);     void insertMember(MemberDef *);    void insertUsedFile(const char *);    void computeAnchors();    //void computeMemberGroups();    //void setAnchor(MemberDef *);    //void dumpMembers();    bool addExample(const char *anchor,const char *name, const char *file);    void addMembersToMemberGroup();    void distributeMemberGroupDocumentation();    void setNamespace(NamespaceDef *nd) { m_nspace = nd; }    void setTemplateArguments(ArgumentList *al);    void mergeMembers();    void setFileDef(FileDef *fd) { m_fileDef=fd; }    //void determineImplUsageRelation();    //void determineIntfUsageRelation();    void setSubGrouping(bool enabled) { m_subGrouping = enabled; }    void setProtection(Protection p) { m_prot=p; }

⌨️ 快捷键说明

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