LinguisticDefinition::LingDef::Pos Class Reference

Represents a part-of-speech (pos) in the definition. More...

#include <LingDef.h>

List of all members.

Public Types

typedef std::set< const Feature * > FeatureList
typedef FeatureList::const_iterator FeatureIterator
 VIRTUAL
 ELEMENT
 SYNTAGM
enum  Type { VIRTUAL, ELEMENT, SYNTAGM }

Public Member Functions

 ~Pos ()
 Pos (const Pos &)
Posoperator= (const Pos &)
const std::string & getName () const
 Returns the name of this pos, such as 'NOUN' or 'VERB'.
const LingDefgetLingDef () const
 Returns a pointer to the definition that this feature belongs to.
const PosgetSuperPos () const
 If this pos inherits another pos, this will return a pointer to that pos.
void setShortName (const std::string &)
 A short name is an alternative name that may be used in some contexts.
const std::string & getShortName () const
void setType (Type)
Type getType () const
void setNote (const std::string &)
const FeaturegetFeature (const std::string &) const
 Returns a feature definition for this pos with a certain name.
FeaturecreateFeature (const std::string &name, Feature::Domain domain, Feature::Type type)
 Creates a feature for this pos.
FeatureIterator featuresBegin () const
 Returns a start iterator for all the features for this pos.
FeatureIterator featuresEnd () const
 Returns an end iterator for all the features for this pos.
FeatureIterator defaultFeaturesBegin () const
 Returns a start iterator for the features to set by default for this pos.
FeatureIterator defaultFeaturesEnd () const
 Returns an end iterator for the features to set by default for this pos.
PoscreateSubPos (const std::string &name)
 Creates an inherited pos to this pos.
PoscreateVirtualSubPos ()
 Creates a virtual inherited pos to this pos.

Friends

class Feature
class LingDef


Detailed Description

Represents a part-of-speech (pos) in the definition.

Definition at line 505 of file LingDef.h.


Member Typedef Documentation

typedef FeatureList::const_iterator LinguisticDefinition::LingDef::Pos::FeatureIterator

Definition at line 592 of file LingDef.h.

typedef std::set<const Feature *> LinguisticDefinition::LingDef::Pos::FeatureList

Definition at line 587 of file LingDef.h.


Member Enumeration Documentation

enum LinguisticDefinition::LingDef::Pos::Type

Enumerator:
VIRTUAL 
ELEMENT 
SYNTAGM 

Definition at line 554 of file LingDef.h.


Constructor & Destructor Documentation

LingDef::Pos::~Pos (  ) 

Definition at line 274 of file LingDef.cc.

LingDef::Pos::Pos ( const Pos  ) 

Definition at line 198 of file LingDef.cc.

References LinguisticDefinition::LingDef::Feature::d_enumChildren, d_featureDefs, LinguisticDefinition::LingDef::Feature::d_parentEnum, and Feature.


Member Function Documentation

Feature& LinguisticDefinition::LingDef::Pos::createFeature ( const std::string &  name,
Feature::Domain  domain,
Feature::Type  type 
)

Creates a feature for this pos.

Referenced by main().

Pos& LinguisticDefinition::LingDef::Pos::createSubPos ( const std::string &  name  ) 

Creates an inherited pos to this pos.

Referenced by createVirtualSubPos(), and main().

LingDef::Pos::Pos & LingDef::Pos::createVirtualSubPos (  ) 

Creates a virtual inherited pos to this pos.

Definition at line 171 of file LingDef.cc.

References createSubPos().

LingDef::Pos::FeatureIterator LingDef::Pos::defaultFeaturesBegin (  )  const

Returns a start iterator for the features to set by default for this pos.

Definition at line 419 of file LingDef.cc.

Referenced by LinguisticDefinition::LingFeatures::setDefaults().

LingDef::Pos::FeatureIterator LingDef::Pos::defaultFeaturesEnd (  )  const

Returns an end iterator for the features to set by default for this pos.

Definition at line 426 of file LingDef.cc.

Referenced by LinguisticDefinition::LingFeatures::setDefaults().

LingDef::Pos::FeatureIterator LingDef::Pos::featuresBegin (  )  const

Returns a start iterator for all the features for this pos.

Definition at line 405 of file LingDef.cc.

LingDef::Pos::FeatureIterator LingDef::Pos::featuresEnd (  )  const

Returns an end iterator for all the features for this pos.

Definition at line 412 of file LingDef.cc.

const Feature* LinguisticDefinition::LingDef::Pos::getFeature ( const std::string &   )  const

Returns a feature definition for this pos with a certain name.

If no feature of that name is available, NULL is returned.

Referenced by LinguisticDefinition::LingFeatures::hasEnumValue(), LinguisticDefinition::LingFeatures::hasNegative(), LinguisticDefinition::LingFeatures::isDefined(), LinguisticDefinition::LingDef::LingDef(), main(), LinguisticDefinition::XmlLingFeaturesFormatter::populateLingFeatures(), and testQuery().

const LingDef * LingDef::Pos::getLingDef (  )  const

Returns a pointer to the definition that this feature belongs to.

Definition at line 308 of file LingDef.cc.

const string & LingDef::Pos::getName (  )  const

Returns the name of this pos, such as 'NOUN' or 'VERB'.

Definition at line 284 of file LingDef.cc.

Referenced by main(), and testQuery().

const string & LingDef::Pos::getShortName (  )  const

Definition at line 301 of file LingDef.cc.

const LingDef::Pos * LingDef::Pos::getSuperPos (  )  const

If this pos inherits another pos, this will return a pointer to that pos.

If not, it will return NULL.

Definition at line 315 of file LingDef.cc.

Referenced by LinguisticDefinition::LingFeatures::setDefaults().

LingDef::Pos::Type LingDef::Pos::getType (  )  const

Definition at line 354 of file LingDef.cc.

LingDef::Pos & LingDef::Pos::operator= ( const Pos  ) 

Definition at line 244 of file LingDef.cc.

References d_featureDefs, d_lingDef, d_name, d_note, d_shortName, d_superPos, d_type, and Feature.

void LinguisticDefinition::LingDef::Pos::setNote ( const std::string &   ) 

void LinguisticDefinition::LingDef::Pos::setShortName ( const std::string &   ) 

A short name is an alternative name that may be used in some contexts.

void LingDef::Pos::setType ( Type   ) 

Definition at line 347 of file LingDef.cc.


Friends And Related Function Documentation

friend class Feature [friend]

Definition at line 506 of file LingDef.h.

Referenced by operator=(), and Pos().

friend class LingDef [friend]

Definition at line 507 of file LingDef.h.


The documentation for this class was generated from the following files:
Generated on Fri Jun 23 14:03:15 2006 for LinguisticDefinition by  doxygen 1.4.7