ULAPI  8.0
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ULEnum Class Reference

The base class for all of ULAPI's enhanced enumerated types. More...

#include <ulenum.h>

Public Member Functions

 ULEnum ()
 
 ULEnum (const ULEnum &other)
 
virtual ~ULEnum ()
 
virtual void clear ()
 
virtual ULEnumoperator= (const ULEnum &other)
 
 operator int () const
 
uluint32 hash (uluint32 tableSize) const
 
int getID () const
 
const char * getStringID () const
 
virtual const char * getDisplayString () const
 

Static Public Member Functions

static bool isEnumeratedFeature (const ULString &featureName)
 
static uluint32 getRunTimeFeatureID (const ULString &featureName)
 

Protected Attributes

int id
 
const char * stringID
 
const char * displayString
 

Static Protected Attributes

static ULHashTable< ULString,
uluint32 > 
featureNameToRunTimeID
 

Detailed Description

The base class for all of ULAPI's enhanced enumerated types.

ULAPI's enhanced enumerated types are intended to provide an enumerated type where:

There is one disadvantage to keep in mind. ULAPI enhanced enums cannot be used as cases in switch statements.

Constructor & Destructor Documentation

ULEnum::ULEnum ( )

Default constructor.

ULEnum::ULEnum ( const ULEnum other)

Copy constructor.

ULEnum::~ULEnum ( )
virtual

Destructor.

Member Function Documentation

void ULEnum::clear ( )
virtual
const char * ULEnum::getDisplayString ( ) const
virtual
Returns
a pointer to the human-readable display string for this ULEnum.
int ULEnum::getID ( ) const
Returns
the integer id for this ULEnum.
uluint32 ULEnum::getRunTimeFeatureID ( const ULString featureName)
static

Static method that translates from feature name to run-time ID.

const char * ULEnum::getStringID ( ) const
Returns
a pointer to the string ID for this ULEnum.
uluint32 ULEnum::hash ( uluint32  tableSize) const

Hash function to enable ULEnum objects to act as keys in ULHashTable.

bool ULEnum::isEnumeratedFeature ( const ULString featureName)
static

Static method that translates from feature name to run-time ID.

ULEnum::operator int ( ) const

int operator.

Returns
this ULEnum object's integer ID.
ULEnum & ULEnum::operator= ( const ULEnum other)
virtual

Assignment operator.

Returns
a reference to this ULEnum object.

Member Data Documentation

const char* ULEnum::displayString
protected
ULHashTable< ULString, uluint32 > ULEnum::featureNameToRunTimeID
staticprotected
int ULEnum::id
protected
const char* ULEnum::stringID
protected

The documentation for this class was generated from the following files: