Puma Reference Manual Puma: Puma::CObjectInfo Class Reference



Puma::CObjectInfo Class Reference

Abstract base class of all semantic information classes. More...

#include <Puma/CObjectInfo.h>

Inheritance diagram for Puma::CObjectInfo:
Inheritance graph

List of all members.

Public Types

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

Public Member Functions

 ~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.
CT_ExprListInit () 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

 CObjectInfo (ObjectId id)
 Constructor.

Protected Attributes

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.

Detailed Description

Abstract base class of all semantic information classes.

Provides all semantic information about an entity (class, function, object, etc).

A semantic object is identified by its object ID. Semantic information objects for the same kind of entity have the same object ID (like object ID CObjectInfo::FUNCTION_INFO for all semantic objects of functions).

Example:

 // check if sem_obj is a semantic object for a function
 if (sem_obj.Id() == Puma::CObjectInfo::FUNCTION_INFO) {
   ...
 }
 // same check
 if (sem_obj.FunctionInfo()) {
   ...
 }

Semantic information objects are created by the semantic analysis component of Puma (see Puma::Semantic) during the parse process and are collected in the semantic information database (see Puma::CSemDatabase).

There are several relations between the semantic objects forming the semantic tree. There is one semantic tree for each translation unit.

The root of the semantic tree usually is the semantic object for the file scope (see Puma::CFileInfo). It contains all the other scopes of the analysed source file, such as namespaces and class definitions, function definitions, global variables, and so on. The semantic tree is destroyed by destroying the root object of the tree. This recursively destroys all sub-objects of the tree.


Member Enumeration Documentation

Semantic information object types.

Enumerator:
FILE_INFO 

Semantic information about the file scope.

UNION_INFO 

Semantic information about a union.

CLASS_INFO 

Semantic information about a class.

BASECLASS_INFO 

Semantic information about a base class specifier.

MEMBERALIAS_INFO 

Semantic information about class/namespace member alias.

ENUM_INFO 

Semantic information about an enumeration.

TYPEDEF_INFO 

Semantic information about a typedef.

FUNCTION_INFO 

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

LABEL_INFO 

Semantic information about a label.

ENUMERATOR_INFO 

Semantic information about an enumerator constant.

ATTRIBUTE_INFO 

Semantic information about an object (variables etc).

TEMPLATE_PARAM_INFO 

Semantic information about a template parameter.

TEMPLATE_INFO 

Semantic information about a class or function template.

CLASS_INSTANCE_INFO 

Semantic information about an instance of a class template.

UNION_INSTANCE_INFO 

Semantic information about an instance of a union template.

FCT_INSTANCE_INFO 

Semantic information about an instance of a function template.

ARGUMENT_INFO 

Semantic information about a function parameter.

LOCAL_INFO 

Semantic information about a local scope (block scope).

NAMESPACE_INFO 

Semantic information about a named or anonymous namespace.

USING_INFO 

Semantic information about a using declaration.


Constructor & Destructor Documentation

Puma::CObjectInfo::~CObjectInfo ( )

Destructor.

Puma::CObjectInfo::CObjectInfo ( CObjectInfo::ObjectId  id) [inline, protected]

Constructor.

Parameters:
idThe semantic object type.

Member Function Documentation

CArgumentInfo * Puma::CObjectInfo::ArgumentInfo ( ) const [inline]

Return a pointer to CArgumentInfo if the entity is a function parameter.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CStructure * Puma::CObjectInfo::AssignedScope ( ) const [inline]

Get the scope of a friend class or function.

This is not the scope in which the friend class or function was declared. A friend function of a class may be declared first inside the scope of a class definition. But the declared function does not belong to this scope. In fact it belongs to the nearest non-class scope (usually the file scope). This is the assigned scope.

Returns:
The assigned scope or NULL.
void Puma::CObjectInfo::AssignedScope ( CStructure s) [inline]

Set the assigned scope of the entity.

This is the scope of a friend class or function. It is not the scope in which the friend class or function was declared. A friend function of a class may be declared first inside the scope of a class definition. But the declared function does not belong to this scope. In fact it belongs to the nearest non-class scope (usually the file scope). This is the assigned scope.

Parameters:
sThe assigned scope.
CAttributeInfo * Puma::CObjectInfo::AttributeInfo ( ) const [inline]

Return a pointer to CAttributeInfo if the entity is an object or enumeration constant.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CBaseClassInfo * Puma::CObjectInfo::BaseClassInfo ( ) const [inline]

Return a pointer to CBaseClassInfo if the entity is a base class specifier.

The object type has to be one of:

Returns:
The valid pointer or NULL.
void Puma::CObjectInfo::BaseObject ( CObjectInfo base) [inline]

Set the base class object for the entity this entity overloads.

Parameters:
baseThe base object.
CObjectInfo * Puma::CObjectInfo::BaseObject ( ) const [inline]

Get the semantic object for the base class entity this entity is overloading.

Note:
Not yet implemented!
Returns:
Always returns NULL.
CSemDatabase * Puma::CObjectInfo::ClassDB ( ) const [inline]

Get the semantic information database object containing this semantic object.

void Puma::CObjectInfo::ClassDB ( CSemDatabase db) [inline]

Set the semantic information database object containing this semantic object.

Parameters:
dbThe semantic database.
CClassInfo * Puma::CObjectInfo::ClassInfo ( ) const [inline]

Return a pointer to CClassInfo if the entity is a class.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CClassInstance * Puma::CObjectInfo::ClassInstance ( ) const [inline]

Return a pointer to CClassInstance if the entity is an instance of a class template.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CRecord* Puma::CObjectInfo::ClassScope ( ) const

Get the class containing the class member described by this object.

The object type has to be one of:

Returns:
The class or union, or NULL if not a member of a class or union.
CObjectInfo* Puma::CObjectInfo::DefObject ( ) const

Get the semantic information object for the definition of an entity.

Some entities, like functions and classes, can be declared several times before a definition of the entity appears. The semantic objects for the definition and declarations are linked. This method searches the linked semantic objects for the semantic object of the definition of the entity.

Returns:
The semantic object for the definition or this object if no definition found.

Reimplemented in Puma::CAttributeInfo, Puma::CClassInfo, Puma::CEnumInfo, Puma::CFunctionInfo, and Puma::CUnionInfo.

CEnumeratorInfo * Puma::CObjectInfo::EnumeratorInfo ( ) const [inline]

Return a pointer to CEnumeratorInfo if the entity is an enumeration constant.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CEnumInfo * Puma::CObjectInfo::EnumInfo ( ) const [inline]

Return a pointer to CEnumInfo if the entity is an enumeration.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CFctInstance * Puma::CObjectInfo::FctInstance ( ) const [inline]

Return a pointer to CFctInstance if the entity is an instance of a function template.

The object type has to be one of:

Returns:
The valid pointer or NULL.
void Puma::CObjectInfo::FileInfo ( CFileInfo finfo)

Set the source file information for the entity.

Parameters:
finfoThe file information.
CFileInfo * Puma::CObjectInfo::FileInfo ( ) const [inline]

Return a pointer to CFileInfo if this is the file scope.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CFunctionInfo * Puma::CObjectInfo::FunctionInfo ( ) const [inline]

Return a pointer to CFunctionInfo if the entity is a function, method, or overloaded operator.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CObjectInfo::ObjectId Puma::CObjectInfo::Id ( ) const [inline]

Get the type of this semantic object.

CT_ExprList* Puma::CObjectInfo::Init ( ) const

Get the initializer of the entity.

Returns:
The initializer expression or NULL if no initializer.
bool Puma::CObjectInfo::isAnonymous ( ) const [inline]

Check if the entity is anonymous (has no explicit name).

bool Puma::CObjectInfo::isAuto ( ) const [inline]

Check if the entity is declared auto.

void Puma::CObjectInfo::isAuto ( bool  v) [inline]

Set whether the entity was declared auto.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isBuiltin ( ) const [inline]

Check if the entity describes a built-in type or function.

In this case the entity has no syntax tree (Tree() returns NULL).

bool Puma::CObjectInfo::isClassMember ( ) const

Check if the entity is a method or data member of a class.

bool Puma::CObjectInfo::isExplicit ( ) const [inline]

Check if the entity is declared explicit.

void Puma::CObjectInfo::isExplicit ( bool  v) [inline]

Set whether the entity was declared explicit.

Parameters:
vTrue for yes, false for no.
void Puma::CObjectInfo::isExtern ( bool  v) [inline]

Set whether the entity was declared extern.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isExtern ( ) const [inline]

Check if the entity is declared extern.

bool Puma::CObjectInfo::isInline ( ) const [inline]

Check if the entity is declared inline.

void Puma::CObjectInfo::isInline ( bool  v) [inline]

Set whether the entity was declared inline.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isLocal ( ) const

Check if the entity is local.

An entity is local if it was declared in a local scope.

void Puma::CObjectInfo::isMutable ( bool  v) [inline]

Set whether the entity was declared mutable.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isMutable ( ) const [inline]

Check if the entity is declared mutable.

bool Puma::CObjectInfo::isObject ( ) const

Check if the entity is an object.

bool Puma::CObjectInfo::isRegister ( ) const [inline]

Check if the entity is declared register.

void Puma::CObjectInfo::isRegister ( bool  v) [inline]

Set whether the entity was declared register.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isRegistered ( const CStructure s) const

Check if the given semantic object is registered as being connected to this semantic object in any way.

Parameters:
sThe semantic object.
void Puma::CObjectInfo::isStatic ( bool  v) [inline]

Set whether the entity was declared static.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isStatic ( ) const [inline]

Check if the entity is declared static.

bool Puma::CObjectInfo::isTemplate ( ) const

Check if the entity is a class or function template, or a template template parameter.

Reimplemented in Puma::CFunctionInfo, Puma::CRecord, and Puma::CTemplateParamInfo.

bool Puma::CObjectInfo::isTemplateInstance ( ) const

Check if the entity is a class or function template instance.

void Puma::CObjectInfo::isThreadLocal ( bool  v) [inline]

Set whether the entity was declared __thread.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isThreadLocal ( ) const [inline]

Check if the entity is declared __thread.

bool Puma::CObjectInfo::isType ( ) const

Check if the entity is a type.

void Puma::CObjectInfo::isVirtual ( bool  v) [inline]

Set whether the entity was declared virtual.

Parameters:
vTrue for yes, false for no.
bool Puma::CObjectInfo::isVirtual ( ) const [inline]

Check if the entity is declared virtual.

CLabelInfo * Puma::CObjectInfo::LabelInfo ( ) const [inline]

Return a pointer to CLabelInfo if the entity is a label.

The object type has to be one of:

Returns:
The valid pointer or NULL.
const CLanguage & Puma::CObjectInfo::Language ( ) const [inline]

Get the entity encoding language.

CLanguage & Puma::CObjectInfo::Language ( ) [inline]

Get the entity encoding language.

void Puma::CObjectInfo::Linkage ( CLinkage::Type  l) [inline]

Set the linkage of the entity.

Parameters:
lThe linkage.
CLinkage::Type Puma::CObjectInfo::Linkage ( ) const [inline]

Get the linkage of the entity.

CLocalScope * Puma::CObjectInfo::LocalScope ( ) const [inline]

Return a pointer to CLocalScope if the entity is a local scope (block scope).

The object type has to be one of:

Returns:
The valid pointer or NULL.
CMemberAliasInfo * Puma::CObjectInfo::MemberAliasInfo ( ) const [inline]

Return a pointer to CMemberAliasInfo if the entity is a member alias.

The object type has to be one of:

Returns:
The valid pointer or NULL.
const DString & Puma::CObjectInfo::Name ( ) const [inline]

Get the name of entity described by this semantic object.

void Puma::CObjectInfo::Name ( const char *  s) [inline]

Set the name of the entity.

Parameters:
sThe name.
void Puma::CObjectInfo::Name ( const DString ds)

Set the name of the entity.

Parameters:
dsThe name.
CNamespaceInfo * Puma::CObjectInfo::NamespaceInfo ( ) const [inline]

Return a pointer to CNamespaceInfo if the entity is a namespace.

The object type has to be one of:

Returns:
The valid pointer or NULL.
void Puma::CObjectInfo::NextObject ( CObjectInfo obj)

Set the link to next semantic object.

Usually the semantic objects for the definition and declaration of an entity are linked.

Parameters:
objThe next object in the chain.
CObjectInfo * Puma::CObjectInfo::NextObject ( ) const [inline]

Get the next semantic object linked with this object.

Usually the definition and the declarations of an entity are linked.

CObjectInfo * Puma::CObjectInfo::ObjectInfo ( ) const [inline]

Get a pointer to CObjectInfo for any semantic object type.

Reimplemented in Puma::CTemplateInfo.

bool Puma::CObjectInfo::operator!= ( const CObjectInfo info) const [inline]

Compare the addresses of this object and all objects linked to this object with the address of the given object.

Returns:
True if the addresses are different and thus the given object does not describe the same entity.
bool Puma::CObjectInfo::operator== ( const CObjectInfo ) const

Compare the addresses of this object and all objects linked to this object with the address of the given object.

Returns:
True if the addresses are the same and thus the given object describes the same entity.
void Puma::CObjectInfo::PrevObject ( CObjectInfo obj)

Set the link to next semantic object.

Usually the semantic objects for the definition and declaration of an entity are linked.

Parameters:
objThe previous object in the chain.
CObjectInfo * Puma::CObjectInfo::PrevObject ( ) const [inline]

Get the previous semantic object linked with this object.

Usually the definition and the declarations of an entity are linked.

void Puma::CObjectInfo::Protection ( CProtection::Type  p) [inline]

Set the member access protection of the entity.

Parameters:
pThe protection.
CProtection::Type Puma::CObjectInfo::Protection ( ) const [inline]

Get the member protection of the entity, if it is a class member.

CStructure * Puma::CObjectInfo::QualifiedScope ( ) const [inline]

Get the scope of qualified names.

The scope of a class member for instance is the corresponding class. If a function is declared in a namespace, then the qualified scope is that namespace.

const char* Puma::CObjectInfo::QualName ( bool  abs = false,
bool  tdef = false,
bool  unnamed = false 
)

Get the qualified name of the entity described by this semantic object.

Parameters:
absCreate root qualified name (like ::X::Y::Z).
tdefInsert the name of a typedef instead of the named type.
unnamedDon't ignore unnamed namespaces (like <unnamed>::foo).
CRecord * Puma::CObjectInfo::Record ( ) const [inline]

Return a pointer to CRecord if the entity is a class or union.

The object type has to be one of:

Returns:
The valid pointer or NULL.

Reimplemented in Puma::CAttributeInfo, and Puma::CFunctionInfo.

void Puma::CObjectInfo::Register ( CStructure s) [inline]

Register the given semantic object as being connected to this semantic object in any way.

Parameters:
sThe semantic object.
CScopeInfo* Puma::CObjectInfo::Scope ( ) const

Get the scope in which the entity was declared.

Reimplemented in Puma::CScopeRequest.

void Puma::CObjectInfo::SemDB ( CSemDatabase db) [inline]

Set the semantic information database object containing this semantic object.

Parameters:
dbThe semantic database.
CSemDatabase * Puma::CObjectInfo::SemDB ( ) const [inline]

Get the semantic information database object containing this semantic object.

CSourceInfo * Puma::CObjectInfo::SourceInfo ( ) const [inline]

Get the source file information.

Contains the position and token of the entity in the source file.

void Puma::CObjectInfo::Specifiers ( const CSpecifiers specs) [inline]

Set the declaration specifiers.

const CSpecifiers & Puma::CObjectInfo::Specifiers ( ) const [inline]

Get the declaration specifiers.

CStorage::Type Puma::CObjectInfo::Storage ( ) const [inline]

Get the storage class of the entity.

void Puma::CObjectInfo::Storage ( CStorage::Type  s) [inline]

Set the storage class of the entity.

Parameters:
sThe storage class.
CStructure * Puma::CObjectInfo::Structure ( ) const [inline]

Return a pointer to CStructure if the entity is a namespace, class, function, or any other construct that can contain other entities.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CTemplateInfo* Puma::CObjectInfo::Template ( ) const

Return a pointer to CTemplateInfo if the entity is a template.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CTemplateInfo * Puma::CObjectInfo::TemplateInfo ( ) const [inline]

Return a pointer to CTemplateInfo if the entity is a template.

The object type has to be one of:

Returns:
The valid pointer or NULL.

Reimplemented in Puma::CAttributeInfo, Puma::CFunctionInfo, Puma::CRecord, and Puma::CTemplateParamInfo.

CTemplateInstance* Puma::CObjectInfo::TemplateInstance ( ) const

Return a pointer to CTemplateInstance if the entity is an instance of a class or function template.

The object type has to be one of:

Returns:
The valid pointer or NULL.

Reimplemented in Puma::CClassInstance, Puma::CFctInstance, Puma::CTemplateParamInfo, and Puma::CUnionInstance.

CTemplateParamInfo * Puma::CObjectInfo::TemplateParamInfo ( ) const [inline]

Return a pointer to CTemplateParemInfo if the entity is a template parameter.

The object type has to be one of:

Returns:
The valid pointer or NULL.
void Puma::CObjectInfo::Tree ( CTree tree) [inline]

Set the syntax tree node of the entity.

Parameters:
treeThe syntax tree node.
CTree * Puma::CObjectInfo::Tree ( ) const [inline]

Get the syntax tree node for the entity described by this semantic object.

Reimplemented in Puma::CAttributeInfo, Puma::CBaseClassInfo, Puma::CEnumeratorInfo, Puma::CTemplateInfo, and Puma::CTemplateParamInfo.

CTypedefInfo * Puma::CObjectInfo::TypedefInfo ( ) const [inline]

Return a pointer to CTypedefInfo if the entity is a typedef.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CTypeInfo * Puma::CObjectInfo::TypeInfo ( ) const [inline]

Get the data type of the entity.

Reimplemented in Puma::CClassInfo, Puma::CEnumInfo, Puma::CFunctionInfo, Puma::CTemplateParamInfo, and Puma::CUnionInfo.

void Puma::CObjectInfo::TypeInfo ( CTypeInfo type)

Set the type of the entity.

Parameters:
typeThe type information.
CUnionInfo * Puma::CObjectInfo::UnionInfo ( ) const [inline]

Return a pointer to CUnionInfo if the entity is a union.

The object type has to be one of:

Returns:
The valid pointer or NULL.
CUnionInstance * Puma::CObjectInfo::UnionInstance ( ) const [inline]

Return a pointer to CUnionInstance if the entity is an instance of a union template.

The object type has to be one of:

Returns:
The valid pointer or NULL.
void Puma::CObjectInfo::Unlink ( )

Unlink this semantic object.

Usually the semantic objects for the definition and declaration of an entity are linked. This method removes this object from the chain.

void Puma::CObjectInfo::Unregister ( CStructure s)

Unregister the given semantic object as being connected to this semantic object in any way.

Parameters:
sThe semantic object.
CUsingInfo * Puma::CObjectInfo::UsingInfo ( ) const [inline]

Return a pointer to CUsingInfo if the entity is a using-directive.

The object type has to be one of:

Returns:
The valid pointer or NULL.

Member Data Documentation

The scope of a friend class or function.

This is not the scope in which the friend class or function was declared. A friend function of a class may be declared first inside the scope of a class definition. But the declared function does not belong to this scope. In fact it belongs to the nearest non-class scope (usually the file scope). This is the assigned scope.

Qualified name scope.

Set only for CAttributeInfo, CFunctionInfo, and CRecord.

Set of semantic objects connected to this object in any way.