Doxygen
classdef.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #ifndef CLASSDEF_H
19 #define CLASSDEF_H
20 
21 #include <vector>
22 #include <set>
23 
24 #include "containers.h"
25 #include "definition.h"
26 #include "arguments.h"
27 #include "membergroup.h"
28 
29 struct Argument;
30 class MemberDef;
31 class MemberDefMutable;
32 class MemberList;
33 class MemberLists;
34 class ClassLinkedRefMap;
35 class OutputList;
36 class FileDef;
37 class FileList;
38 class NamespaceDef;
39 class MemberDef;
40 class ExampleList;
42 class PackageDef;
43 class GroupDef;
44 struct IncludeInfo;
45 class ClassDefImpl;
46 class ClassDef;
47 class ClassDefMutable;
48 class UsesClassList;
50 class MemberGroupList;
51 
52 /** Class that contains information about an inheritance relation.
53  */
55 {
57  classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
58 
59  /** Class definition that this relation inherits from. */
61 
62  /** name used in the inheritance list
63  * (may be a typedef name instead of the class name)
64  */
66 
67  /** Protection level of the inheritance relation:
68  * Public, Protected, or Private
69  */
71 
72  /** Virtualness of the inheritance relation:
73  * Normal, or Virtual
74  */
76 
77  /** Template arguments used for the base class */
79 };
80 
81 using BaseClassList = std::vector<BaseClassDef>;
82 
83 /** Class that contains information about a template instance relation */
85 {
86  TemplateInstanceDef(const QCString &ts,const ClassDef *cd) : templSpec(ts), classDef(cd) {}
89 };
90 
91 using TemplateInstanceList = std::vector<TemplateInstanceDef>;
92 
93 using TemplateNameMap = std::map<std::string,int>;
94 
95 using ClassDefSet = std::set<const ClassDef*>;
96 
97 
98 /** A abstract class representing of a compound symbol.
99  *
100  * A compound can be a class, struct, union, interface, service, singleton,
101  * or exception.
102  */
103 class ClassDef : public Definition
104 {
105  public:
106  /** The various compound types */
107  enum CompoundType { Class, //=Entry::CLASS_SEC,
108  Struct, //=Entry::STRUCT_SEC,
109  Union, //=Entry::UNION_SEC,
110  Interface, //=Entry::INTERFACE_SEC,
111  Protocol, //=Entry::PROTOCOL_SEC,
112  Category, //=Entry::CATEGORY_SEC,
113  Exception, //=Entry::EXCEPTION_SEC
114  Service, //=Entry::CLASS_SEC
115  Singleton, //=Entry::CLASS_SEC
116  };
117 
118  virtual ~ClassDef() {}
119 
120  //-----------------------------------------------------------------------------------
121  // --- getters
122  //-----------------------------------------------------------------------------------
123 
124  /** Used for RTTI, this is a class */
125  virtual DefType definitionType() const = 0;
126 
127  /** Returns the unique base name (without extension) of the class's file on disk */
128  virtual QCString getOutputFileBase() const = 0;
129  virtual QCString getInstanceOutputFileBase() const = 0;
130 
131  /** Returns the base name for the source code file */
132  virtual QCString getSourceFileBase() const = 0;
133 
134  /** If this class originated from a tagfile, this will return the tag file reference */
135  virtual QCString getReference() const = 0;
136 
137  /** Returns TRUE if this class is imported via a tag file */
138  virtual bool isReference() const = 0;
139 
140  /** Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES */
141  virtual bool isLocal() const = 0;
142 
143  /** returns the classes nested into this class */
144  virtual ClassLinkedRefMap getClasses() const = 0;
145 
146  /** returns TRUE if this class has documentation */
147  virtual bool hasDocumentation() const = 0;
148 
149  /** returns TRUE if this class has a non-empty detailed description */
150  virtual bool hasDetailedDescription() const = 0;
151 
152  /** returns the file name to use for the collaboration graph */
153  virtual QCString collaborationGraphFileName() const = 0;
154 
155  /** returns the file name to use for the inheritance graph */
156  virtual QCString inheritanceGraphFileName() const = 0;
157 
158  /** Returns the name as it is appears in the documentation */
159  virtual QCString displayName(bool includeScope=TRUE) const = 0;
160 
161  /** Returns the type of compound this is, i.e. class/struct/union/.. */
162  virtual CompoundType compoundType() const = 0;
163 
164  /** Returns the type of compound as a string */
165  virtual QCString compoundTypeString() const = 0;
166 
167  /** Returns the list of base classes from which this class directly
168  * inherits.
169  */
170  virtual const BaseClassList &baseClasses() const = 0;
171 
172  /** Update the list of base classes to the one passed */
173  virtual void updateBaseClasses(const BaseClassList &bcd) = 0;
174 
175  /** Returns the list of sub classes that directly derive from this class
176  */
177  virtual const BaseClassList &subClasses() const = 0;
178 
179  /** Update the list of sub classes to the one passed */
180  virtual void updateSubClasses(const BaseClassList &bcd) = 0;
181 
182  /** Returns a dictionary of all members. This includes any inherited
183  * members. Members are sorted alphabetically.
184  */
185  virtual const MemberNameInfoLinkedMap &memberNameInfoLinkedMap() const = 0;
186 
187  /** Return the protection level (Public,Protected,Private) in which
188  * this compound was found.
189  */
190  virtual Protection protection() const = 0;
191 
192  /** returns TRUE iff a link is possible to this item within this project.
193  */
194  virtual bool isLinkableInProject() const = 0;
195 
196  /** return TRUE iff a link to this class is possible (either within
197  * this project, or as a cross-reference to another project).
198  */
199  virtual bool isLinkable() const = 0;
200 
201  /** the class is visible in a class diagram, or class hierarchy */
202  virtual bool isVisibleInHierarchy() const = 0;
203 
204  /** show this class in the declaration section of its parent? */
205  virtual bool visibleInParentsDeclList() const = 0;
206 
207  /** Returns the template arguments of this class
208  */
209  virtual const ArgumentList &templateArguments() const = 0;
210 
211  /** Returns the namespace this compound is in, or 0 if it has a global
212  * scope.
213  */
214  //virtual NamespaceDef *getNamespaceDef() const = 0;
215 
216  /** Returns the file in which this compound's definition can be found.
217  * Should not return 0 (but it might be a good idea to check anyway).
218  */
219  virtual FileDef *getFileDef() const = 0;
220 
221  /** Returns the Java package this class is in or 0 if not applicable.
222  */
223 
224  virtual const MemberDef *getMemberByName(const QCString &) const = 0;
225 
226  /** Returns TRUE iff \a bcd is a direct or indirect base class of this
227  * class. This function will recursively traverse all branches of the
228  * inheritance tree.
229  */
230  virtual bool isBaseClass(const ClassDef *bcd,bool followInstances,int level=0) const = 0;
231 
232  /** Returns TRUE iff \a bcd is a direct or indirect sub class of this
233  * class.
234  */
235  virtual bool isSubClass(ClassDef *bcd,int level=0) const = 0;
236 
237  /** returns TRUE iff \a md is a member of this class or of the
238  * the public/protected members of a base class
239  */
240  virtual bool isAccessibleMember(const MemberDef *md) const = 0;
241 
242  /** Returns a sorted dictionary with all template instances found for
243  * this template class. Returns 0 if not a template or no instances.
244  */
245  virtual const TemplateInstanceList &getTemplateInstances() const = 0;
246 
247  /** Returns the template master of which this class is an instance.
248  * Returns 0 if not applicable.
249  */
250  virtual const ClassDef *templateMaster() const = 0;
251 
252  /** Returns TRUE if this class is a template */
253  virtual bool isTemplate() const = 0;
254 
255  virtual const IncludeInfo *includeInfo() const = 0;
256 
257  virtual const UsesClassList &usedImplementationClasses() const = 0;
258 
259  virtual const UsesClassList &usedByImplementationClasses() const = 0;
260 
261  virtual const ConstraintClassList &templateTypeConstraints() const = 0;
262 
263  virtual bool isTemplateArgument() const = 0;
264 
265  /** Returns the definition of a nested compound if
266  * available, or 0 otherwise.
267  * @param name The name of the nested compound
268  */
269  virtual const Definition *findInnerCompound(const QCString &name) const = 0;
270 
271  /** Returns the template parameter lists that form the template
272  * declaration of this class.
273  *
274  * Example: <code>template<class T> class TC {} = 0;</code>
275  * will return a list with one ArgumentList containing one argument
276  * with type="class" and name="T".
277  */
278  virtual ArgumentLists getTemplateParameterLists() const = 0;
279 
281  const ArgumentLists *actualParams=0,uint *actualParamIndex=0) const = 0;
282 
283  /** Returns TRUE if there is at least one pure virtual member in this
284  * class.
285  */
286  virtual bool isAbstract() const = 0;
287 
288  /** Returns TRUE if this class is implemented in Objective-C */
289  virtual bool isObjectiveC() const = 0;
290 
291  /** Returns TRUE if this class is implemented in Fortran */
292  virtual bool isFortran() const = 0;
293 
294  /** Returns TRUE if this class is implemented in C# */
295  virtual bool isCSharp() const = 0;
296 
297  /** Returns TRUE if this class is marked as final */
298  virtual bool isFinal() const = 0;
299 
300  /** Returns TRUE if this class is marked as sealed */
301  virtual bool isSealed() const = 0;
302 
303  /** Returns TRUE if this class is marked as published */
304  virtual bool isPublished() const = 0;
305 
306  /** Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category) */
307  virtual bool isExtension() const = 0;
308 
309  /** Returns TRUE if this class represents a forward declaration of a template class */
310  virtual bool isForwardDeclared() const = 0;
311 
312  /** Returns TRUE if this class represents an interface */
313  virtual bool isInterface() const = 0;
314 
315  /** Returns the class of which this is a category (Objective-C only) */
316  virtual ClassDef *categoryOf() const = 0;
317 
318  /** Returns the name of the class including outer classes, but not
319  * including namespaces.
320  */
321  virtual QCString className() const = 0;
322 
323  /** Returns the members in the list identified by \a lt */
324  virtual MemberList *getMemberList(MemberListType lt) const = 0;
325 
326  /** Returns the list containing the list of members sorted per type */
327  virtual const MemberLists &getMemberLists() const = 0;
328 
329  /** Returns the member groups defined for this class */
330  virtual const MemberGroupList &getMemberGroups() const = 0;
331 
332  virtual const TemplateNameMap &getTemplateBaseClassNames() const = 0;
333 
334  virtual bool isUsedOnly() const = 0;
335 
336  virtual QCString anchor() const = 0;
337  virtual bool isEmbeddedInOuterScope() const = 0;
338 
339  virtual bool isSimple() const = 0;
340 
341  virtual const ClassDef *tagLessReference() const = 0;
342 
343  virtual const MemberDef *isSmartPointer() const = 0;
344 
345  virtual bool isJavaEnum() const = 0;
346 
347  virtual QCString title() const = 0;
348 
349  virtual QCString generatedFromFiles() const = 0;
350  virtual const FileList &usedFiles() const = 0;
351 
352  virtual const ArgumentList &typeConstraints() const = 0;
353  virtual const ExampleList &getExamples() const = 0;
354  virtual bool hasExamples() const = 0;
355  virtual QCString getMemberListFileName() const = 0;
356  virtual bool subGrouping() const = 0;
357 
358  virtual bool isSliceLocal() const = 0;
359  virtual bool hasNonReferenceSuperClass() const = 0;
360 
361  virtual QCString requiresClause() const = 0;
362 
363  //-----------------------------------------------------------------------------------
364  // --- count members ----
365  //-----------------------------------------------------------------------------------
366 
368  const ClassDef *inheritedFrom,bool additional) const = 0;
369  virtual int countInheritanceNodes() const = 0;
370  virtual int countMemberDeclarations(MemberListType lt,const ClassDef *inheritedFrom,
371  int lt2,bool invert,bool showAlways,ClassDefSet &visitedClasses) const = 0;
372 
373  //-----------------------------------------------------------------------------------
374  // --- helpers ----
375  //-----------------------------------------------------------------------------------
376 
377  virtual ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
378  const QCString &templSpec,bool &freshInstance) const = 0;
379  virtual void writeDeclarationLink(OutputList &ol,bool &found,
380  const QCString &header,bool localNames) const = 0;
381 
382 };
383 
385 {
386  public:
387  //-----------------------------------------------------------------------------------
388  // --- setters ----
389  //-----------------------------------------------------------------------------------
390 
391  virtual void setIncludeFile(FileDef *fd,const QCString &incName,bool local,bool force) = 0;
392  virtual void setFileDef(FileDef *fd) = 0;
393  virtual void setSubGrouping(bool enabled) = 0;
394  virtual void setProtection(Protection p) = 0;
395  virtual void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs) = 0;
396  virtual void setIsStatic(bool b) = 0;
397  virtual void setCompoundType(CompoundType t) = 0;
398  virtual void setClassName(const QCString &name) = 0;
399  virtual void setClassSpecifier(uint64 spec) = 0;
400  virtual void setTemplateArguments(const ArgumentList &al) = 0;
401  virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames) = 0;
402  virtual void setTemplateMaster(const ClassDef *tm) = 0;
403  virtual void setTypeConstraints(const ArgumentList &al) = 0;
404  virtual void setCategoryOf(ClassDef *cd) = 0;
405  virtual void setUsedOnly(bool b) = 0;
406  virtual void setTagLessReference(const ClassDef *cd) = 0;
407  virtual void setName(const QCString &name) = 0;
408  virtual void setMetaData(const QCString &md) = 0;
409  virtual void setRequiresClause(const QCString &req) = 0;
410 
411  //-----------------------------------------------------------------------------------
412  // --- actions ----
413  //-----------------------------------------------------------------------------------
414 
415  virtual void insertBaseClass(ClassDef *,const QCString &name,Protection p,Specifier s,const QCString &t=QCString()) = 0;
416  virtual void insertSubClass(ClassDef *,Protection p,Specifier s,const QCString &t=QCString()) = 0;
417  virtual void insertMember(MemberDef *) = 0;
418  virtual void insertUsedFile(const FileDef *) = 0;
419  virtual void addMembersToTemplateInstance(const ClassDef *cd,const ArgumentList &templateArguments,const QCString &templSpec) = 0;
420  virtual void addInnerCompound(const Definition *d) = 0;
421  virtual bool addExample(const QCString &anchor,const QCString &name, const QCString &file) = 0;
422  virtual void addUsedClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
423  virtual void addUsedByClass(ClassDef *cd,const QCString &accessName,Protection prot) = 0;
424  virtual void makeTemplateArgument(bool b=TRUE) = 0;
425  virtual void mergeCategory(ClassDef *category) = 0;
426  virtual void findSectionsInDocumentation() = 0;
427  virtual void addMembersToMemberGroup() = 0;
428  virtual void addListReferences() = 0;
429  virtual void addTypeConstraints() = 0;
430  virtual void computeAnchors() = 0;
431  virtual void mergeMembers() = 0;
432  virtual void sortMemberLists() = 0;
433  virtual void distributeMemberGroupDocumentation() = 0;
434  virtual void reclassifyMember(MemberDefMutable *md,MemberType t) = 0;
435  virtual void removeMemberFromLists(MemberDef *md) = 0;
436  virtual void setAnonymousEnumType() = 0;
437  virtual void countMembers() = 0;
438  virtual void sortAllMembersList() = 0;
439 
440  //-----------------------------------------------------------------------------------
441  // --- write output ----
442  //-----------------------------------------------------------------------------------
443 
444  virtual void writeDocumentation(OutputList &ol) const = 0;
445  virtual void writeDocumentationForInnerClasses(OutputList &ol) const = 0;
446  virtual void writeMemberPages(OutputList &ol) const = 0;
447  virtual void writeMemberList(OutputList &ol) const = 0;
448  virtual void writeDeclaration(OutputList &ol,const MemberDef *md,bool inGroup,
449  int indentLevel, const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
450  virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *md) const = 0;
451  virtual void writeSummaryLinks(OutputList &ol) const = 0;
452  virtual void writeInlineDocumentation(OutputList &ol) const = 0;
453  virtual void writeTagFile(TextStream &) = 0;
454  virtual void writeMemberDeclarations(OutputList &ol,ClassDefSet &visitedClasses,
455  MemberListType lt,const QCString &title,
456  const QCString &subTitle=QCString(),
457  bool showInline=FALSE,const ClassDef *inheritedFrom=0,
458  int lt2=-1,bool invert=FALSE,bool showAlways=FALSE) const = 0;
460  const ClassDef *inheritedFrom,const QCString &inheritId) const = 0;
461 
462 
463 };
464 
465 /** Factory method to create a new ClassDef object */
467  const QCString &fileName,int startLine,int startColumn,
468  const QCString &name,ClassDef::CompoundType ct,
469  const QCString &ref=QCString(),const QCString &fName=QCString(),
470  bool isSymbol=TRUE,bool isJavaEnum=FALSE);
471 
472 ClassDef *createClassDefAlias(const Definition *newScope,const ClassDef *cd);
473 
474 // --- Cast functions
475 
478 const ClassDef *toClassDef(const Definition *d);
481 
482 // --- Helpers
483 //
484 ClassDef *getClass(const QCString &key);
486 {
487  return toClassDefMutable(getClass(key));
488 }
489 bool hasVisibleRoot(const BaseClassList &bcl);
490 bool classHasVisibleChildren(const ClassDef *cd);
491 bool classVisibleInIndex(const ClassDef *cd);
492 int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level=0);
493 Protection classInheritedProtectionLevel(const ClassDef *cd,const ClassDef *bcd,Protection prot=Public,int level=0);
494 
495 //------------------------------------------------------------------------
496 
497 /** Class that contains information about a usage relation.
498  */
500 {
502  {
503  }
505  {
506  }
507  void addAccessor(const QCString &s)
508  {
509  if (accessors.find(s.str())==accessors.end())
510  {
511  accessors.insert(s.str());
512  }
513  }
514  /** Class definition that this relation uses. */
516 
517  /** Dictionary of member variable names that form the edge labels of the
518  * usage relation.
519  */
521 
522  /** Template arguments used for the base class */
524 
525  bool containment = true;
526 };
527 
528 class UsesClassList : public std::vector<UsesClassDef>
529 {
530 };
531 
532 //------------------------------------------------------------------------
533 
534 /** Class that contains information about a type constraint relations.
535  */
537 {
539  {
540  }
542  {
543  }
544  void addAccessor(const QCString &s)
545  {
546  if (accessors.find(s.str())==accessors.end())
547  {
548  accessors.insert(s.str());
549  }
550  }
551  /** Class definition that this relation uses. */
553 
554  /** Dictionary of member types names that form the edge labels of the
555  * constraint relation.
556  */
558 };
559 
560 class ConstraintClassList : public std::vector<ConstraintClassDef>
561 {
562 };
563 
564 //------------------------------------------------------------------------
565 
566 #endif
ClassDef::requiresClause
virtual QCString requiresClause() const =0
ClassDef::Service
@ Service
Definition: classdef.h:114
ClassDef::countMemberDeclarations
virtual int countMemberDeclarations(MemberListType lt, const ClassDef *inheritedFrom, int lt2, bool invert, bool showAlways, ClassDefSet &visitedClasses) const =0
UsesClassDef::UsesClassDef
UsesClassDef(ClassDef *cd)
Definition: classdef.h:501
ClassDef::tagLessReference
virtual const ClassDef * tagLessReference() const =0
ClassDefMutable::sortMemberLists
virtual void sortMemberLists()=0
BaseClassDef::virt
Specifier virt
Virtualness of the inheritance relation: Normal, or Virtual
Definition: classdef.h:75
ClassDef::hasDocumentation
virtual bool hasDocumentation() const =0
returns TRUE if this class has documentation
TemplateInstanceDef
Class that contains information about a template instance relation
Definition: classdef.h:84
ClassDefMutable::addInnerCompound
virtual void addInnerCompound(const Definition *d)=0
ClassDefMutable::setSubGrouping
virtual void setSubGrouping(bool enabled)=0
ClassDefMutable
Definition: classdef.h:384
ClassDefMutable::addUsedClass
virtual void addUsedClass(ClassDef *cd, const QCString &accessName, Protection prot)=0
Protection
Protection
Protection level of members
Definition: types.h:26
membergroup.h
ClassDefMutable::setTemplateMaster
virtual void setTemplateMaster(const ClassDef *tm)=0
ClassDef::Union
@ Union
Definition: classdef.h:109
MemberListType
MemberListType
Definition: types.h:100
ClassDef::isPublished
virtual bool isPublished() const =0
Returns TRUE if this class is marked as published
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
ClassDefMutable::setCompoundType
virtual void setCompoundType(CompoundType t)=0
ClassDef::categoryOf
virtual ClassDef * categoryOf() const =0
Returns the class of which this is a category (Objective-C only)
ClassDef::updateBaseClasses
virtual void updateBaseClasses(const BaseClassList &bcd)=0
Update the list of base classes to the one passed
ClassDef::isEmbeddedInOuterScope
virtual bool isEmbeddedInOuterScope() const =0
NamespaceDef
An abstract interface of a namespace symbol.
Definition: namespacedef.h:54
ClassDefMutable::sortAllMembersList
virtual void sortAllMembersList()=0
toClassDefMutable
ClassDefMutable * toClassDefMutable(Definition *d)
Definition: classdef.cpp:4944
ClassDef::hasExamples
virtual bool hasExamples() const =0
ClassDef::getExamples
virtual const ExampleList & getExamples() const =0
ConstraintClassDef
Class that contains information about a type constraint relations.
Definition: classdef.h:536
ClassDef::isLocal
virtual bool isLocal() const =0
Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES
ClassDefMutable::removeMemberFromLists
virtual void removeMemberFromLists(MemberDef *md)=0
ConstraintClassDef::ConstraintClassDef
ConstraintClassDef(ClassDef *cd)
Definition: classdef.h:538
classHasVisibleChildren
bool classHasVisibleChildren(const ClassDef *cd)
Definition: classdef.cpp:4991
ArgumentList
This class represents an function or template argument list.
Definition: arguments.h:59
ClassDef::compoundTypeString
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string
ClassDef::title
virtual QCString title() const =0
ClassDefMutable::writeMemberList
virtual void writeMemberList(OutputList &ol) const =0
ClassDef::insertTemplateInstance
virtual ClassDef * insertTemplateInstance(const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance) const =0
ClassDef::hasDetailedDescription
virtual bool hasDetailedDescription() const =0
returns TRUE if this class has a non-empty detailed description
TemplateInstanceDef::templSpec
QCString templSpec
Definition: classdef.h:87
ClassDef::getMemberLists
virtual const MemberLists & getMemberLists() const =0
Returns the list containing the list of members sorted per type
ClassDef::CompoundType
CompoundType
The various compound types
Definition: classdef.h:107
ClassDef::Interface
@ Interface
Definition: classdef.h:110
ClassDef::subGrouping
virtual bool subGrouping() const =0
StringSet
std::set< std::string > StringSet
Definition: containers.h:30
ClassDef::isJavaEnum
virtual bool isJavaEnum() const =0
QCString::str
std::string str() const
Definition: qcstring.h:442
ClassDefMutable::insertBaseClass
virtual void insertBaseClass(ClassDef *, const QCString &name, Protection p, Specifier s, const QCString &t=QCString())=0
Specifier
Specifier
Virtualness of a member.
Definition: types.h:29
createClassDefAlias
ClassDef * createClassDefAlias(const Definition *newScope, const ClassDef *cd)
Definition: classdef.cpp:559
ClassDef::isLinkableInProject
virtual bool isLinkableInProject() const =0
returns TRUE iff a link is possible to this item within this project.
ClassDefMutable::setCategoryOf
virtual void setCategoryOf(ClassDef *cd)=0
Public
@ Public
Definition: types.h:26
ClassDef::isExtension
virtual bool isExtension() const =0
Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category)
TemplateInstanceList
std::vector< TemplateInstanceDef > TemplateInstanceList
Definition: classdef.h:91
ClassDefMutable::writeQuickMemberLinks
virtual void writeQuickMemberLinks(OutputList &ol, const MemberDef *md) const =0
ClassDef::isFinal
virtual bool isFinal() const =0
Returns TRUE if this class is marked as final
BaseClassDef::prot
Protection prot
Protection level of the inheritance relation: Public, Protected, or Private
Definition: classdef.h:70
ClassDefMutable::setName
virtual void setName(const QCString &name)=0
ClassDef::getTemplateBaseClassNames
virtual const TemplateNameMap & getTemplateBaseClassNames() const =0
MemberType
MemberType
Definition: types.h:274
ClassDef::isVisibleInHierarchy
virtual bool isVisibleInHierarchy() const =0
the class is visible in a class diagram, or class hierarchy
MemberLists
Definition: memberlist.h:138
ClassDefMutable::setTemplateBaseClassNames
virtual void setTemplateBaseClassNames(const TemplateNameMap &templateNames)=0
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
ClassDef::protection
virtual Protection protection() const =0
Return the protection level (Public,Protected,Private) in which this compound was found.
ClassDef::isFortran
virtual bool isFortran() const =0
Returns TRUE if this class is implemented in Fortran
ClassDef::typeConstraints
virtual const ArgumentList & typeConstraints() const =0
classInheritedProtectionLevel
Protection classInheritedProtectionLevel(const ClassDef *cd, const ClassDef *bcd, Protection prot=Public, int level=0)
Definition: classdef.cpp:5051
ClassDef::includeInfo
virtual const IncludeInfo * includeInfo() const =0
ClassDefMutable::writeTagFile
virtual void writeTagFile(TextStream &)=0
MemberDefMutable
Definition: memberdef.h:296
hasVisibleRoot
bool hasVisibleRoot(const BaseClassList &bcl)
Definition: classdef.cpp:4980
ClassDef::isSimple
virtual bool isSimple() const =0
ClassDef::getFileDef
virtual FileDef * getFileDef() const =0
Returns the namespace this compound is in, or 0 if it has a global scope.
ClassDefMutable::distributeMemberGroupDocumentation
virtual void distributeMemberGroupDocumentation()=0
ClassDef::Class
@ Class
Definition: classdef.h:107
ClassDefMutable::setIsStatic
virtual void setIsStatic(bool b)=0
UsesClassDef::addAccessor
void addAccessor(const QCString &s)
Definition: classdef.h:507
ClassDefMutable::setIncludeFile
virtual void setIncludeFile(FileDef *fd, const QCString &incName, bool local, bool force)=0
ClassDef::templateMaster
virtual const ClassDef * templateMaster() const =0
Returns the template master of which this class is an instance.
GroupDef
A model of a group of symbols.
Definition: groupdef.h:49
ClassDef::getSourceFileBase
virtual QCString getSourceFileBase() const =0
Returns the base name for the source code file
ClassDef::isSmartPointer
virtual const MemberDef * isSmartPointer() const =0
ClassDef::countInheritanceNodes
virtual int countInheritanceNodes() const =0
uint
unsigned uint
Definition: qcstring.h:40
ClassDef::generatedFromFiles
virtual QCString generatedFromFiles() const =0
ClassDefMutable::setMetaData
virtual void setMetaData(const QCString &md)=0
OutputList
Class representing a list of output generators that are written to in parallel.
Definition: outputlist.h:37
ClassDefMutable::setClassName
virtual void setClassName(const QCString &name)=0
TemplateInstanceDef::classDef
const ClassDef * classDef
Definition: classdef.h:88
ClassDefMutable::reclassifyMember
virtual void reclassifyMember(MemberDefMutable *md, MemberType t)=0
ClassDefMutable::setGroupDefForAllMembers
virtual void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)=0
ClassDef::isAccessibleMember
virtual bool isAccessibleMember(const MemberDef *md) const =0
returns TRUE iff md is a member of this class or of the the public/protected members of a base class
MemberNameInfoLinkedMap
Definition: membername.h:126
ClassDef::visibleInParentsDeclList
virtual bool visibleInParentsDeclList() const =0
show this class in the declaration section of its parent?
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
BaseClassDef::BaseClassDef
BaseClassDef(ClassDef *cd, const QCString &n, Protection p, Specifier v, const QCString &t)
Definition: classdef.h:56
ClassDef::~ClassDef
virtual ~ClassDef()
Definition: classdef.h:118
ClassDef
A abstract class representing of a compound symbol.
Definition: classdef.h:103
ClassDefMutable::mergeCategory
virtual void mergeCategory(ClassDef *category)=0
ClassDefMutable::makeTemplateArgument
virtual void makeTemplateArgument(bool b=TRUE)=0
ConstraintClassDef::accessors
StringSet accessors
Dictionary of member types names that form the edge labels of the constraint relation.
Definition: classdef.h:557
ClassDef::getInstanceOutputFileBase
virtual QCString getInstanceOutputFileBase() const =0
minClassDistance
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level=0)
Definition: classdef.cpp:5026
ClassDef::definitionType
virtual DefType definitionType() const =0
Used for RTTI, this is a class
ClassDef::memberNameInfoLinkedMap
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
ConstraintClassDef::~ConstraintClassDef
~ConstraintClassDef()
Definition: classdef.h:541
UsesClassDef::classDef
ClassDef * classDef
Class definition that this relation uses.
Definition: classdef.h:515
ClassDef::getTemplateInstances
virtual const TemplateInstanceList & getTemplateInstances() const =0
Returns a sorted dictionary with all template instances found for this template class.
IncludeInfo
Class representing the data associated with a #include statement.
Definition: filedef.h:48
ClassDefMutable::findSectionsInDocumentation
virtual void findSectionsInDocumentation()=0
ClassDef::getOutputFileBase
virtual QCString getOutputFileBase() const =0
Returns the unique base name (without extension) of the class's file on disk
ClassDef::isSliceLocal
virtual bool isSliceLocal() const =0
DefinitionMutable
Definition: definition.h:308
ClassDefMutable::setFileDef
virtual void setFileDef(FileDef *fd)=0
FileList
Definition: filedef.h:205
ClassDef::baseClasses
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
ClassDefMutable::writeDocumentationForInnerClasses
virtual void writeDocumentationForInnerClasses(OutputList &ol) const =0
arguments.h
ClassDefMutable::setClassSpecifier
virtual void setClassSpecifier(uint64 spec)=0
ConstraintClassDef::addAccessor
void addAccessor(const QCString &s)
Definition: classdef.h:544
Definition::name
virtual QCString name() const =0
ClassDef::usedFiles
virtual const FileList & usedFiles() const =0
ClassDef::isObjectiveC
virtual bool isObjectiveC() const =0
Returns TRUE if this class is implemented in Objective-C
ClassDef::getClasses
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
Argument
This class contains the information about the argument of a function or template
Definition: arguments.h:26
getClass
ClassDef * getClass(const QCString &key)
Definition: classdef.cpp:4974
Grouping::GroupPri_t
GroupPri_t
Grouping priority
Definition: types.h:67
ClassDef::isInterface
virtual bool isInterface() const =0
Returns TRUE if this class represents an interface
ClassDef::getTemplateParameterLists
virtual ArgumentLists getTemplateParameterLists() const =0
Returns the template parameter lists that form the template declaration of this class.
ClassDef::getMemberListFileName
virtual QCString getMemberListFileName() const =0
ClassDefMutable::setTypeConstraints
virtual void setTypeConstraints(const ArgumentList &al)=0
ClassDefMutable::computeAnchors
virtual void computeAnchors()=0
ClassDef::isBaseClass
virtual bool isBaseClass(const ClassDef *bcd, bool followInstances, int level=0) const =0
Returns TRUE iff bcd is a direct or indirect base class of this class.
ClassDefMutable::addUsedByClass
virtual void addUsedByClass(ClassDef *cd, const QCString &accessName, Protection prot)=0
TRUE
#define TRUE
Definition: qcstring.h:36
ClassDef::findInnerCompound
virtual const Definition * findInnerCompound(const QCString &name) const =0
Returns the definition of a nested compound if available, or 0 otherwise.
ClassDef::Category
@ Category
Definition: classdef.h:112
ClassDef::isSubClass
virtual bool isSubClass(ClassDef *bcd, int level=0) const =0
Returns TRUE iff bcd is a direct or indirect sub class of this class.
ClassDef::Struct
@ Struct
Definition: classdef.h:108
TemplateInstanceDef::TemplateInstanceDef
TemplateInstanceDef(const QCString &ts, const ClassDef *cd)
Definition: classdef.h:86
ClassDefMutable::insertUsedFile
virtual void insertUsedFile(const FileDef *)=0
Definition::DefType
DefType
Definition: definition.h:85
classVisibleInIndex
bool classVisibleInIndex(const ClassDef *cd)
Definition: classdef.cpp:5016
ClassDefMutable::insertSubClass
virtual void insertSubClass(ClassDef *, Protection p, Specifier s, const QCString &t=QCString())=0
ClassDefMutable::writeMemberDeclarations
virtual void writeMemberDeclarations(OutputList &ol, ClassDefSet &visitedClasses, MemberListType lt, const QCString &title, const QCString &subTitle=QCString(), bool showInline=FALSE, const ClassDef *inheritedFrom=0, int lt2=-1, bool invert=FALSE, bool showAlways=FALSE) const =0
ConstraintClassList
Definition: classdef.h:560
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
ClassDef::compoundType
virtual CompoundType compoundType() const =0
Returns the type of compound this is, i.e.
ClassDef::countMembersIncludingGrouped
virtual int countMembersIncludingGrouped(MemberListType lt, const ClassDef *inheritedFrom, bool additional) const =0
containers.h
ClassDef::updateSubClasses
virtual void updateSubClasses(const BaseClassList &bcd)=0
Update the list of sub classes to the one passed
UsesClassDef::~UsesClassDef
~UsesClassDef()
Definition: classdef.h:504
ClassDefMutable::addGroupedInheritedMembers
virtual void addGroupedInheritedMembers(OutputList &ol, MemberListType lt, const ClassDef *inheritedFrom, const QCString &inheritId) const =0
ArgumentLists
std::vector< ArgumentList > ArgumentLists
Definition: arguments.h:138
ClassDef::hasNonReferenceSuperClass
virtual bool hasNonReferenceSuperClass() const =0
ClassDefMutable::addListReferences
virtual void addListReferences()=0
ClassDef::isAbstract
virtual bool isAbstract() const =0
Returns TRUE if there is at least one pure virtual member in this class.
ClassDefMutable::addTypeConstraints
virtual void addTypeConstraints()=0
ClassDefMutable::addMembersToMemberGroup
virtual void addMembersToMemberGroup()=0
ClassDefMutable::setAnonymousEnumType
virtual void setAnonymousEnumType()=0
ClassDef::Protocol
@ Protocol
Definition: classdef.h:111
toClassDef
ClassDef * toClassDef(Definition *d)
Definition: classdef.cpp:4907
ClassDef::collaborationGraphFileName
virtual QCString collaborationGraphFileName() const =0
returns the file name to use for the collaboration graph
ClassDefMutable::addExample
virtual bool addExample(const QCString &anchor, const QCString &name, const QCString &file)=0
UsesClassDef::accessors
StringSet accessors
Dictionary of member variable names that form the edge labels of the usage relation.
Definition: classdef.h:520
definition.h
ClassDef::getReference
virtual QCString getReference() const =0
If this class originated from a tagfile, this will return the tag file reference
ClassDefMutable::writeDocumentation
virtual void writeDocumentation(OutputList &ol) const =0
BaseClassDef::templSpecifiers
QCString templSpecifiers
Template arguments used for the base class
Definition: classdef.h:78
ClassDefMutable::writeMemberPages
virtual void writeMemberPages(OutputList &ol) const =0
ClassDef::isReference
virtual bool isReference() const =0
Returns TRUE if this class is imported via a tag file
MemberGroupList
Definition: membergroup.h:109
ClassDef::Singleton
@ Singleton
Definition: classdef.h:115
ClassDef::usedImplementationClasses
virtual const UsesClassList & usedImplementationClasses() const =0
ClassDef::isCSharp
virtual bool isCSharp() const =0
Returns TRUE if this class is implemented in C#
ClassDefMutable::setTagLessReference
virtual void setTagLessReference(const ClassDef *cd)=0
UsesClassDef::templSpecifiers
QCString templSpecifiers
Template arguments used for the base class
Definition: classdef.h:523
ClassDefMutable::writeDeclaration
virtual void writeDeclaration(OutputList &ol, const MemberDef *md, bool inGroup, int indentLevel, const ClassDef *inheritedFrom, const QCString &inheritId) const =0
BaseClassDef
Class that contains information about an inheritance relation.
Definition: classdef.h:54
ClassDefMutable::countMembers
virtual void countMembers()=0
ClassDef::writeDeclarationLink
virtual void writeDeclarationLink(OutputList &ol, bool &found, const QCString &header, bool localNames) const =0
ClassDef::displayName
virtual QCString displayName(bool includeScope=TRUE) const =0
Returns the name as it is appears in the documentation
ClassDefMutable::setUsedOnly
virtual void setUsedOnly(bool b)=0
ClassDef::getMemberList
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt
FileDef
A model of a file symbol.
Definition: filedef.h:73
ClassDef::getMemberByName
virtual const MemberDef * getMemberByName(const QCString &) const =0
Returns the Java package this class is in or 0 if not applicable.
ClassDefMutable::setRequiresClause
virtual void setRequiresClause(const QCString &req)=0
UsesClassDef
Class that contains information about a usage relation.
Definition: classdef.h:499
BaseClassDef::classDef
ClassDef * classDef
Class definition that this relation inherits from.
Definition: classdef.h:60
ClassDefMutable::writeInlineDocumentation
virtual void writeInlineDocumentation(OutputList &ol) const =0
ClassDefMutable::insertMember
virtual void insertMember(MemberDef *)=0
ClassDef::isTemplateArgument
virtual bool isTemplateArgument() const =0
ClassDef::isSealed
virtual bool isSealed() const =0
Returns TRUE if this class is marked as sealed
ClassDef::getMemberGroups
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class
ClassDefMutable::setProtection
virtual void setProtection(Protection p)=0
UsesClassDef::containment
bool containment
Definition: classdef.h:525
BaseClassDef::usedName
QCString usedName
name used in the inheritance list (may be a typedef name instead of the class name)
Definition: classdef.h:65
ClassDef::Exception
@ Exception
Definition: classdef.h:113
ClassDefMutable::addMembersToTemplateInstance
virtual void addMembersToTemplateInstance(const ClassDef *cd, const ArgumentList &templateArguments, const QCString &templSpec)=0
TemplateNameMap
std::map< std::string, int > TemplateNameMap
Definition: classdef.h:93
ClassDef::qualifiedNameWithTemplateParameters
virtual QCString qualifiedNameWithTemplateParameters(const ArgumentLists *actualParams=0, uint *actualParamIndex=0) const =0
ConstraintClassDef::classDef
ClassDef * classDef
Class definition that this relation uses.
Definition: classdef.h:552
UsesClassList
Definition: classdef.h:528
BaseClassList
std::vector< BaseClassDef > BaseClassList
Definition: classdef.h:81
ClassDef::isForwardDeclared
virtual bool isForwardDeclared() const =0
Returns TRUE if this class represents a forward declaration of a template class
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...
MemberList
A list of MemberDef objects as shown in documentation sections.
Definition: memberlist.h:81
ClassDefMutable::writeSummaryLinks
virtual void writeSummaryLinks(OutputList &ol) const =0
ClassLinkedRefMap
Definition: classlist.h:30
ClassDef::templateTypeConstraints
virtual const ConstraintClassList & templateTypeConstraints() const =0
uint64
uint64_t uint64
Definition: qcstring.h:43
ClassDefMutable::setTemplateArguments
virtual void setTemplateArguments(const ArgumentList &al)=0
ClassDef::className
virtual QCString className() const =0
Returns the name of the class including outer classes, but not including namespaces.
ExampleList
Definition: example.h:36
ClassDef::templateArguments
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class
getClassMutable
ClassDefMutable * getClassMutable(const QCString &key)
Definition: classdef.h:485
ClassDefSet
std::set< const ClassDef * > ClassDefSet
Definition: classdef.h:95
ClassDef::inheritanceGraphFileName
virtual QCString inheritanceGraphFileName() const =0
returns the file name to use for the inheritance graph
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
Definition: classdef.cpp:367
ClassDef::isUsedOnly
virtual bool isUsedOnly() const =0
FALSE
#define FALSE
Definition: qcstring.h:33
ClassDef::isTemplate
virtual bool isTemplate() const =0
Returns TRUE if this class is a template
ClassDefMutable::mergeMembers
virtual void mergeMembers()=0
ClassDef::usedByImplementationClasses
virtual const UsesClassList & usedByImplementationClasses() const =0
ClassDef::anchor
virtual QCString anchor() const =0
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108