Puma Reference Manual Puma: Puma::CObjectInfo Class Reference



Puma::CObjectInfo Class Reference

#include <Puma/CObjectInfo.h>

Inheritance diagram for Puma::CObjectInfo:

Inheritance graph

List of all members.


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.

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)
 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.
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 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.
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 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 DeleteMembersOnly ()
 Set that only the members of this semantic object are destroyed in the destructor.
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 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.
void CleanUp ()
 Clean up the semantic object.

Protected Attributes

bool _DeleteMembersOnly
 If true than only the members are destroyed in the destructor.
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.


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:
id The semantic object type.


Member Function Documentation

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.

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.

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

Get a pointer to CObjectInfo for any semantic object type.

Reimplemented in Puma::CTemplateInfo.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

CScopeInfo * Puma::CObjectInfo::ScopeInfo (  )  const [inline]

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

CScopeInfo* Puma::CObjectInfo::Scope (  )  const

Get the scope in which the entity was declared.

Reimplemented in Puma::CScopeRequest.

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.

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.

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.

CObjectInfo::ObjectId Puma::CObjectInfo::Id (  )  const [inline]

Get the type of this semantic object.

const DString & Puma::CObjectInfo::Name (  )  const [inline]

Get the name of entity described by this semantic object.

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

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

Parameters:
abs Create root qualified name (like X::Y::Z).
tdef Insert the name of a typedef instead of the named type.

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.

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.

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

Get the source file information.

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

CSemDatabase * Puma::CObjectInfo::ClassDB (  )  const [inline]

Get the semantic information database object containing this semantic object.

CSemDatabase * Puma::CObjectInfo::SemDB (  )  const [inline]

Get the semantic information database object containing this semantic object.

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.

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::PrevObject (  )  const [inline]

Get the previous semantic object linked with this object.

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

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.

CT_ExprList * Puma::CObjectInfo::Init (  )  const [inline]

Get the initializer of the entity.

Returns:
The initializer expression or NULL if no initializer.

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

CProtection::Type Puma::CObjectInfo::Protection (  )  const [inline]

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

CLinkage::Type Puma::CObjectInfo::Linkage (  )  const [inline]

Get the linkage of the entity.

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

Get the storage class of the entity.

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

Get the entity encoding language.

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

Get the entity encoding language.

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

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

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 [inline]

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

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::isVirtual (  )  const [inline]

Check if the entity is declared virtual.

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

Check if the entity is declared static.

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

Check if the entity is declared extern.

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

Check if the entity is declared mutable.

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

Check if the entity is declared register.

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

Check if the entity is declared explicit.

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

Check if the entity is declared inline.

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

Check if the entity is declared auto.

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:
s The semantic object.

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

Set the name of the entity.

Parameters:
s The name.

void Puma::CObjectInfo::Name ( const DString ds  ) 

Set the name of the entity.

Parameters:
ds The name.

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

Set the type of the entity.

Parameters:
type The type information.

void Puma::CObjectInfo::BaseObject ( CObjectInfo base  )  [inline]

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

Parameters:
base The base object.

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

Set the member access protection of the entity.

Parameters:
p The protection.

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

Set the linkage of the entity.

Parameters:
l The linkage.

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

Set the storage class of the entity.

Parameters:
s The storage class.

void Puma::CObjectInfo::FileInfo ( CFileInfo finfo  ) 

Set the source file information for the entity.

Parameters:
finfo The file information.

void Puma::CObjectInfo::Tree ( CTree tree  )  [inline]

Set the syntax tree node of the entity.

Parameters:
tree The syntax tree node.

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

Set the semantic information database object containing this semantic object.

Parameters:
db The semantic database.

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

Set the semantic information database object containing this semantic object.

Parameters:
db The semantic database.

void Puma::CObjectInfo::DeleteMembersOnly (  )  [inline]

Set that only the members of this semantic object are destroyed in the destructor.

Otherwise it is also tried to remove all references to this object in other semantic objects.

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:
obj The next object in the chain.

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:
obj The previous object in the chain.

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::Register ( CStructure s  )  [inline]

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

Parameters:
s The semantic object.

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

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

Parameters:
s The semantic object.

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

Set whether the entity was declared virtual.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared static.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared extern.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared mutable.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared register.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared explicit.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared inline.

Parameters:
v True for yes, false for no.

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

Set whether the entity was declared auto.

Parameters:
v True for yes, false for no.

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:
s The assigned scope.

void Puma::CObjectInfo::CleanUp (  )  [protected]

Clean up the semantic object.

This is usually done before the semantic object is destroyed.


Member Data Documentation

If true than only the members are destroyed in the destructor.

Otherwise it is also tried to remove all references to this object in other semantic objects.

Qualified name scope.

Set only for CAttributeInfo, CFunctionInfo, and CRecord.

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.

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




Puma Reference Manual. Created on 11 Jul 2008.