PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CFunctionInfo Class Reference

#include <Puma/CFunctionInfo.h>

+ Inheritance diagram for Puma::CFunctionInfo:

Description

Semantic information about a function, method, overloaded operator, or user conversion function.

Public Member Functions

 CFunctionInfo ()
 Constructor.
 
 ~CFunctionInfo ()
 Destructor.
 
CFunctionInfoDefObject () const
 Get the semantic object of the function definition.
 
CTypeFunctionTypeInfo () const
 Get the type information for the function.
 
CTypeInfoConversionType () const
 Get the conversion type if this is a conversion function.
 
CTypeInfoReturnType () const
 Get the return type of the function.
 
CTemplateInfoTemplateInfo () const
 Get the template information if this is a function template.
 
CRecordRecord () const
 Get the class or union if this is a method of a class or union.
 
CNamespaceInfoNamespace () const
 Get the namespace if this function is declared in a namespace.
 
unsigned Labels () const
 Get the number of jump labels defined in the function body.
 
unsigned Arguments () const
 Get the number of function parameters.
 
CLabelInfoLabel (unsigned n) const
 Get the n-th jump label.
 
CLabelInfoLabel (const char *name) const
 Get the jump label with the given name.
 
CArgumentInfoArgument (unsigned n) const
 Get the n-th function parameter.
 
CArgumentInfoArgument (const char *name) const
 Get the function parameter with the given name.
 
CTreeDefaultArgument (unsigned n) const
 Get the default argument of the n-th function parameter.
 
void ConversionType (CTypeInfo *type)
 Set the conversion type of a conversion function.
 
void QualifiedScope (CStructure *scope)
 Set the qualification scope of a class/union method or function declared in a namespace.
 
void addArgument (CArgumentInfo *info)
 Add a function parameter.
 
void addLabel (CLabelInfo *label)
 Add a jump label.
 
void removeArgument (const CArgumentInfo *info)
 Remove the given function parameter.
 
void removeLabel (const CLabelInfo *label)
 Remove the given jump label.
 
void TemplateInfo (CTemplateInfo *info)
 Set the template information of a function template.
 
void isTemplate (bool v)
 Set whether the function is a function template.
 
CArgumentInfonewArgument ()
 Create a new function parameter.
 
CLabelInfonewLabel ()
 Create a new jump label.
 
void deleteArgument (const CArgumentInfo *info)
 Remove and destroy the given function parameter.
 
void deleteLabel (const CLabelInfo *info)
 Remove and destroy the given jump label.
 
bool hasEllipsis () const
 Check if the function accepts a variable argument list.
 
bool hasDefaultArgument (unsigned n) const
 Check if the n-th function parameter has a default argument.
 
bool isFctDef () const
 Check if this is a function definition.
 
bool isMethod () const
 Check if this is a method of a class or union.
 
bool isStaticMethod () const
 Check if this is a static method of a class or union.
 
bool isTemplate () const
 Check if this is a function template.
 
bool isDefined () const
 Check if the function is defined.
 
bool isDestructor () const
 Check if this is a destructor.
 
bool isConstructor () const
 Check if this is a constructor.
 
bool isOperator () const
 Check if this is an overloaded operator.
 
bool isConversion () const
 Check if this is a conversion function.
 
bool isPureVirtual () const
 Check if the function is pure virtual.
 
bool isDefaultConstructor () const
 Check if this is a default constructor.
 
bool isCopyConstructor () const
 Check if this is a copy constructor.
 
bool isCopyAssignOperator () const
 Check if this is a copy assignment operator.
 
void isDestructor (bool v)
 Set whether the function is a destructor.
 
void isConstructor (bool v)
 Set whether the function is a constructor.
 
void isOperator (bool v)
 Set whether the function is an overloaded operator.
 
void isConversion (bool v)
 Set whether the function is a conversion function.
 
bool hasSameNameAndArgs (const CFunctionInfo *fi) const
 Check if the given function has the same name and parameter types as this function.
 
bool overridesVirtual () const
 Check if the function is a non-static member function and if in any of the base classes there is a function definition of a virtual function with the same name and argument types.
 
