Puma::CClassInfo Class Reference
#include <Puma/infos/CClassInfo.h>
List of all members.
Detailed Description
A
CClassInfo object represents a C++ 'class' or 'struct'. Most of the functionality of
CClassInfo inherited by
Puma::CRecord. It mainly manages the list of base classes and the list of derived classes. Note that a 'union', although syntactically very similar, is not represented by a
CClassInfo object.
Constructor & Destructor Documentation
Puma::CClassInfo::CClassInfo |
( |
ObjectId |
id |
) |
[inline, protected] |
This constructor is to be used by classes inherited from CClassInfo. It makes it possible to set another object id than CLASS_INFO
for abstractions not representing a standard C++ class (e.g. CClassInstance).
- Parameters:
-
| id | The object id to be used instead of CLASS_INFO . |
Puma::CClassInfo::CClassInfo |
( |
|
) |
[inline] |
Puma::CClassInfo::~CClassInfo |
( |
|
) |
|
Member Function Documentation
CClassInfo * Puma::CClassInfo::BaseObject |
( |
|
) |
const [inline] |
Get the base info object of the info object. The corresponding information is not yet set!
- Returns:
- This method always returns
NULL
.
- Warning:
- Do not use this method.
Reimplemented from Puma::CObjectInfo.
Get the info object of the class definition.
- Returns:
- The info or this if the class is not defined.
Reimplemented from Puma::CObjectInfo.
CTypeClass * Puma::CClassInfo::TypeInfo |
( |
|
) |
const [inline] |
unsigned Puma::CClassInfo::BaseClasses |
( |
|
) |
const [inline] |
Get the number of the base classes of the class.
unsigned Puma::CClassInfo::DerivedClasses |
( |
|
) |
const [inline] |
Get the number of classes derived from the class.
CBaseClassInfo * Puma::CClassInfo::BaseClass |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th base class.
- Parameters:
-
| n | The number of the base class to return. |
- Returns:
- The base class info or
NULL
if n is not valid.
CBaseClassInfo* Puma::CClassInfo::BaseClass |
( |
const char * |
name |
) |
const |
Get the base class with the given name.
- Parameters:
-
| name | The name of the base class to return. |
- Returns:
- The base class info or
NULL
if there is no base class with the given name.
CClassInfo * Puma::CClassInfo::DerivedClass |
( |
unsigned |
n |
) |
const [inline] |
Get the n-th derived class.
- Parameters:
-
| n | The number of the derived class to return. |
- Returns:
- The class info of the derived class or
NULL
if n is not valid.
CClassInfo* Puma::CClassInfo::DerivedClass |
( |
const char * |
name |
) |
const |
Get the derived class with the given name.
- Parameters:
-
| name | The name of the derived class to return. |
- Returns:
- The class info of the derived class or
NULL
if there is no derived class with the given name.
bool Puma::CClassInfo::isBaseClass |
( |
const CClassInfo * |
ci, |
|
|
bool |
recursive = false | |
|
) |
| | const |
Return true if the given class is a base class of the class.
- Parameters:
-
| ci | The class info of the possible base class. |
| recursive | If false it is only checked whether ci is a direct base class. |
bool Puma::CClassInfo::isDerivedClass |
( |
const CClassInfo * |
ci, |
|
|
bool |
recursive = false | |
|
) |
| | const |
Return true if the given class is a derived class of the class.
- Parameters:
-
| ci | The class info of the possible base class. |
| recursive | If false it is only checked whether ci is directly derived from the class. |
void Puma::CClassInfo::hasDepBaseClass |
( |
bool |
depends |
) |
[inline] |
Mark the class to have a base class that depends on template parameters.
- Parameters:
-
| depends | true if there is a dependent base class. |
bool Puma::CClassInfo::hasDepBaseClass |
( |
|
) |
const [inline] |
Return true if the class has a base class that depends on template parameters.
Add a base class to the class.
- Parameters:
-
| bc | The base class info object. |
void Puma::CClassInfo::addDerivedClass |
( |
CClassInfo * |
dc |
) |
|
Add a derived class to the class.
- Parameters:
-
| dc | The class info object of the derived class. |
Remove the given base class from the class.
- Parameters:
-
| bc | The base class info object to remove. |
void Puma::CClassInfo::removeBaseClass |
( |
const CClassInfo * |
bc |
) |
|
Remove the given base class from the class.
- Parameters:
-
| bc | The class info object of the base class to remove. |
void Puma::CClassInfo::removeDerivedClass |
( |
const CClassInfo * |
dc |
) |
|
Remove the given derived class from the class.
- Parameters:
-
| dc | The class info object of the derived class to remove. |
Create a new base class info object.
- Parameters:
-
| bc | The class info of the base class or NULL to create an empty base class info object. |
- Returns:
- The new base class info object.
bool Puma::CClassInfo::isStruct |
( |
|
) |
const |
Return true if the class is declared using the keyword 'struct'.
Returns the accessibility of a particular member or base class member. For example, if the accessibility is "private", the object can be accessed by members of this class, but not by other classes.
- Parameters:
-
| oi | The object info of the checked function/attribute/... |
- Returns:
- The accessibility, i.e. private, public, protected, or none
bool Puma::CClassInfo::overridesVirtual |
( |
const CFunctionInfo * |
fi |
) |
const |
Returns true if the argument function overrides any virtual function defined in this class or any of its base classes.
- Parameters:
-
| fi | function info object of the checked function. |
bool Puma::CClassInfo::isAggregate |
( |
|
) |
const |
Returns true if this class is an aggregate according to 8.5.1-1.