Doxygen
classdef.h 文件参考
#include <vector>
#include <set>
#include "containers.h"
#include "definition.h"
#include "arguments.h"
#include "membergroup.h"
+ classdef.h 的引用(Include)关系图:
+ 此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

struct  BaseClassDef
 Class that contains information about an inheritance relation. 更多...
 
struct  TemplateInstanceDef
 Class that contains information about a template instance relation 更多...
 
class  ClassDef
 A abstract class representing of a compound symbol. 更多...
 
class  ClassDefMutable
 
struct  UsesClassDef
 Class that contains information about a usage relation. 更多...
 
class  UsesClassList
 
struct  ConstraintClassDef
 Class that contains information about a type constraint relations. 更多...
 
class  ConstraintClassList
 

类型定义

using BaseClassList = std::vector< BaseClassDef >
 
using TemplateInstanceList = std::vector< TemplateInstanceDef >
 
using TemplateNameMap = std::map< std::string, int >
 
using ClassDefSet = std::set< const ClassDef * >
 

函数

ClassDefMutablecreateClassDef (const QCString &fileName, int startLine, int startColumn, const QCString &name, ClassDef::CompoundType ct, const QCString &ref=QCString(), const QCString &fName=QCString(), bool isSymbol=TRUE, bool isJavaEnum=FALSE)
 Factory method to create a new ClassDef object 更多...
 
ClassDefcreateClassDefAlias (const Definition *newScope, const ClassDef *cd)
 
ClassDeftoClassDef (Definition *d)
 
ClassDeftoClassDef (DefinitionMutable *d)
 
const ClassDeftoClassDef (const Definition *d)
 
ClassDefMutabletoClassDefMutable (Definition *d)
 
ClassDefMutabletoClassDefMutable (const Definition *d)
 
ClassDefgetClass (const QCString &key)
 
ClassDefMutablegetClassMutable (const QCString &key)
 
bool hasVisibleRoot (const BaseClassList &bcl)
 
bool classHasVisibleChildren (const ClassDef *cd)
 
bool classVisibleInIndex (const ClassDef *cd)
 
int minClassDistance (const ClassDef *cd, const ClassDef *bcd, int level=0)
 
Protection classInheritedProtectionLevel (const ClassDef *cd, const ClassDef *bcd, Protection prot=Public, int level=0)
 

类型定义说明

◆ BaseClassList

using BaseClassList = std::vector<BaseClassDef>

在文件 classdef.h81 行定义.

◆ ClassDefSet

using ClassDefSet = std::set<const ClassDef*>

在文件 classdef.h95 行定义.

◆ TemplateInstanceList

在文件 classdef.h91 行定义.

◆ TemplateNameMap

using TemplateNameMap = std::map<std::string,int>

在文件 classdef.h93 行定义.

函数说明

◆ classHasVisibleChildren()

bool classHasVisibleChildren ( const ClassDef cd)

在文件 classdef.cpp4991 行定义.

4992 {
4993  BaseClassList bcl;
4994 
4995  if (cd->getLanguage()==SrcLangExt_VHDL) // reverse baseClass/subClass relation
4996  {
4997  if (cd->baseClasses().empty()) return FALSE;
4998  bcl=cd->baseClasses();
4999  }
5000  else
5001  {
5002  if (cd->subClasses().empty()) return FALSE;
5003  bcl=cd->subClasses();
5004  }
5005 
5006  for (const auto &bcd : bcl)
5007  {
5008  if (bcd.classDef->isVisibleInHierarchy())
5009  {
5010  return TRUE;
5011  }
5012  }
5013  return FALSE;
5014 }

引用了 ClassDef::baseClasses(), FALSE, Definition::getLanguage(), SrcLangExt_VHDL, ClassDef::subClasses() , 以及 TRUE.

被这些函数引用 NestingNodeContext::Private::addClasses(), writeClassTreeForList() , 以及 writeClassTreeToOutput().

◆ classInheritedProtectionLevel()

Protection classInheritedProtectionLevel ( const ClassDef cd,
const ClassDef bcd,
Protection  prot = Public,
int  level = 0 
)

在文件 classdef.cpp5051 行定义.

5052 {
5053  if (bcd->categoryOf()) // use class that is being extended in case of
5054  // an Objective-C category
5055  {
5056  bcd=bcd->categoryOf();
5057  }
5058  if (cd==bcd)
5059  {
5060  goto exit;
5061  }
5062  if (level==256)
5063  {
5064  err("Internal inconsistency: found class %s seem to have a recursive "
5065  "inheritance relation! Please send a bug report to doxygen@gmail.com\n",qPrint(cd->name()));
5066  }
5067  else if (prot!=Private)
5068  {
5069  for (const auto &bcdi : cd->baseClasses())
5070  {
5071  Protection baseProt = classInheritedProtectionLevel(bcdi.classDef,bcd,bcdi.prot,level+1);
5072  if (baseProt==Private) prot=Private;
5073  else if (baseProt==Protected) prot=Protected;
5074  }
5075  }
5076 exit:
5077  //printf("classInheritedProtectionLevel(%s,%s)=%d\n",qPrint(cd->name()),qPrint(bcd->name()),prot);
5078  return prot;
5079 }

引用了 ClassDef::baseClasses(), ClassDef::categoryOf(), classInheritedProtectionLevel(), err(), Definition::name(), Private, Protected , 以及 qPrint().

被这些函数引用 classInheritedProtectionLevel().

◆ classVisibleInIndex()

bool classVisibleInIndex ( const ClassDef cd)

在文件 classdef.cpp5016 行定义.

5017 {
5018  bool allExternals = Config_getBool(ALLEXTERNALS);
5019  return (allExternals && cd->isLinkable()) || cd->isLinkableInProject();
5020 }

引用了 Config_getBool, ClassDef::isLinkable() , 以及 ClassDef::isLinkableInProject().

被这些函数引用 NestingContext::Private::addClass() , 以及 writeClassTree().

◆ createClassDef()

ClassDefMutable* createClassDef ( const QCString fileName,
int  startLine,
int  startColumn,
const QCString name,
ClassDef::CompoundType  ct,
const QCString ref = QCString(),
const QCString fName = QCString(),
bool  isSymbol = TRUE,
bool  isJavaEnum = FALSE 
)

Factory method to create a new ClassDef object

在文件 classdef.cpp367 行定义.

372 {
373  return new ClassDefImpl(fileName,startLine,startColumn,name,ct,ref,fName,isSymbol,isJavaEnum);
374 }

被这些函数引用 addClassToContext(), createTagLessInstance(), findClassRelation(), findUsedClassesForClass() , 以及 findUsingDeclarations().

◆ createClassDefAlias()

ClassDef* createClassDefAlias ( const Definition newScope,
const ClassDef cd 
)

在文件 classdef.cpp559 行定义.

560 {
561  ClassDef *acd = new ClassDefAliasImpl(newScope,cd);
562  //printf("cd name=%s localName=%s qualifiedName=%s qualifiedNameWith=%s displayName()=%s\n",
563  // qPrint(acd->name()),qPrint(acd->localName()),qPrint(acd->qualifiedName()),
564  // qPrint(acd->qualifiedNameWithTemplateParameters()),qPrint(acd->displayName()));
565  return acd;
566 }

被这些函数引用 resolveClassNestingRelations().

◆ getClass()

◆ getClassMutable()

◆ hasVisibleRoot()

bool hasVisibleRoot ( const BaseClassList bcl)

在文件 classdef.cpp4980 行定义.

4981 {
4982  for (const auto &bcd : bcl)
4983  {
4984  const ClassDef *cd=bcd.classDef;
4985  if (cd->isVisibleInHierarchy()) return true;
4986  if (hasVisibleRoot(cd->baseClasses())) return true;
4987  }
4988  return false;
4989 }

引用了 ClassDef::baseClasses(), hasVisibleRoot() , 以及 ClassDef::isVisibleInHierarchy().

被这些函数引用 NestingContext::Private::addClassHierarchy(), DotGfxHierarchyTable::addClassList(), NestingContext::Private::addDerivedClasses(), DotGfxHierarchyTable::addHierarchy(), countClassesInTreeList(), hasVisibleRoot(), writeClassTreeForList() , 以及 writeClassTreeToOutput().

◆ minClassDistance()

int minClassDistance ( const ClassDef cd,
const ClassDef bcd,
int  level = 0 
)

在文件 classdef.cpp5026 行定义.

5027 {
5028  const int maxInheritanceDepth = 100000;
5029  if (bcd->categoryOf()) // use class that is being extended in case of
5030  // an Objective-C category
5031  {
5032  bcd=bcd->categoryOf();
5033  }
5034  if (cd==bcd) return level;
5035  if (level==256)
5036  {
5037  warn_uncond("class %s seem to have a recursive "
5038  "inheritance relation!\n",qPrint(cd->name()));
5039  return -1;
5040  }
5041  int m=maxInheritanceDepth;
5042  for (const auto &bcdi : cd->baseClasses())
5043  {
5044  int mc=minClassDistance(bcdi.classDef,bcd,level+1);
5045  if (mc<m) m=mc;
5046  if (m<0) break;
5047  }
5048  return m;
5049 }

引用了 ClassDef::baseClasses(), ClassDef::categoryOf(), maxInheritanceDepth, minClassDistance(), Definition::name(), qPrint() , 以及 warn_uncond().

被这些函数引用 computeMemberRelations(), getDefs(), ClassDefImpl::getMemberByName() , 以及 minClassDistance().

◆ toClassDef() [1/3]

const ClassDef* toClassDef ( const Definition d)

在文件 classdef.cpp4932 行定义.

4933 {
4934  if (d && (typeid(*d)==typeid(ClassDefImpl) || typeid(*d)==typeid(ClassDefAliasImpl)))
4935  {
4936  return static_cast<const ClassDef*>(d);
4937  }
4938  else
4939  {
4940  return 0;
4941  }
4942 }

◆ toClassDef() [2/3]

◆ toClassDef() [3/3]

ClassDef* toClassDef ( DefinitionMutable d)

在文件 classdef.cpp4919 行定义.

4920 {
4921  Definition *d = toDefinition(md);
4922  if (d && typeid(*d)==typeid(ClassDefImpl))
4923  {
4924  return static_cast<ClassDef*>(d);
4925  }
4926  else
4927  {
4928  return 0;
4929  }
4930 }

引用了 toDefinition().

◆ toClassDefMutable() [1/2]

ClassDefMutable* toClassDefMutable ( const Definition d)

在文件 classdef.cpp4956 行定义.

4957 {
4958  if (d && typeid(*d)==typeid(ClassDefImpl))
4959  {
4960  return const_cast<ClassDefMutable*>(static_cast<const ClassDefMutable*>(d));
4961  }
4962  else
4963  {
4964  return 0;
4965  }
4966 }

◆ toClassDefMutable() [2/2]

ClassDefMutable* toClassDefMutable ( Definition d)

在文件 classdef.cpp4944 行定义.

4945 {
4946  if (d && typeid(*d)==typeid(ClassDefImpl))
4947  {
4948  return static_cast<ClassDefMutable*>(d);
4949  }
4950  else
4951  {
4952  return 0;
4953  }
4954 }

被这些函数引用 addClassToContext(), addClassToGroups(), addListReferences(), addMembersToMemberGroup(), ClassDefImpl::addMembersToTemplateInstance(), addMemberToGroups(), ClassDefImpl::addTypeConstraint(), buildCompleteMemberLists(), computeMemberReferences(), computeTemplateClassRelations(), VhdlDocGen::computeVhdlComponentRelations(), ClassDefImpl::countInheritedDecMembers(), countMembers(), createTagLessInstance(), createTemplateInstanceMembers(), distributeClassGroupRelations(), distributeMemberGroupDocumentation(), findClassRelation(), findInheritedTemplateInstances(), findSectionsInDocumentation(), findTagLessClasses(), findTemplateInstanceRelation(), findUsedClassesForClass(), findUsedTemplateInstances(), findUsingDeclarations(), generateClassList(), generateNamespaceClassDocs(), MemberDef::getClassDefMutable(), getClassMutable(), ClassDefImpl::insertTemplateInstance(), ClassDefImpl::insertUsedFile(), mergeCategories(), ClassDefImpl::mergeCategory(), ClassDefImpl::mergeMembers(), SymbolResolver::resolveClassMutable(), resolveClassNestingRelations(), setAnonymousEnumType(), ClassDefImpl::setGroupDefForAllMembers(), sortMemberLists(), writeClassTree(), MemberDefImpl::writeDeclaration(), MemberList::writeDeclarations(), ClassLinkedRefMap::writeDocumentation(), ClassDefImpl::writeDocumentationForInnerClasses(), ClassDefImpl::writeInheritedMemberDeclarations() , 以及 writeTagFile().

toDefinition
Definition * toDefinition(DefinitionMutable *dm)
Definition: definition.cpp:1950
hasVisibleRoot
bool hasVisibleRoot(const BaseClassList &bcl)
Definition: classdef.cpp:4980
ClassDefMutable
Definition: classdef.h:384
Protection
Protection
Protection level of members
Definition: types.h:26
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
ClassDef::categoryOf
virtual ClassDef * categoryOf() const =0
Returns the class of which this is a category (Objective-C only)
Private
@ Private
Definition: types.h:26
toClassDefMutable
ClassDefMutable * toClassDefMutable(Definition *d)
Definition: classdef.cpp:4944
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
ClassDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
returns TRUE iff a link is possible to this item within this project.
err
void err(const char *fmt,...)
Definition: message.cpp:203
ClassDef::isVisibleInHierarchy
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
Definition::getLanguage
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
warn_uncond
void warn_uncond(const char *fmt,...)
Definition: message.cpp:194
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
classInheritedProtectionLevel
Protection classInheritedProtectionLevel(const ClassDef *cd, const ClassDef *bcd, Protection prot, int level)
Definition: classdef.cpp:5051
ClassDef::baseClasses
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
Definition::name
virtual QCString name() const =0
ClassDefAliasImpl
Definition: classdef.cpp:377
getClass
ClassDef * getClass(const QCString &key)
Definition: classdef.cpp:4974
minClassDistance
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)
Definition: classdef.cpp:5026
TRUE
#define TRUE
Definition: qcstring.h:36
LinkedMap::find
const T * find(const std::string &key) const
Find an object given the key.
Definition: linkedmap.h:60
ClassDef::subClasses
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class
ClassDefImpl
Implementation of the ClassDef interface
Definition: classdef.cpp:154
Protected
@ Protected
Definition: types.h:26
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
SrcLangExt_VHDL
@ SrcLangExt_VHDL
Definition: types.h:54
maxInheritanceDepth
const int maxInheritanceDepth
Definition: util.cpp:150
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
BaseClassList
std::vector< BaseClassDef > BaseClassList
Definition: classdef.h:81
ClassDef::isLinkable
virtual bool isLinkable() const =0
return TRUE iff a link to this class is possible (either within this project, or as a cross-reference...
FALSE
#define FALSE
Definition: qcstring.h:33