- Public Member Functions inherited from Puma::CStructure
 ~CStructure ()
 Destructor.
 
ObjectsByNameObjectInfoMap ()
 Get the entity name to semantic object map.
 
const ObjectInfoSetObjectInfos () const
 Get the entity name to semantic object map.
 
unsigned Objects () const
 Get the number of contained semantic objects.
 
unsigned Objects (const DString &name) const
 Get the number of contained semantic objects for entities with the given name.
 
unsigned Types () const
 Get the number of contained semantic objects for type declarations.
 
unsigned Types (const DString &name) const
 Get the number of contained semantic objects for declarations of types with the given name.
 
unsigned Attributes () const
 Get the number of contained semantic objects for object declarations.
 
unsigned Attributes (const DString &name) const
 Get the number of contained semantic objects for declarations of objects with the given name.
 
unsigned TemplateParams () const
 Get the number of contained semantic objects for template parameter declarations.
 
unsigned TemplateParams (const DString &name) const
 Get the number of contained semantic objects for declarations of template parameters with the given name.
 
unsigned Functions () const
 Get the number of contained semantic objects for function declarations.
 
unsigned Functions (const DString &name) const
 Get the number of contained semantic objects for declarations of functions with the given name.
 
unsigned Usings () const
 Get the number of contained semantic objects for used members.
 
unsigned Usings (const DString &name) const
 Get the number of contained semantic objects for used members with the given name.
 
unsigned Namespaces () const
 Get the number of contained semantic objects for namespace declarations.
 
unsigned Namespaces (const DString &name) const
 Get the number of contained semantic objects for declarations of namespaces with the given name.
 
unsigned Friends () const
 Get the number of contained semantic objects for friend declarations.
 
unsigned Friends (const DString &name) const
 Get the number of contained semantic objects for declarations of friends with the given name.
 
CObjectInfoObject (unsigned n) const
 Get the n-th contained semantic object.
 
CObjectInfoObject (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for entities with the given name.
 
CObjectInfoType (unsigned n) const
 Get the n-th contained semantic object for a type.
 
CObjectInfoType (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for types with the given name.
 
CTypedefInfoTypedef (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for typedefs with the given name.
 
CUsingInfoUsing (unsigned n) const
 Get the n-th contained semantic object for a using-directive.
 
CUsingInfoUsing (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for used members with the given name.
 
CNamespaceInfoNamespace (unsigned n) const
 Get the n-th contained semantic object for a namespace.
 
CNamespaceInfoNamespace (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for namespaces with the given name.
 
CRecordFriend (unsigned n) const
 Get the n-th contained semantic object for a friend.
 
CRecordFriend (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for friends with the given name.
 
CAttributeInfoAttribute (unsigned n) const
 Get the n-th contained semantic object for an object.
 
CAttributeInfoAttribute (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for objects with the given name.
 
CTemplateParamInfoTemplateParam (unsigned n) const
 Get the n-th contained semantic object for a template parameter.
 
CTemplateParamInfoTemplateParam (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for template parameters with the given name.
 
CFunctionInfoFunction (unsigned n) const
 Get the n-th contained semantic object for a function.
 
CFunctionInfoFunction (const DString &name, unsigned n=0) const
 Get the n-th contained semantic object for functions with the given name.
 
CFunctionInfoFunction (const DString &name, CTypeInfo *type) const
 Get the contained semantic object for functions with the given name and type.
 
bool isMemberAlias (const CObjectInfo *info) const
 Check if an alias exists for the given entity in this scope.
 
CMemberAliasInfoMemberAlias (const CObjectInfo *info) const
 Get the member alias information for the aliased entity.
 
void setShared (CStructure *share)
 Set a common data object for the linked semantic objects.
 
void addObject (CObjectInfo *info)
 Add a semantic object.
 
void addAttribute (CAttributeInfo *info)
 Add a semantic object for an object.
 
void addTemplateParam (CTemplateParamInfo *info)
 Add a semantic object for a template parameter.
 
void addFunction (CFunctionInfo *info)
 Add a semantic object for a function.
 
void addType (CObjectInfo *info)
 Add a semantic object for a type.
 
void addUsing (CUsingInfo *info)
 Add a semantic object for a using-directive.
 
void addNamespace (CNamespaceInfo *info)
 Add a semantic object for a namespace.
 
void addFriend (CRecord *info)
 Add a semantic object for a friend.
 
void removeObject (const CObjectInfo *info)
 Remove the semantic object.
 
void removeAttribute (const CAttributeInfo *info)
 Remove the semantic object for an object.
 
void removeTemplateParam (const CTemplateParamInfo *info)
 Remove the semantic object for a template parameter.
 
void removeFunction (const CFunctionInfo *info)
 Remove the semantic object for a function.
 
void removeType (const CObjectInfo *info)
 Remove the semantic object for a type.
 
void removeUsing (const CUsingInfo *info)
 Remove the semantic object for a using-directive.
 
void removeNamespace (const CNamespaceInfo *info)
 Remove the semantic object for a namespace.
 
void removeFriend (const CRecord *info)
 Remove the semantic object for a friend.
 
void removeMemberAlias (const CMemberAliasInfo *info)
 Remove the semantic object for a member alias.
 
void removeRegisterEntry ()
 Unregister this semantic object at all contained semantic objects.
 
void addNamedObject (CObjectInfo *info)
 Add a semantic object to the name map.
 
void removeNamedObject (const DString &name, CObjectInfo *info)
 Remove the given semantic object for the entity with the given name from the name map.
 
CAttributeInfonewAttribute ()
 Create a new semantic object for an object declaration.
 
CEnumInfonewEnum ()
 Create a new semantic object for an enumeration.
 
CUsingInfonewUsing ()
 Create a new semantic object for a using-directive.
 
CTypedefInfonewTypedef ()
 Create a new semantic object for a typedef.
 
CMemberAliasInfonewMemberAlias (CObjectInfo *member, bool direct_member=false)
 Create a new semantic object for a member alias.
 
void deleteAttribute (const CAttributeInfo *info)
 Remove and destroy the given semantic object for an object.
 
void deleteEnum (const CEnumInfo *info)
 Remove and destroy the given semantic object for an enumeration.
 
void deleteUsing (const CUsingInfo *info)
 Remove and destroy the given semantic object for a using-directive.
 
void deleteTypedef (const CTypedefInfo *info)
 Remove and destroy the given semantic object for a typedef.
 
void deleteMemberAlias (const CMemberAliasInfo *info)
 Remove and destroy the given semantic object for a member alias.
 
- Public Member Functions inherited from Puma::CScopeInfo
 ~CScopeInfo ()
 Destructor.
 
unsigned Children () const
 Get the number of child scopes (nested scopes).
 
CScopeInfoChild (unsigned) const
 Get the n-th child scope.
 
CScopeInfoParent () const
 Get the parent scope of this scope.
 
bool isFile () const
 Check if this is a file (file scope).
 
bool isNamespace () const
 Check if this is namespace.
 
bool isRecord () const
 Check if this is class or union.
 
bool isClass () const
 Check if this is a class.
 
bool isUnion () const
 Check if this is a union.
 
bool isFunction () const
 Check if this is a function.
 
bool isMethod () const
 Check if this is a class method.
 
bool isClassTemplate () const
 Check if this is a class template.
 
bool isFctTemplate () const
 Check if this is a function template.
 
bool isLocalScope () const
 Check if this is a local scope.
 
bool isLocalRecord () const
 Check if this is a local class or union.
 
bool isLocalClass () const
 Check if this is a local class.
 
bool isLocalUnion () const
 Check if this is a local union.
 
bool GlobalScope () const
 Check if this is the global (file) scope.
 
bool insideTemplate () const
 Check if this scope is inside a class or function template scope.
 
bool insideRecord () const
 Check if this scope is inside a class or union scope.
 
bool insideClass () const
 Check if this scope is inside a class scope.
 
bool insideUnion () const
 Check if this scope is inside a union scope.
 
bool insideFunction () const
 Check if this scope is inside a function scope.
 
bool insideMethod () const
 Check if this scope is inside a class method scope.
 
void Parent (const CScopeInfo *scope)
 Set the parent scope of this scope.
 
void addChild (CScopeInfo *scope)
 Add a child scope to this scope.
 
void removeChild (const CScopeInfo *scope)
 Remove a child scope.
 
CLocalScopenewLocalScope ()
 Create a new local scope information object.
 
CFunctionInfonewFunction (bool inst=false)
 Create a new function or function template instance semantic object.
 
CClassInfonewClass (bool inst=false)
 Create a new class or class template instance semantic object.
 
CUnionInfonewUnion (bool inst=false)
 Create a new union or union template instance semantic object.
 
CNamespaceInfonewNamespace ()
 Create a new namespace semantic object.
 
CTemplateInfonewTemplate ()
 Create a new template semantic object.
 
void deleteLocalScope (const CLocalScope *scope)
 Delete the given local scope semantic object.
 
void deleteFunction (const CFunctionInfo *fct)
 Delete the given function semantic object.
 
void deleteClass (const CClassInfo *c)
 Delete the given class semantic object.
 
void deleteUnion (const CUnionInfo *u)
 Delete the given union semantic object.
 
void deleteNamespace (const CNamespaceInfo *ns)
 Delete the given namespace semantic object.
 
void deleteTemplate (const CTemplateInfo *tpl)
 Delete the given template semantic object.
 
- Public Member Functions inherited from Puma::CObjectInfo
 ~CObjectInfo ()
 Destructor.
 
bool operator== (const CObjectInfo &) const
 Compare the addresses of this object and all objects linked to this object with the address of the given object.
 
bool operator!= (const CObjectInfo &) const
 Compare the addresses of this object and all objects linked to this object with the address of the given object.
 
CObjectInfoObjectInfo () const
 Get a pointer to CObjectInfo for any semantic object type.
 
CLabelInfoLabelInfo () const
 Return a pointer to CLabelInfo if the entity is a label.
 
CMemberAliasInfoMemberAliasInfo () const
 Return a pointer to CMemberAliasInfo if the entity is a member alias.
 
CBaseClassInfoBaseClassInfo () const
 Return a pointer to CBaseClassInfo if the entity is a base class specifier.
 
CUsingInfoUsingInfo () const
 Return a pointer to CUsingInfo if the entity is a using-directive.
 
CTypedefInfoTypedefInfo () const
 Return a pointer to CTypedefInfo if the entity is a typedef.
 
CArgumentInfoArgumentInfo () const
 Return a pointer to CArgumentInfo if the entity is a function parameter.
 
CAttributeInfoAttributeInfo () const
 Return a pointer to CAttributeInfo if the entity is an object or enumeration constant.
 
CTemplateParamInfoTemplateParamInfo () const
 Return a pointer to CTemplateParemInfo if the entity is a template parameter.
 
CStructureStructure () const
 Return a pointer to CStructure if the entity is a namespace, class, function, or any other construct that can contain other entities.
 
CFileInfoFileInfo () const
 Return a pointer to CFileInfo if this is the file scope.
 
CRecordRecord () const
 Return a pointer to CRecord if the entity is a class or union.
 
CLocalScopeLocalScope () const
 Return a pointer to CLocalScope if the entity is a local scope (block scope).
 
CScopeInfoScopeInfo () const
 Return a pointer to CScopeInfo if the entity defines a scope.
 
CClassInfoClassInfo () const
 Return a pointer to CClassInfo if the entity is a class.
 
CUnionInfoUnionInfo () const
 Return a pointer to CUnionInfo if the entity is a union.
 
CEnumInfoEnumInfo () const
 Return a pointer to CEnumInfo if the entity is an enumeration.
 
CFunctionInfoFunctionInfo () const
 Return a pointer to CFunctionInfo if the entity is a function, method, or overloaded operator.
 
CNamespaceInfoNamespaceInfo () const
 Return a pointer to CNamespaceInfo if the entity is a namespace.
 
CEnumeratorInfoEnumeratorInfo () const
 Return a pointer to CEnumeratorInfo if the entity is an enumeration constant.
 
CTemplateInfoTemplateInfo () const
 Return a pointer to CTemplateInfo if the entity is a template.
 
CClassInstanceClassInstance () const
 Return a pointer to CClassInstance if the entity is an instance of a class template.
 
CFctInstanceFctInstance () const
 Return a pointer to CFctInstance if the entity is an instance of a function template.
 
CUnionInstanceUnionInstance () const
 Return a pointer to CUnionInstance if the entity is an instance of a union template.
 
CTemplateInfoTemplate () const
 Return a pointer to CTemplateInfo if the entity is a template.
 
CTemplateInstanceTemplateInstance () const
 Return a pointer to CTemplateInstance if the entity is an instance of a class or function template.
 
CScopeInfoScope () const
 Get the scope in which the entity was declared.
 
CStructureQualifiedScope () const
 Get the scope of qualified names.
 
CRecordClassScope () const
 Get the class containing the class member described by this object.
 
CStructureAssignedScope () const
 Get the scope of a friend class or function.
 
ObjectId Id () const
 Get the type of this semantic object.
 
const DStringName () const
 Get the name of entity described by this semantic object.
 
const char * QualName (bool abs=false, bool tdef=false, bool unnamed=false)
 Get the qualified name of the entity described by this semantic object.
 
CObjectInfoDefObject () const
 Get the semantic information object for the definition of an entity.
 
CTypeInfoTypeInfo () const
 Get the data type of the entity.
 
CSourceInfoSourceInfo () const
 Get the source file information.
 
CSemDatabaseClassDB () const
 Get the semantic information database object containing this semantic object.
 
CSemDatabaseSemDB () const
 Get the semantic information database object containing this semantic object.
 
CTreeTree () const
 Get the syntax tree node for the entity described by this semantic object.
 
CObjectInfoNextObject () const
 Get the next semantic object linked with this object.
 
CObjectInfoPrevObject () const
 Get the previous semantic object linked with this object.
 
CObjectInfoBaseObject () const
 Get the semantic object for the base class entity this entity is overloading.
 
CTreeInit () const
 Get the initializer of the entity.
 
CProtection::Type Protection () const
 Get the member protection of the entity, if it is a class member.
 
CLinkage::Type Linkage () const
 Get the linkage of the entity.
 
CStorage::Type Storage () const
 Get the storage class of the entity.
 
const CLanguageLanguage () const
 Get the entity encoding language.
 
CLanguageLanguage ()
 Get the entity encoding language.
 
const CSpecifiersSpecifiers () const
 Get the declaration specifiers.
 
bool isType () const
 Check if the entity is a type.
 
bool isObject () const
 Check if the entity is an object.
 
bool isAnonymous () const
 Check if the entity is anonymous (has no explicit name).
 
bool isTemplate () const
 Check if the entity is a class or function template, or a template template parameter.
 
bool isTemplateInstance () const
 Check if the entity is a class or function template instance.
 
bool isBuiltin () const
 Check if the entity describes a built-in type or function.
 
bool isClassMember () const
 Check if the entity is a method or data member of a class.
 
bool isVirtual () const
 Check if the entity is declared virtual.
 
bool isStatic () const
 Check if the entity is declared static.
 
bool isThreadLocal () const
 Check if the entity is declared __thread.
 
bool isExtern () const
 Check if the entity is declared extern.
 
bool isMutable () const
 Check if the entity is declared mutable.
 
bool isRegister () const
 Check if the entity is declared register.
 
bool isExplicit () const
 Check if the entity is declared explicit.
 
bool isInline () const
 Check if the entity is declared inline.
 
bool isAuto () const
 Check if the entity is declared auto.
 
bool isRegistered (const CStructure *s) const
 Check if the given semantic object is registered as being connected to this semantic object in any way.
 
bool isLocal () const
 Check if the entity is local.
 
void Name (const char *s)
 Set the name of the entity.
 
void Name (const DString &ds)
 Set the name of the entity.
 
void TypeInfo (CTypeInfo *type)
 Set the type of the entity.
 
void BaseObject (CObjectInfo *base)
 Set the base class object for the entity this entity overloads.
 
void Protection (CProtection::Type p)
 Set the member access protection of the entity.
 
void Linkage (CLinkage::Type l)
 Set the linkage of the entity.
 
void Storage (CStorage::Type s)
 Set the storage class of the entity.
 
void Specifiers (const CSpecifiers &)
 Set the declaration specifiers.
 
void FileInfo (CFileInfo *finfo)
 Set the source file information for the entity.
 
void Tree (CTree *tree)
 Set the syntax tree node of the entity.
 
void ClassDB (CSemDatabase *db)
 Set the semantic information database object containing this semantic object.
 
void SemDB (CSemDatabase *db)
 Set the semantic information database object containing this semantic object.
 
void NextObject (CObjectInfo *obj)
 Set the link to next semantic object.
 
void PrevObject (CObjectInfo *obj)
 Set the link to next semantic object.
 
void Unlink ()
 Unlink this semantic object.
 
void Register (CStructure *s)
 Register the given semantic object as being connected to this semantic object in any way.
 
void Unregister (CStructure *s)
 Unregister the given semantic object as being connected to this semantic object in any way.
 
void isVirtual (bool v)
 Set whether the entity was declared virtual.
 
void isStatic (bool v)
 Set whether the entity was declared static.
 
void isThreadLocal (bool v)
 Set whether the entity was declared __thread.
 
void isExtern (bool v)
 Set whether the entity was declared extern.
 
void isMutable (bool v)
 Set whether the entity was declared mutable.
 
void isRegister (bool v)
 Set whether the entity was declared register.
 
void isExplicit (bool v)
 Set whether the entity was declared explicit.
 
void isInline (bool v)
 Set whether the entity was declared inline.
 
void isAuto (bool v)
 Set whether the entity was declared auto.
 
void AssignedScope (CStructure *s)
 Set the assigned scope of the entity.
 

Protected Member Functions

 CFunctionInfo (ObjectId id)
 Constructor.
 
- Protected Member Functions inherited from Puma::CStructure
 CStructure (ObjectId id)
 Constructor.
 
- Protected Member Functions inherited from Puma::CScopeInfo
 CScopeInfo (ObjectId id)
 Constructor.
 
- Protected Member Functions inherited from Puma::CObjectInfo
 CObjectInfo (ObjectId id)
 Constructor.
 

Additional Inherited Members

- Public Types inherited from Puma::CStructure
typedef std::list< CObjectInfo * > ObjectInfoList
 List type for semantic objects.
 
typedef std::map< DString, ObjectInfoListObjectsByName
 Map type for entity name to semantic object mapping.
 
typedef std::set< CObjectInfo * > ObjectInfoSet
 Set type for semantic objects.
 
- Public Types inherited from Puma::CObjectInfo
enum  ObjectId {
  FILE_INFO ,
  UNION_INFO ,
  CLASS_INFO ,
  BASECLASS_INFO ,
  MEMBERALIAS_INFO ,
  ENUM_INFO ,
  TYPEDEF_INFO ,
  FUNCTION_INFO ,
  LABEL_INFO ,
  ENUMERATOR_INFO ,
  ATTRIBUTE_INFO ,
  TEMPLATE_PARAM_INFO ,
  TEMPLATE_INFO ,
  CLASS_INSTANCE_INFO ,
  UNION_INSTANCE_INFO ,
  FCT_INSTANCE_INFO ,
  ARGUMENT_INFO ,
  LOCAL_INFO ,
  NAMESPACE_INFO ,
  USING_INFO
}
 Semantic information object types. More...
 
- Protected Attributes inherited from Puma::CObjectInfo
CStructure_QualScope
 Qualified name scope.
 
CStructure_AssignedScope
 The scope of a friend class or function.
 
Array< CStructure * > _Registered
 Set of semantic objects connected to this object in any way.
 

Constructor & Destructor Documentation

◆ CFunctionInfo() [1/2]

Puma::CFunctionInfo::CFunctionInfo ( ObjectId id)
inlineprotected

Constructor.

Parameters
idThe object type.

◆ CFunctionInfo() [2/2]

Puma::CFunctionInfo::CFunctionInfo ( )
inline

Constructor.

◆ ~CFunctionInfo()

Puma::CFunctionInfo::~CFunctionInfo ( )

Destructor.

If the object type is CObjectInfo::FUNCTION_INFO, then CObjectInfo::CleanUp() is called.

Member Function Documentation

◆ addArgument()

void Puma::CFunctionInfo::addArgument ( CArgumentInfo * info)

Add a function parameter.

Parameters
infoThe function parameter.

◆ addLabel()

void Puma::CFunctionInfo::addLabel ( CLabelInfo * label)

Add a jump label.

Parameters
labelThe jump label.

◆ Argument() [1/2]

CArgumentInfo * Puma::CFunctionInfo::Argument ( const char * name) const

Get the function parameter with the given name.

Parameters
nameThe name of the function parameter.
Returns
The function parameter or NULL if no such parameter.

◆ Argument() [2/2]

CArgumentInfo * Puma::CFunctionInfo::Argument ( unsigned n) const
inline

Get the n-th function parameter.

Parameters
nThe index of the function parameter.
Returns
The function parameter or NULL if n is invalid.

◆ Arguments()

unsigned Puma::CFunctionInfo::Arguments ( ) const
inline

Get the number of function parameters.

◆ ConversionType() [1/2]

CTypeInfo * Puma::CFunctionInfo::ConversionType ( ) const
inline

Get the conversion type if this is a conversion function.

Returns
The conversion type or NULL if not a conversion function.

◆ ConversionType() [2/2]

void Puma::CFunctionInfo::ConversionType ( CTypeInfo * type)
inline

Set the conversion type of a conversion function.

Parameters
typeThe conversion type.

◆ DefaultArgument()

CTree * Puma::CFunctionInfo::DefaultArgument ( unsigned n) const

Get the default argument of the n-th function parameter.

Parameters
nThe index of the function parameter.
Returns
The syntax tree node of the default argument or NULL if the n-th parameter has no default argument.

◆ DefObject()

CFunctionInfo * Puma::CFunctionInfo::DefObject ( ) const

Get the semantic object of the function definition.

See also
CObjectInfo::DefObject()

◆ deleteArgument()

void Puma::CFunctionInfo::deleteArgument ( const CArgumentInfo * info)

Remove and destroy the given function parameter.

Parameters
infoThe function parameter.

◆ deleteLabel()

void Puma::CFunctionInfo::deleteLabel ( const CLabelInfo * info)

Remove and destroy the given jump label.

Parameters
infoThe jump label.

◆ hasDefaultArgument()

bool Puma::CFunctionInfo::hasDefaultArgument ( unsigned n) const

Check if the n-th function parameter has a default argument.

Parameters
nThe index of the function parameter.

◆ hasEllipsis()

bool Puma::CFunctionInfo::hasEllipsis ( ) const

Check if the function accepts a variable argument list.

◆ hasSameNameAndArgs()

bool Puma::CFunctionInfo::hasSameNameAndArgs ( const CFunctionInfo * fi) const

Check if the given function has the same name and parameter types as this function.

Parameters
fiThe function to compare with.

◆ isConstructor() [1/2]

bool Puma::CFunctionInfo::isConstructor ( ) const
inline

Check if this is a constructor.

◆ isConstructor() [2/2]

void Puma::CFunctionInfo::isConstructor ( bool v)
inline

Set whether the function is a constructor.

Parameters
vtrue if the function is a constructor.

◆ isConversion() [1/2]

bool Puma::CFunctionInfo::isConversion ( ) const
inline

Check if this is a conversion function.

◆ isConversion() [2/2]

void Puma::CFunctionInfo::isConversion ( bool v)
inline

Set whether the function is a conversion function.

Parameters
vtrue if the function is a conversion function.

◆ isCopyAssignOperator()

bool Puma::CFunctionInfo::isCopyAssignOperator ( ) const

Check if this is a copy assignment operator.

◆ isCopyConstructor()

bool Puma::CFunctionInfo::isCopyConstructor ( ) const

Check if this is a copy constructor.

◆ isDefaultConstructor()

bool Puma::CFunctionInfo::isDefaultConstructor ( ) const

Check if this is a default constructor.

◆ isDefined()

bool Puma::CFunctionInfo::isDefined ( ) const

Check if the function is defined.

◆ isDestructor() [1/2]

bool Puma::CFunctionInfo::isDestructor ( ) const
inline

Check if this is a destructor.

◆ isDestructor() [2/2]

void Puma::CFunctionInfo::isDestructor ( bool v)
inline

Set whether the function is a destructor.

Parameters
vtrue if the function is a destructor.

◆ isFctDef()

bool Puma::CFunctionInfo::isFctDef ( ) const

Check if this is a function definition.

◆ isMethod()

bool Puma::CFunctionInfo::isMethod ( ) const
inline

Check if this is a method of a class or union.

◆ isOperator() [1/2]

bool Puma::CFunctionInfo::isOperator ( ) const
inline

Check if this is an overloaded operator.

◆ isOperator() [2/2]

void Puma::CFunctionInfo::isOperator ( bool v)
inline

Set whether the function is an overloaded operator.

Parameters
vtrue if the function is an overloaded operator.

◆ isPureVirtual()

bool Puma::CFunctionInfo::isPureVirtual ( ) const

Check if the function is pure virtual.

◆ isStaticMethod()

bool Puma::CFunctionInfo::isStaticMethod ( ) const
inline

Check if this is a static method of a class or union.

◆ isTemplate() [1/2]

bool Puma::CFunctionInfo::isTemplate ( ) const
inline

Check if this is a function template.

◆ isTemplate() [2/2]

void Puma::CFunctionInfo::isTemplate ( bool v)
inline

Set whether the function is a function template.

Parameters
vtrue if the function is a template.

◆ Label() [1/2]

CLabelInfo * Puma::CFunctionInfo::Label ( const char * name) const

Get the jump label with the given name.

Parameters
nameThe name of the jump label.
Returns
The label or NULL if no such label.

◆ Label() [2/2]

CLabelInfo * Puma::CFunctionInfo::Label ( unsigned n) const
inline

Get the n-th jump label.

Parameters
nThe index of the jump label.
Returns
The label or NULL if n is invalid.

◆ Labels()

unsigned Puma::CFunctionInfo::Labels ( ) const
inline

Get the number of jump labels defined in the function body.

◆ Namespace()

CNamespaceInfo * Puma::CFunctionInfo::Namespace ( ) const

Get the namespace if this function is declared in a namespace.

Returns
The namespace or NULL if not declared in a namespace.

◆ newArgument()

CArgumentInfo * Puma::CFunctionInfo::newArgument ( )

Create a new function parameter.

The new function parameter is added to the function.

◆ newLabel()

CLabelInfo * Puma::CFunctionInfo::newLabel ( )

Create a new jump label.

The new jump label is added to the function.

◆ overridesVirtual()

bool Puma::CFunctionInfo::overridesVirtual ( ) const

Check if the function is a non-static member function and if in any of the base classes there is a function definition of a virtual function with the same name and argument types.

◆ QualifiedScope()

void Puma::CFunctionInfo::QualifiedScope ( CStructure * scope)
inline

Set the qualification scope of a class/union method or function declared in a namespace.

Parameters
scopeThe qualification scope.

◆ Record()

CRecord * Puma::CFunctionInfo::Record ( ) const

Get the class or union if this is a method of a class or union.

Returns
The class/union or NULL if not a method.

◆ removeArgument()

void Puma::CFunctionInfo::removeArgument ( const CArgumentInfo * info)

Remove the given function parameter.

Parameters
infoThe function parameter.

◆ removeLabel()

void Puma::CFunctionInfo::removeLabel ( const CLabelInfo * label)

Remove the given jump label.

Parameters
labelThe jump label.

◆ ReturnType()

CTypeInfo * Puma::CFunctionInfo::ReturnType ( ) const

Get the return type of the function.

◆ TemplateInfo() [1/2]

CTemplateInfo * Puma::CFunctionInfo::TemplateInfo ( ) const
inline

Get the template information if this is a function template.

Returns
The template information or NULL if not a function template.

◆ TemplateInfo() [2/2]

void Puma::CFunctionInfo::TemplateInfo ( CTemplateInfo * info)
inline

Set the template information of a function template.

Parameters
infoThe template information.

◆ TypeInfo()

CTypeFunction * Puma::CFunctionInfo::TypeInfo ( ) const
inline

Get the type information for the function.