| Puma Reference Manual | Puma: Puma::CEnumInfo Class Reference |
#include <Puma/CEnumInfo.h>

Public Member Functions | |
| CEnumInfo () | |
| Constructor. | |
| ~CEnumInfo () | |
| Destructor. | |
| unsigned | Enumerators () const |
| Get the number of enumerators in this enumeration. | |
| CEnumeratorInfo * | Enumerator (unsigned n) const |
| Get the n-th enumerator. | |
| CEnumeratorInfo * | Enumerator (const char *name) const |
| Get the enumerator with the given name. | |
| CEnumInfo * | DefObject () const |
| Get the semantic object of the enumeration definition. | |
| CTypeEnum * | TypeInfo () const |
| Get the type information for the enumeration. | |
| void | addEnumerator (CEnumeratorInfo *ei) |
| Add a new enumerator to the enumeration. | |
| void | removeEnumerator (const CEnumeratorInfo *ei) |
| Remove the given enumerator from the enumeration. | |
| CEnumeratorInfo * | newEnumerator () |
| Create a semantic object for an enumerator. | |
| void | deleteEnumerator (const CEnumeratorInfo *ei) |
| Destroy the given enumerator. | |
| bool | isDefined () const |
| Check if the enumeration is defined. | |
| bool | isComplete (unsigned long pos=0) const |
| Check if the enumeration is complete (defined) at the given source code position. | |
| CTypeInfo * | UnderlyingType () const |
| Return the underlying data type of the enumeration. | |
| void | UnderlyingType (CTypeInfo *type) |
| Set the underlying data type of the enumeration. | |
| Puma::CEnumInfo::CEnumInfo | ( | ) | [inline] |
Constructor.
| Puma::CEnumInfo::~CEnumInfo | ( | ) |
Destructor.
If the object type is CObjectInfo::ENUM_INFO, then CObjectInfo::CleanUp() is called.
| unsigned Puma::CEnumInfo::Enumerators | ( | ) | const [inline] |
Get the number of enumerators in this enumeration.
| CEnumeratorInfo * Puma::CEnumInfo::Enumerator | ( | unsigned | n | ) | const [inline] |
Get the n-th enumerator.
| n | The index of the enumerator. |
| CEnumeratorInfo* Puma::CEnumInfo::Enumerator | ( | const char * | name | ) | const |
Get the enumerator with the given name.
| name | The name of the enumerator. |
| CEnumInfo* Puma::CEnumInfo::DefObject | ( | ) | const |
Get the semantic object of the enumeration definition.
Reimplemented from Puma::CObjectInfo.
| CTypeEnum * Puma::CEnumInfo::TypeInfo | ( | ) | const [inline] |
| void Puma::CEnumInfo::addEnumerator | ( | CEnumeratorInfo * | ei | ) |
Add a new enumerator to the enumeration.
| ei | The enumerator. |
| void Puma::CEnumInfo::removeEnumerator | ( | const CEnumeratorInfo * | ei | ) |
Remove the given enumerator from the enumeration.
| ei | The enumerator. |
| CEnumeratorInfo* Puma::CEnumInfo::newEnumerator | ( | ) |
Create a semantic object for an enumerator.
The new enumerator is added to the enumeration.
| void Puma::CEnumInfo::deleteEnumerator | ( | const CEnumeratorInfo * | ei | ) |
Destroy the given enumerator.
The enumerator is removed from the enumeration.
| ei | The enumerator. |
| bool Puma::CEnumInfo::isDefined | ( | ) | const |
Check if the enumeration is defined.
| bool Puma::CEnumInfo::isComplete | ( | unsigned long | pos = 0 |
) | const |
Check if the enumeration is complete (defined) at the given source code position.
The position is specified by the unique number of the CT_Token tree node representing the name of the enumeration.
| pos | The source code position. |
| CTypeInfo * Puma::CEnumInfo::UnderlyingType | ( | ) | const [inline] |
Return the underlying data type of the enumeration.
This is implementation-defined and defaults to int.
| void Puma::CEnumInfo::UnderlyingType | ( | CTypeInfo * | type | ) | [inline] |
Set the underlying data type of the enumeration.
This is implementation-defined and defaults to int.
| type | The underlying type. |