|
Inflection
Morphology Inflection
|
Provides a way to format a semantic value with specific display values for a given language. More...
#include <SemanticConcept.hpp>
Inheritance diagram for inflection::dialog::SemanticConcept:Public Member Functions | |
| virtual const ::std::u16string & | getSemanticValue () |
| ::inflection::dialog::SpeakableString * | getFeatureValue (const SemanticFeature &feature) const override |
| bool | isExists () const override |
| ::inflection::dialog::SpeakableString * | toSpeakableString () const override |
| virtual ::inflection::dialog::SpeakableString * | toSpeakableStringDefault (bool defaultToSemantic) const |
| ::std::u16string | toString () const override |
| SemanticConcept * | clone () const override |
| bool | operator== (const SemanticConcept &o) const |
| SemanticConcept (const SemanticFeatureModel *model, const SemanticValue &semantic, bool defaultToSemantic=false) | |
| SemanticConcept (const SemanticConcept &other) | |
| ~SemanticConcept () override | |
Public Member Functions inherited from inflection::dialog::SemanticFeatureConceptBase | |
| virtual const SemanticFeatureModel * | getModel () const |
| virtual const ::std::u16string * | getConstraint (const SemanticFeature &feature) const |
| virtual bool | hasConstraint (const SemanticFeature &feature) const |
| virtual void | putConstraint (const SemanticFeature &feature, ::std::u16string_view featureValue) |
| virtual void | putConstraintByName (::std::u16string_view featureName, ::std::u16string_view featureValue) |
| virtual void | clearConstraint (const SemanticFeature &feature) |
| virtual void | clearConstraintByName (::std::u16string_view featureName) |
| virtual void | reset () |
| virtual SpeakableString * | getFeatureValueByName (::std::u16string_view featureName) const |
| SemanticFeatureConceptBase (const SemanticFeatureModel *model) | |
| SemanticFeatureConceptBase (const SemanticFeatureConceptBase &other) | |
| ~SemanticFeatureConceptBase () override | |
Public Member Functions inherited from inflection::dialog::SpeakableConcept | |
| ~SpeakableConcept () override | |
Public Member Functions inherited from inflection::Object | |
| virtual ::std::u16string | toString () const |
| virtual | ~Object () |
Additional Inherited Members | |
Protected Member Functions inherited from inflection::dialog::SemanticFeatureConceptBase | |
| virtual const SemanticFeature * | getSpeakFeature () const |
Protected Attributes inherited from inflection::dialog::SemanticFeatureConceptBase | |
| ::std::map< SemanticFeature, ::std::u16string > | constraints { } |
Provides a way to format a semantic value with specific display values for a given language.
Definition at line 17 of file SemanticConcept.hpp.
| inflection::dialog::SemanticConcept::SemanticConcept | ( | const SemanticFeatureModel * | model, |
| const SemanticValue & | semantic, | ||
| bool | defaultToSemantic = false |
||
| ) |
Constructs a new SemanticConcept. A SemanticFeatureModel is required, as it will enforce the locale and store display data.
| inflection::dialog::SemanticConcept::SemanticConcept | ( | const SemanticConcept & | other | ) |
The copy constructor
|
override |
The destructor
|
overridevirtual |
Create a clone of this object. This is helpful if you need to preserve the constraints of the current object.
Implements inflection::dialog::SemanticFeatureConceptBase.
|
overridevirtual |
Returns the requested semantic feature. For example, you can request the definite article semantic feature in some languages.
Implements inflection::dialog::SemanticFeatureConceptBase.
|
virtual |
Return the semantic value used to create this object. This value is used when defaulting to the semantic.
|
overridevirtual |
Returns true if a value exists for the given constraints
Implements inflection::dialog::SemanticFeatureConceptBase.
| bool inflection::dialog::SemanticConcept::operator== | ( | const SemanticConcept & | o | ) | const |
Returns true when both objects refer to the same model, have the same semantic value, have the same constraints and the same defaultToSemantic value.
|
overridevirtual |
Returns the requested value for the provided constraints.
Implements inflection::dialog::SpeakableConcept.
| virtual ::inflection::dialog::SpeakableString * inflection::dialog::SemanticConcept::toSpeakableStringDefault | ( | bool | defaultToSemantic | ) | const |
Returns the requested value for the provided constraints.
| defaultToSemantic | When this is true and the constrained values is an empty set, use the semantic value instead. |
|
override |
Return a debuggable formatted string of this SemanticConcept.