Puma Reference Manual Puma: Puma::CEnumeratorInfo Class Reference



Puma::CEnumeratorInfo Class Reference

#include <Puma/CEnumeratorInfo.h>

Inheritance diagram for Puma::CEnumeratorInfo:

Inheritance graph

List of all members.


Detailed Description

Semantic information about an enumeration constant.

An enumeration constant also is called enumerator.

Public Member Functions

 CEnumeratorInfo ()
 Constructor.
 ~CEnumeratorInfo ()
 Destructor.
CT_Enumerator * Tree () const
 Get the syntax tree node of the enumerator constant.
CT_ExprList * Init () const
 Get the initialization expression syntax tree node of the enumerator.
CTypeInfo * UnderlyingType () const
 Get the underlying value type.
CEnumInfo * Enum () const
 Get the enumeration containing this enumerator.
void Enum (CEnumInfo *ei)
 Set the enumeration containing this enumerator.
LONG_LONG Value () const
 Get the value of the enumerator.
void Value (LONG_LONG v)
 Set the value of the enumerator.


Constructor & Destructor Documentation

Puma::CEnumeratorInfo::CEnumeratorInfo (  )  [inline]

Constructor.

Puma::CEnumeratorInfo::~CEnumeratorInfo (  ) 

Destructor.

If the object type is CObjectInfo::ENUMERATOR_INFO, then CObjectInfo::CleanUp() is called.


Member Function Documentation

CT_Enumerator* Puma::CEnumeratorInfo::Tree (  )  const

Get the syntax tree node of the enumerator constant.

Reimplemented from Puma::CAttributeInfo.

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

Get the initialization expression syntax tree node of the enumerator.

Returns:
The syntax tree node or NULL if no initializer.

Reimplemented from Puma::CAttributeInfo.

CTypeInfo* Puma::CEnumeratorInfo::UnderlyingType (  )  const

Get the underlying value type.

This is implementation-defined and defaults to int.

CEnumInfo * Puma::CEnumeratorInfo::Enum (  )  const [inline]

Get the enumeration containing this enumerator.

void Puma::CEnumeratorInfo::Enum ( CEnumInfo *  ei  )  [inline]

Set the enumeration containing this enumerator.

Parameters:
ei The enumeration.

LONG_LONG Puma::CEnumeratorInfo::Value (  )  const [inline]

Get the value of the enumerator.

void Puma::CEnumeratorInfo::Value ( LONG_LONG  v  )  [inline]

Set the value of the enumerator.

Parameters:
v The value.




Puma Reference Manual. Created on 11 Jul 2008.