Inflection
Morphology Inflection
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
inflection::dialog::DisplayValue Class Reference

Represents a display value with constraint values. More...

#include <DisplayValue.hpp>

+ Inheritance diagram for inflection::dialog::DisplayValue:

Public Member Functions

virtual const ::std::u16string & getDisplayString () const
 
virtual const ::std::u16string * getFeatureValue (const SemanticFeature &feature) const
 
virtual const ::std::map<::inflection::dialog::SemanticFeature, ::std::u16string > & getConstraintMap () const
 
bool operator== (const DisplayValue &o) const
 
std::size_t operator() (const DisplayValue &displayValue) const noexcept
 
 DisplayValue (const ::std::u16string &displayString, const ::std::map< SemanticFeature, ::std::u16string > &constraintMap)
 
 DisplayValue (const ::std::u16string &value)
 
 DisplayValue (const SpeakableString &value, const SemanticFeature &speakFeature)
 
 ~DisplayValue () override
 
- Public Member Functions inherited from inflection::Object
virtual ::std::u16string toString () const
 
virtual ~Object ()
 

Friends

class SemanticFeatureModel
 

Detailed Description

Represents a display value with constraint values.

Typically a set of these are contained in SemanticFeatureModel_DisplayData. The display value is valid for the constraints provided as semantic features.

See also
SemanticFeatureConceptBase

Definition at line 18 of file DisplayValue.hpp.

Constructor & Destructor Documentation

◆ DisplayValue() [1/3]

inflection::dialog::DisplayValue::DisplayValue ( const ::std::u16string &  displayString,
const ::std::map< SemanticFeature, ::std::u16string > &  constraintMap 
)

Construct a display value with a string and the associated constraints.

Parameters
displayStringA value with no speak information.
constraintMapAll constraints that match the displayString.

◆ DisplayValue() [2/3]

inflection::dialog::DisplayValue::DisplayValue ( const ::std::u16string &  value)
explicit

Construct a display value with a string and not constraints.

Parameters
valueA value with no speak information.

◆ DisplayValue() [3/3]

inflection::dialog::DisplayValue::DisplayValue ( const SpeakableString value,
const SemanticFeature speakFeature 
)

Construct a display value with a SpeakableString.

Parameters
valueA SpeakableString
speakFeatureThe speakFeature from the SemanticFeatureModel that represents the SemanticFeature for the speak information for a SpeakableString.

◆ ~DisplayValue()

inflection::dialog::DisplayValue::~DisplayValue ( )
override

The destructor

Member Function Documentation

◆ getConstraintMap()

virtual const ::std::map<::inflection::dialog::SemanticFeature, ::std::u16string > & inflection::dialog::DisplayValue::getConstraintMap ( ) const
virtual

Returns all possible constraint values for this display value.

◆ getDisplayString()

virtual const ::std::u16string & inflection::dialog::DisplayValue::getDisplayString ( ) const
virtual

Returns the display value.

◆ getFeatureValue()

virtual const ::std::u16string * inflection::dialog::DisplayValue::getFeatureValue ( const SemanticFeature feature) const
virtual

Given the semantic feature, return the value

Parameters
featureThe semantic feature (constraint) to match.
Returns
null if not found

◆ operator()()

std::size_t inflection::dialog::DisplayValue::operator() ( const DisplayValue displayValue) const
noexcept

Generates a hash code compatible with std::hash for the displayValue.

Parameters
displayValueThe display value object to generate the hash value.
Returns
the hash code compatible with std::hash for the displayValue.

◆ operator==()

bool inflection::dialog::DisplayValue::operator== ( const DisplayValue o) const

Returns true when both objects refer to the same display string, have the same semantic features, and have the same constraints.

Parameters
oThe display value object to be compared with this.
Returns
True if the two display value are the same, false otherwise.

Friends And Related Symbol Documentation

◆ SemanticFeatureModel

friend class SemanticFeatureModel
friend

Definition at line 83 of file DisplayValue.hpp.


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