ISLEman
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ClassDef Class Reference

A class representing of a compound symbol. More...

#include <classdef.h>

Inheritance diagram for ClassDef:
Definition DefinitionIntf

Public Types

enum  CompoundType {
  Class, Struct, Union, Interface,
  Protocol, Category, Exception, Service,
  Singleton
}
 The various compound types.
 
- Public Types inherited from DefinitionIntf
enum  DefType {
  TypeClass = 0, TypeFile = 1, TypeNamespace = 2, TypeMember = 3,
  TypeGroup = 4, TypePackage = 5, TypePage = 6, TypeDir = 7,
  TypeSymbolList = 8
}
 

Public Member Functions

 ClassDef (const char *fileName, int startLine, int startColumn, const char *name, CompoundType ct, const char *ref=0, const char *fName=0, bool isSymbol=TRUE, bool isJavaEnum=FALSE)
 Creates a new compound definition. More...
 
 ~ClassDef ()
 Destroys a compound definition. More...
 
DefType definitionType () const
 Used for RTTI, this is a class.
 
QCString getOutputFileBase () const
 Returns the unique base name (without extension) of the class's file on disk.
 
QCString getInstanceOutputFileBase () const
 
QCString getSourceFileBase () const
 Returns the base name for the source code file.
 
QCString getReference () const
 If this class originated from a tagfile, this will return the tag file reference.
 
bool isReference () const
 Returns TRUE if this class is imported via a tag file.
 
bool isLocal () const
 Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES.
 
ClassSDictgetClassSDict ()
 returns the classes nested into this class
 
bool hasDocumentation () const
 returns TRUE if this class has documentation
 
bool hasDetailedDescription () const
 returns TRUE if this class has a non-empty detailed description
 
QCString collaborationGraphFileName () const
 returns the file name to use for the collaboration graph
 
QCString inheritanceGraphFileName () const
 returns the file name to use for the inheritance graph
 
QCString displayName (bool includeScope=TRUE) const
 Returns the name as it is appears in the documentation.
 
CompoundType compoundType () const
 Returns the type of compound this is, i.e. More...
 
QCString compoundTypeString () const
 Returns the type of compound as a string.
 
BaseClassListbaseClasses () const
 Returns the list of base classes from which this class directly inherits.
 
BaseClassListsubClasses () const
 Returns the list of sub classes that directly derive from this class.
 
MemberNameInfoSDictmemberNameInfoSDict () const
 Returns a dictionary of all members. More...
 
Protection protection () const
 Return the protection level (Public,Protected,Private) in which this compound was found.
 
bool isLinkableInProject () const
 returns TRUE iff a link is possible to this item within this project. More...
 
bool isLinkable () const
 return TRUE iff a link to this class is possible (either within this project, or as a cross-reference to another project).
 
bool isVisibleInHierarchy ()
 the class is visible in a class diagram, or class hierarchy More...
 
bool visibleInParentsDeclList () const
 show this class in the declaration section of its parent?
 
ArgumentListtemplateArguments () const
 Returns the template arguments of this class Will return 0 if not applicable.
 
NamespaceDefgetNamespaceDef () const
 Returns the namespace this compound is in, or 0 if it has a global scope.
 
FileDefgetFileDef () const
 Returns the file in which this compound's definition can be found. More...
 
MemberDefgetMemberByName (const QCString &) const
 Returns the Java package this class is in or 0 if not applicable.
 
bool isBaseClass (ClassDef *bcd, bool followInstances, int level=0)
 Returns TRUE iff bcd is a direct or indirect base class of this class. More...
 
bool isSubClass (ClassDef *bcd, int level=0)
 Returns TRUE iff bcd is a direct or indirect sub class of this class.
 
bool isAccessibleMember (MemberDef *md)
 returns TRUE iff md is a member of this class or of the the public/protected members of a base class
 
QDict< ClassDef > * getTemplateInstances () const
 Returns a sorted dictionary with all template instances found for this template class. More...
 
ClassDeftemplateMaster () const
 Returns the template master of which this class is an instance. More...
 
bool isTemplate () const
 Returns TRUE if this class is a template.
 
IncludeInfoincludeInfo () const
 
UsesClassDictusedImplementationClasses () const
 
UsesClassDictusedByImplementationClasses () const
 
UsesClassDictusedInterfaceClasses () const
 
ConstraintClassDicttemplateTypeConstraints () const
 
