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

An enhanced enumerated type used to represent persons (first, second, third, as well as first-singular, third-plural, second-singular-formal, etc.). More...

#include <ulperson.h>

Public Member Functions

 ULPerson ()
 
 ULPerson (const ULPerson &other)
 
 ULPerson (int id)
 
 ULPerson (const char *otherStringID)
 
virtual ~ULPerson ()
 
virtual void clear ()
 
ULPersonoperator= (const ULPerson &other)
 
ULPersonoperator= (int otherID)
 
ULPersonoperator= (const char *otherStringID)
 
bool operator== (const ULPerson &other) const
 
bool operator== (const char *otherStringID) const
 
bool operator!= (const ULPerson &other) const
 
bool operator!= (const char *otherStringID) const
 
bool operator< (const ULPerson &other) const
 
bool operator< (const char *otherStringID) const
 
void expandPerson (ULPerson &person, ULNumber &number, ULFormality &formality) 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 ULPersongetInstance (int id)
 
static void getAllPersons (ULList< ULPerson > &persons)
 
- Static Public Member Functions inherited from ULEnum
static bool isEnumeratedFeature (const ULString &featureName)
 
static uluint32 getRunTimeFeatureID (const ULString &featureName)
 

Static Public Attributes

static const ULPersonNone = ULPerson("none", "noperson", "no person")
 
static const ULPersonAny = ULPerson("any", "anyperson", "any person")
 
static const ULPersonFirst = ULPerson("any", "first", "first person")
 
static const ULPersonSecond = ULPerson("any", "second", "second person")
 
static const ULPersonThird = ULPerson("any", "third", "third person")
 
static const ULPersonFirstSingular = ULPerson("any", "firstsingular", "[I]")
 
static const ULPersonSecondSingular = ULPerson("any", "secondsingular", "[you]")
 
static const ULPersonSecondSingularFormal = ULPerson("any", "secondsingularformal", "[you formal]")
 
static const ULPersonThirdSingular = ULPerson("any", "thirdsingular", "[he/she/it]")
 
static const ULPersonFirstPlural = ULPerson("any", "firstplural", "[we]")
 
static const ULPersonSecondPlural = ULPerson("any", "secondplural", "[you]")
 
static const ULPersonSecondPluralFormal = ULPerson("any", "secondpluralformal", "[you formal]")
 
static const ULPersonThirdPlural = ULPerson("any", "thirdplural", "[they]")
 

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 persons (first, second, third, as well as first-singular, third-plural, second-singular-formal, etc.).

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

Constructor & Destructor Documentation

ULPerson::ULPerson ( )

Default constructor.

ULPerson::ULPerson ( const ULPerson other)

Copy constructor.

ULPerson::ULPerson ( int  otherID)

Constructor by id.

ULPerson::ULPerson ( const char *  otherStringID)

Constructor.

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

Destructor.

Member Function Documentation

void ULPerson::clear ( )
virtual

Sets this ULPerson object to its default state.

Reimplemented from ULEnum.

void ULPerson::expandPerson ( ULPerson person,
ULNumber number,
ULFormality formality 
) const

Converts this person (e.g. ULPerson::ThirdSingular) into a simple person, number, and formality (e.g. (ULPerson::Third, ULNumber::Singular, ULFormality::None). If this person is already simple, the number and formality are set to Any.

Parameters
[out]personthe simple person
[out]numberthe number
[out]formalitythe formality
void ULPerson::getAllPersons ( ULList< ULPerson > &  persons)
static
Returns
a list of all the persons.
Parameters
[out]personsThe list of persons.
int ULPerson::getEnumeratedValueCount ( )
static
Returns
the number of distinct enumerated values of this type.
const ULPerson & ULPerson::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 ULPerson::operator!= ( const ULPerson other) const

Inequality operator.

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

Inequality operator.

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

Comparison operator.

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

Comparison operator.

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

Assignment operator.

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

Assignment operator.

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

Assignment operator.

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

Equality operator.

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

Equality operator.

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

Member Data Documentation

const ULPerson & ULPerson::Any = ULPerson("any", "anyperson", "any person")
static
const ULPerson & ULPerson::First = ULPerson("any", "first", "first person")
static
const ULPerson & ULPerson::FirstPlural = ULPerson("any", "firstplural", "[we]")
static
const ULPerson & ULPerson::FirstSingular = ULPerson("any", "firstsingular", "[I]")
static
const ULPerson & ULPerson::None = ULPerson("none", "noperson", "no person")
static
const ULPerson & ULPerson::Second = ULPerson("any", "second", "second person")
static
const ULPerson & ULPerson::SecondPlural = ULPerson("any", "secondplural", "[you]")
static
const ULPerson & ULPerson::SecondPluralFormal = ULPerson("any", "secondpluralformal", "[you formal]")
static
const ULPerson & ULPerson::SecondSingular = ULPerson("any", "secondsingular", "[you]")
static
const ULPerson & ULPerson::SecondSingularFormal = ULPerson("any", "secondsingularformal", "[you formal]")
static
const ULPerson & ULPerson::Third = ULPerson("any", "third", "third person")
static
const ULPerson & ULPerson::ThirdPlural = ULPerson("any", "thirdplural", "[they]")
static
const ULPerson & ULPerson::ThirdSingular = ULPerson("any", "thirdsingular", "[he/she/it]")
static

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