Puma::CEnumInfo Class Reference

#include <Puma/infos/CEnumInfo.h>

Inheritance diagram for Puma::CEnumInfo:

Inheritance graph

List of all members.


Detailed Description

A CEnumInfo object represents a C++ 'enum'.

Public Member Functions

 CEnumInfo ()
 ~CEnumInfo ()
unsigned Enumerators () const
CEnumeratorInfoEnumerator (unsigned n) const
CEnumeratorInfoEnumerator (const char *name) const
CEnumInfoBaseObject () const
CEnumInfoDefObject () const
CTypeEnumTypeInfo () const
void addEnumerator (CEnumeratorInfo *ei)
void removeEnumerator (const CEnumeratorInfo *ei)
CEnumeratorInfonewEnumerator ()
void deleteEnumerator (const CEnumeratorInfo *ei)
bool isDefined () const
bool isComplete (unsigned long pos=0) const
CTypeInfoUnderlyingType () const
void UnderlyingType (CTypeInfo *type)

Constructor & Destructor Documentation

Puma::CEnumInfo::CEnumInfo (  )  [inline]

Construct a new enumeration info object.

Puma::CEnumInfo::~CEnumInfo (  ) 

Destroy the enum info object. If the object id is ENUM_INFO, Puma::CObjectInfo::CleanUp() is called.


Member Function Documentation

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

Parameters:
n The number of the enumerator.
Returns:
The enumerator info or NULL if n is invalid.

CEnumeratorInfo* Puma::CEnumInfo::Enumerator ( const char *  name  )  const

Get the info of the enumerator with the given name.

Parameters:
name The name of the enumerator.
Returns:
The enumerator info or NULL if no enumerator with that name.

CEnumInfo * Puma::CEnumInfo::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.

CEnumInfo* Puma::CEnumInfo::DefObject (  )  const

Get the info object of the enumeration definition.

Returns:
The info or this if the enumeration is not defined.

Reimplemented from Puma::CObjectInfo.

CTypeEnum * Puma::CEnumInfo::TypeInfo (  )  const [inline]

Get the type information object for the enumeration.

Reimplemented from Puma::CObjectInfo.

void Puma::CEnumInfo::addEnumerator ( CEnumeratorInfo ei  ) 

Add a new enumerator to the enumeration.

Parameters:
ei The enumerator info to add.

void Puma::CEnumInfo::removeEnumerator ( const CEnumeratorInfo ei  ) 

Remove the given enumerator from the enumeration.

Parameters:
ei The enumerator info to remove.

CEnumeratorInfo* Puma::CEnumInfo::newEnumerator (  ) 

Create a new enumerator info. The enumerator info is added to the enumeration.

void Puma::CEnumInfo::deleteEnumerator ( const CEnumeratorInfo ei  ) 

Destroy the given enumerator info. The enumerator info is removed from the enumeration.

Parameters:
ei The enumerator info to destroy.

bool Puma::CEnumInfo::isDefined (  )  const

Return true if the enumeration is defined.

bool Puma::CEnumInfo::isComplete ( unsigned long  pos = 0  )  const

Return true if the enumeration is complete (defined) at the given position.

Parameters:
pos The current source code position.

CTypeInfo * Puma::CEnumInfo::UnderlyingType (  )  const [inline]

Return the underlying data type.

void Puma::CEnumInfo::UnderlyingType ( CTypeInfo type  )  [inline]

Set the underlying data type.

Parameters:
type The underlying type.


Generated on Sat May 10 03:03:49 2008 for Puma by  doxygen 1.5.5