bool isTemplateArgument () const
 
virtual DefinitionfindInnerCompound (const char *name)
 Returns the definition of a nested compound if available, or 0 otherwise. More...
 
void getTemplateParameterLists (QList< ArgumentList > &lists) const
 Returns the template parameter lists that form the template declaration of this class. More...
 
QCString qualifiedNameWithTemplateParameters (QList< ArgumentList > *actualParams=0, int *actualParamIndex=0) const
 
bool isAbstract () const
 Returns TRUE if there is at least one pure virtual member in this class.
 
bool isObjectiveC () const
 Returns TRUE if this class is implemented in Objective-C.
 
bool isCSharp () const
 Returns TRUE if this class is implemented in C#.
 
bool isFinal () const
 Returns TRUE if this class is marked as final.
 
bool isSealed () const
 Returns TRUE if this class is marked as sealed.
 
bool isPublished () const
 Returns TRUE if this class is marked as published.
 
bool isExtension () const
 Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category)
 
bool isForwardDeclared () const
 Returns TRUE if this class represents a forward declaration of a template class.
 
ClassDefcategoryOf () const
 Returns the class of which this is a category (Objective-C only)
 
QCString className () const
 Returns the name of the class including outer classes, but not including namespaces.
 
MemberListgetMemberList (MemberListType lt)
 Returns the members in the list identified by lt.
 
const QList< MemberList > & getMemberLists () const
 Returns the list containing the list of members sorted per type.
 
MemberGroupSDictgetMemberGroupSDict () const
 Returns the member groups defined for this class.
 
QDict< int > * getTemplateBaseClassNames () const
 
ClassDefgetVariableInstance (const char *templSpec)
 
bool isUsedOnly () const
 
QCString anchor () const
 
bool isEmbeddedInOuterScope () const
 
bool isSimple () const
 
const ClassListtaggedInnerClasses () const
 
ClassDeftagLessReference () const
 
MemberDefisSmartPointer () const
 
bool isJavaEnum () const
 
bool isGeneric () const
 
bool isAnonymous () const
 
const ClassSDictinnerClasses () const
 
QCString title () const
 
QCString generatedFromFiles () const
 
const FileListusedFiles () const
 
const ArgumentListtypeConstraints () const
 
const ExampleSDictexampleList () const
 
bool hasExamples () const
 
QCString getMemberListFileName () const
 
bool subGrouping () const
 
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, bool force)
 
void insertMember (MemberDef *)
 
void insertUsedFile (FileDef *)
 
bool addExample (const char *anchor, const char *name, const char *file)
 
void mergeCategory (ClassDef *category)
 
void setNamespace (NamespaceDef *nd)
 
void setFileDef (FileDef *fd)
 
void setSubGrouping (bool enabled)
 
void setProtection (Protection p)
 
void setGroupDefForAllMembers (GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)
 
void addInnerCompound (Definition *d)
 
ClassDefinsertTemplateInstance (const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance)
 
void addUsedClass (ClassDef *cd, const char *accessName, Protection prot)
 
void addUsedByClass (ClassDef *cd, const char *accessName, Protection prot)
 
void setIsStatic (bool b)
 
void setCompoundType (CompoundType t)
 
void setClassName (const char *name)
 
void setClassSpecifier (uint64 spec)
 
void setTemplateArguments (ArgumentList *al)
 
void setTemplateBaseClassNames (QDict< int > *templateNames)
 
void setTemplateMaster (ClassDef *tm)
 
void setTypeConstraints (ArgumentList *al)
 
void addMembersToTemplateInstance (ClassDef *cd, const char *templSpec)
 
void makeTemplateArgument (bool b=TRUE)
 
void setCategoryOf (ClassDef *cd)
 
void setUsedOnly (bool b)
 
void addTaggedInnerClass (ClassDef *cd)
 
void setTagLessReference (ClassDef *cd)
 
void setName (const char *name)
 
void findSectionsInDocumentation ()
 
void addMembersToMemberGroup ()
 
void addListReferences ()
 
void addTypeConstraints ()
 
void computeAnchors ()
 
void mergeMembers ()
 
void sortMemberLists ()
 
void distributeMemberGroupDocumentation ()
 
void writeDocumentation (OutputList &ol)
 
void writeDocumentationForInnerClasses (OutputList &ol)
 
void writeMemberPages (OutputList &ol)
 
void writeMemberList (OutputList &ol)
 
void writeDeclaration (OutputList &ol, MemberDef *md, bool inGroup, ClassDef *inheritedFrom, const char *inheritId)
 
void writeQuickMemberLinks (OutputList &ol, MemberDef *md) const
 
void writeSummaryLinks (OutputList &ol)
 
void reclassifyMember (MemberDef *md, MemberType t)
 
void writeInlineDocumentation (OutputList &ol)
 Write class documentation inside another container (i.e. More...
 
void writeDeclarationLink (OutputList &ol, bool &found, const char *header, bool localNames)
 
void removeMemberFromLists (MemberDef *md)
 
void addGroupedInheritedMembers (OutputList &ol, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
 
int countMembersIncludingGrouped (MemberListType lt, ClassDef *inheritedFrom, bool additional)
 
int countInheritanceNodes ()
 
void writeTagFile (FTextStream &)
 
- Public Member Functions inherited from Definition
 Definition (const char *defFileName, int defLine, int defColumn, const char *name, const char *b=0, const char *d=0, bool isSymbol=TRUE)
 
virtual ~Definition ()
 
const QCStringname () const
 
QCString localName () const
 
virtual QCString qualifiedName () const
 
QCString symbolName () const
 
virtual QCString getSourceAnchor () const
 
virtual QCString documentation () const
 
int docLine () const
 
QCString docFile () const
 
virtual QCString briefDescription (bool abbreviate=FALSE) const
 
QCString briefDescriptionAsTooltip () const
 
int briefLine () const
 
QCString inbodyDocumentation () const
 
QCString inbodyFile () const
 
int inbodyLine () const
 
QCString briefFile () const
 
QCString getDefFileName () const
 
QCString getDefFileExtension () const
 
int getDefLine () const
 
int getDefColumn () const
 
virtual bool hasUserDocumentation () const
 
virtual bool isVisibleInProject () const
 
virtual bool isVisible () const
 
bool isHidden () const
 
bool isArtificial () const
 
QCString externalReference (const QCString &relPath) const
 
int getStartBodyLine () const
 
int getEndBodyLine () const
 
FileDefgetBodyDef () const
 
SrcLangExt getLanguage () const
 Returns the programming language this definition was written in. More...
 
GroupListpartOfGroups () const
 
bool isLinkableViaGroup () const
 
QList< ListItemInfo > * xrefListItems () const
 
virtual DefinitiongetOuterScope () const
 
MemberSDictgetReferencesMembers () const
 
MemberSDictgetReferencedByMembers () const
 
bool hasSections () const
 
bool hasSources () const
 
bool hasBriefDescription () const
 returns TRUE if this class has a brief description
 
QCString id () const
 
void setId (const char *name)
 
virtual void setDocumentation (const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
 
virtual void setBriefDescription (const char *b, const char *briefFile, int briefLine)
 
virtual void setInbodyDocumentation (const char *d, const char *docFile, int docLine)
 
void setReference (const char *r)
 
void addSectionsToDefinition (QList< SectionInfo > *anchorList)
 
void setBodySegment (int bls, int ble)
 
void setBodyDef (FileDef *fd)
 
void addSourceReferencedBy (MemberDef *d)
 
void addSourceReferences (MemberDef *d)
 
void setRefItems (const QList< ListItemInfo > *sli)
 
void mergeRefItems (Definition *d)
 
virtual void setOuterScope (Definition *d)
 
virtual void setHidden (bool b)
 
void setArtificial (bool b)
 
void setLanguage (SrcLangExt lang)
 
void writeSourceDef (OutputList &ol, const char *scopeName)
 
void writeInlineCode (OutputList &ol, const char *scopeName)
 
void writeSourceRefs (OutputList &ol, const char *scopeName)
 
void writeSourceReffedBy (OutputList &ol, const char *scopeName)
 
void makePartOfGroup (GroupDef *gd)
 
void writeNavigationPath (OutputList &ol) const
 
QCString navigationPathAsString () const
 
QCString pathFragment () const
 
void writeDocAnchorsToTagFile (FTextStream &)
 
void setLocalName (const QCString name)
 
void addSectionsToIndex ()
 
void writeToc (OutputList &ol)
 
void setCookie (Cookie *cookie)
 
Cookiecookie () const
 

Public Attributes

bool visited
 

Protected Member Functions

void addUsedInterfaceClasses (MemberDef *md, const char *typeStr)
 
bool hasNonReferenceSuperClass ()
 
void showUsedFiles (OutputList &ol)
 
- Protected Member Functions inherited from Definition
 Definition (const Definition &d)
 

Detailed Description

A class representing of a compound symbol.

A compound can be a class, struct, union, interface, service, singleton, or exception.

Note
This class should be renamed to CompoundDef

Constructor & Destructor Documentation

§ ClassDef()

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

Creates a new compound definition.

Parameters
fileNamefull path and file name in which this compound was found.
startLineline number where the definition of this compound starts.
startColumncolumn number where the definition of this compound starts.
namethe name of this compound (including scope)
ctthe kind of Compound
refthe tag file from which this compound is extracted or 0 if the compound doesn't come from a tag file
fNamethe file name as found in the tag file. This overwrites the file that doxygen normally generates based on the compound type & name.
isSymbolIf TRUE this class name is added as a publicly visible (and referencable) symbol.
isJavaEnumIf TRUE this class is actually a Java enum. I didn't add this to CompoundType to avoid having to adapt all translators.

§ ~ClassDef()

ClassDef::~ClassDef ( )

Destroys a compound definition.

Member Function Documentation

§ anchor()

QCString ClassDef::anchor ( ) const
virtual

Returns the anchor within a page where this item can be found

Implements Definition.

§ compoundType()

ClassDef::CompoundType ClassDef::compoundType ( ) const

Returns the type of compound this is, i.e.

class/struct/union/..

§ findInnerCompound()

Definition * ClassDef::findInnerCompound ( const char *  name)
virtual

Returns the definition of a nested compound if available, or 0 otherwise.

Parameters
nameThe name of the nested compound

Reimplemented from Definition.

§ getFileDef()

FileDef * ClassDef::getFileDef ( ) const

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).

§ getTemplateInstances()

QDict< ClassDef > * ClassDef::getTemplateInstances ( ) const

Returns a sorted dictionary with all template instances found for this template class.

Returns 0 if not a template or no instances.

§ getTemplateParameterLists()

void ClassDef::getTemplateParameterLists ( QList< ArgumentList > &  lists) const

Returns the template parameter lists that form the template declaration of this class.

Example: template<class T> class TC {}; will return a list with one ArgumentList containing one argument with type="class" and name="T".

§ hasNonReferenceSuperClass()

bool ClassDef::hasNonReferenceSuperClass ( )
protected

Returns TRUE iff this class or a class inheriting from this class is not defined in an external tag file.

§ isBaseClass()

bool ClassDef::isBaseClass ( ClassDef bcd,
bool  followInstances,
int  level = 0 
)

Returns TRUE iff bcd is a direct or indirect base class of this class.

This function will recusively traverse all branches of the inheritance tree.

§ isLinkableInProject()

bool ClassDef::isLinkableInProject ( ) const
virtual

returns TRUE iff a link is possible to this item within this project.

a link to this class is possible within this project

Implements Definition.

§ isVisibleInHierarchy()

bool ClassDef::isVisibleInHierarchy ( )

the class is visible in a class diagram, or class hierarchy

the class is visible in a class diagram, or class hierarchy

isArtificial() &&

§ memberNameInfoSDict()

MemberNameInfoSDict * ClassDef::memberNameInfoSDict ( ) const

Returns a dictionary of all members.

This includes any inherited members. Members are sorted alphabetically.

§ mergeCategory()

void ClassDef::mergeCategory ( ClassDef category)

Merges the members of a Objective-C category into this class.

§ mergeMembers()

void ClassDef::mergeMembers ( )

recusively merges the `all members' lists of a class base with that of this class. Must only be called for classes without subclasses!

§ setName()

void ClassDef::setName ( const char *  name)
virtual

Sets a new name for the definition

Reimplemented from Definition.

§ templateMaster()

ClassDef * ClassDef::templateMaster ( ) const

Returns the template master of which this class is an instance.

Returns 0 if not applicable.

§ writeDeclaration()

void ClassDef::writeDeclaration ( OutputList ol,
MemberDef md,
bool  inGroup,
ClassDef inheritedFrom,
const char *  inheritId 
)

called from MemberDef::writeDeclaration() to (recusively) write the definition of an anonymous struct, union or class.

§ writeInlineDocumentation()

void ClassDef::writeInlineDocumentation ( OutputList ol)

Write class documentation inside another container (i.e.

a group)


The documentation for this class was generated from the following files: