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

An enhanced enumerated type used to represent formality levels (e.g. Sie vs. du). More...

#include <ulformality.h>

Public Member Functions

 ULFormality ()
 
 ULFormality (const ULFormality &other)
 
 ULFormality (int id)
 
 ULFormality (const char *otherStringID)
 
virtual ~ULFormality ()
 
virtual void clear ()
 
ULFormalityoperator= (const ULFormality &other)
 
ULFormalityoperator= (int otherID)
 
ULFormalityoperator= (const char *otherStringID)
 
bool operator== (const ULFormality &other) const
 
bool operator== (const char *otherStringID) const
 
bool operator!= (const ULFormality &other) const
 
bool operator!= (const char *otherStringID) const
 
bool operator< (const ULFormality &other) const
 
bool operator< (const char *otherStringID) const
 
- Public Member Functions inherited from ULEnum
 ULEnum ()
 
 ULEnum (const ULEnum &other)
 
virtual ~ULEnum ()
 
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 int getEnumeratedValueCount ()
 
static const ULFormalitygetInstance (int id)
 
- Static Public Member Functions inherited from ULEnum
static bool isEnumeratedFeature (const ULString &featureName)
 
static uluint32 getRunTimeFeatureID (const ULString &featureName)
 

Static Public Attributes

static const ULFormalityNone = ULFormality("noformality", "no formality")
 
static const ULFormalityAny = ULFormality("anyformality", "any formality")
 
static const ULFormalityFormal = ULFormality("formal", "formal")
 
static const ULFormalityInformal = ULFormality("informal", "informal")
 

Additional Inherited Members

- Protected Attributes inherited from ULEnum
int id
 
const char * stringID
 
const char * displayString
 
- Static Protected Attributes inherited from ULEnum
static ULHashTable< ULString,
uluint32 > 
featureNameToRunTimeID
 

Detailed Description

An enhanced enumerated type used to represent formality levels (e.g. Sie vs. du).

See ULEnum for a discussion of enhanced enumerated types in ULAPI.

Constructor & Destructor Documentation

ULFormality::ULFormality ( )

Default constructor.

ULFormality::ULFormality ( const ULFormality other)

Copy constructor.

ULFormality::ULFormality ( int  otherID)

Constructor by id.

ULFormality::ULFormality ( const char *  otherStringID)

Constructor.

Parameters
[in]otherStringIDThe string ID corresponding to the ULFormality value this ULFormality should be copied from.
ULFormality::~ULFormality ( )
virtual

Destructor.

Member Function Documentation

void ULFormality::clear ( )
virtual

Sets this ULFormality object to its default state.

Reimplemented from ULEnum.

int ULFormality::getEnumeratedValueCount ( )
static
Returns
the number of distinct enumerated values of this type.
const ULFormality & ULFormality::getInstance ( int  id)
static
Returns
the statically allocated instance of this type corresponding to the specified integer id.
Parameters
[in]idthe desired integer id.
bool ULFormality::operator!= ( const ULFormality other) const

Inequality operator.

bool ULFormality::operator!= ( const char *  stringID) const

Inequality operator.

Returns
true if the specified string is not equal to this ULFormality's string ID.
Parameters
[in]stringIDThe string to compare to this object's string ID.
bool ULFormality::operator< ( const ULFormality other) const

Comparison operator.

Returns
true if this ULFormality's integer ID is strictly less than other's.
Parameters
[in]otherThe other ULFormality object.
bool ULFormality::operator< ( const char *  stringID) const

Comparison operator.

Returns
true if this ULFormality's integer ID is is strictly less the integer ID of the ULFormality value corresponding to the specified string ID.
Parameters
[in]stringIDThe string ID.
ULFormality & ULFormality::operator= ( const ULFormality other)

Assignment operator.

Returns
a reference to this ULFormality object.
ULFormality & ULFormality::operator= ( int  otherID)

Assignment operator.

Parameters
[in]otherIDThe ID of the enumerated value of ULFormality to assign to this ULFormality.
ULFormality & ULFormality::operator= ( const char *  otherStringID)

Assignment operator.

Returns
a reference to this ULFormality object.
Parameters
[in]stringIDIf stringID is the string ID of one of the ULFormality enumerated values, then this object is copied from that ULFormality. Otherwise, this object is assigned the default value.
bool ULFormality::operator== ( const ULFormality other) const

Equality operator.

bool ULFormality::operator== ( const char *  stringID) const

Equality operator.

Returns
true if the specified string is equal to this ULFormality's string ID.
Parameters
[in]stringIDThe string to compare to this object's string ID.

Member Data Documentation

const ULFormality & ULFormality::Any = ULFormality("anyformality", "any formality")
static
const ULFormality & ULFormality::Formal = ULFormality("formal", "formal")
static
const ULFormality & ULFormality::Informal = ULFormality("informal", "informal")
static
const ULFormality & ULFormality::None = ULFormality("noformality", "no formality")
static

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