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