Puma Reference Manual Puma::CEnumeratorInfo Class Reference



Puma::CEnumeratorInfo Class Reference

Semantic information about an enumeration constant. More...

#include <Puma/CEnumeratorInfo.h>

Inheritance diagram for Puma::CEnumeratorInfo:
Inheritance graph

List of all members.

Public Member Functions

 CEnumeratorInfo ()
 Constructor.
 ~CEnumeratorInfo ()
 Destructor.
CT_EnumeratorTree () const
 Get the syntax tree node of the enumerator constant.
CTypeInfoUnderlyingType () const
 Get the underlying value type.
CEnumInfoEnum () const
 Get the enumeration containing this enumerator.
void Enum (CEnumInfo *ei)
 Set the enumeration containing this enumerator.
bool hasValue () const
 Check if enumerator has a value.
void hasValue (bool has)
 Set whether enumerator has a value.
LONG_LONG Value () const
 Get the value of the enumerator.
void Value (LONG_LONG v)
 Set the value of the enumerator.

Detailed Description

Semantic information about an enumeration constant.

An enumeration constant also is called enumerator.


Constructor & Destructor Documentation

Constructor.

Destructor.

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


Member Function Documentation

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:
eiThe enumeration.
bool Puma::CEnumeratorInfo::hasValue ( ) const [inline]

Check if enumerator has a value.

void Puma::CEnumeratorInfo::hasValue ( bool  has) [inline]

Set whether enumerator has a value.

Parameters:
hasTrue or false.

Get the syntax tree node of the enumerator constant.

Reimplemented from Puma::CAttributeInfo.

Get the underlying value type.

This is implementation-defined and defaults to int.

Get the value of the enumerator.

Set the value of the enumerator.

Parameters:
vThe value.