ULAPI  8.0
Public Member Functions | List of all members
ULFeature Class Reference

The class for storing the ULFeatureType and value (integer, enumerated type, or string) associated with the type in some context. ULAPI objects like ULPartOfSpeech and ULDictionaryNode contain lists of ULFeature objects (among other things). More...

#include <ulfeature.h>

Public Member Functions

 ULFeature ()
 
 ULFeature (const ULFeature &other)
 
 ~ULFeature ()
 
void clear ()
 
ULFeatureoperator= (const ULFeature &other)
 
bool operator== (const ULFeature &other) const
 
bool operator!= (const ULFeature &other) const
 
bool operator< (const ULFeature &other) const
 
const ULFeatureTypegetFeatureType () const
 
void setFeatureType (const ULFeatureType &newFeatureType)
 
int getIntValue () const
 
void setIntValue (int newIntValue)
 
bool hasStringValue () const
 
void getStringValue (ULString &val) const
 
const ULStringgetStringValue () const
 
void setStringValue (const ULString &newStringValue)
 
ULString getDisplayValue () const
 

Detailed Description

The class for storing the ULFeatureType and value (integer, enumerated type, or string) associated with the type in some context. ULAPI objects like ULPartOfSpeech and ULDictionaryNode contain lists of ULFeature objects (among other things).

Constructor & Destructor Documentation

ULFeature::ULFeature ( )

Default constructor.

ULFeature::ULFeature ( const ULFeature other)

Copy constructor.

ULFeature::~ULFeature ( )

Destructor.

Member Function Documentation

void ULFeature::clear ( )

Sets this ULFeature object to its default state.

ULString ULFeature::getDisplayValue ( ) const
Returns
a string showing a human-readable display value for this feature. If this feature has a string value (see ULFeature::hasStringValue), then that's the value you get. But if this feature has an integer value, the integer is converted into the suitable subclass of ULEnum, and the resulting display text is returned. For example, if this feature's feature type is ULTense and this feature's int value is 3, you would get the display text for ULTense(3), which is (at this writing–not guaranteed to stay this way) "present" for ULTense::Present.
const ULFeatureType & ULFeature::getFeatureType ( ) const

Accessor.

int ULFeature::getIntValue ( ) const

Accessor.

void ULFeature::getStringValue ( ULString val) const

Accessor.

Parameters
[out]valthe string value of this ULFeature object.
Precondition
this ULFeature object has a string value (i.e. hasStringValue() returns true).
const ULString & ULFeature::getStringValue ( ) const

Accessor.

Parameters
[out]valthe string value of this ULFeature object.
Precondition
this ULFeature object has a string value (i.e. hasStringValue() returns true).
bool ULFeature::hasStringValue ( ) const
Returns
true if this ULFeature object has a string value. By default, ULFeature objects have integer values only, but if you call setStringValue on the object, or
bool ULFeature::operator!= ( const ULFeature other) const

Inequality operator. If both ULFeature objects have string values, then the string values are compared. Otherwise, the integer values are compared.

bool ULFeature::operator< ( const ULFeature other) const

Comparison operator. If both ULFeature objects have string values, then the string values are compared. Otherwise, the integer values are compared.

ULFeature & ULFeature::operator= ( const ULFeature other)

Assignment operator.

bool ULFeature::operator== ( const ULFeature other) const

Equality operator. If both ULFeature objects have string values, then the string values are compared. Otherwise, the integer values are compared.

void ULFeature::setFeatureType ( const ULFeatureType newFeatureType)

Mutator.

void ULFeature::setIntValue ( int  newIntValue)

Mutator.

void ULFeature::setStringValue ( const ULString newStringValue)

Mutator.


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