|
Inflection
Morphology Inflection
|
Formats a list of SemanticFeatureConceptBase objects with context sensitive semantic features. More...
#include <SemanticConceptList.hpp>
Public Member Functions | |
| void | putConstraint (const SemanticFeature &feature, ::std::u16string_view featureValue) override |
| void | clearConstraint (const SemanticFeature &feature) override |
| void | reset () override |
| SpeakableString * | getFeatureValue (const SemanticFeature &feature) const override |
| int32_t | getSize () const |
| const SemanticFeatureConceptBase * | get (int32_t index) const |
| const SemanticFeatureConceptBase * | operator[] (int32_t index) const |
| bool | isExists () const override |
| ::std::u16string | toString () const override |
| SpeakableString * | toSpeakableString () const override |
| SemanticConceptList * | clone () const override |
| virtual SemanticConceptList * | setBeforeFirst (const SpeakableString &value) |
| virtual SpeakableString | getBeforeFirst (const SemanticFeatureConceptBase &first, const SpeakableString &formattedFirst) const |
| virtual SemanticConceptList * | setAfterFirst (const SpeakableString &value) |
| virtual SpeakableString | getAfterFirst (const SemanticFeatureConceptBase &first, const SpeakableString &formattedFirst, const SemanticFeatureConceptBase &second, const SpeakableString &formattedSecond) const |
| virtual SemanticConceptList * | setItemDelimiter (const SpeakableString &value) |
| virtual SpeakableString | getItemDelimiter (const SemanticFeatureConceptBase &previous, const SpeakableString &formattedPrevious, const SemanticFeatureConceptBase &next, const SpeakableString &formattedNext) const |
| virtual SemanticConceptList * | setBeforeLast (const SpeakableString &value) |
| virtual SpeakableString | getBeforeLast (const SemanticFeatureConceptBase &secondToLast, const SpeakableString &formattedSecondToLast, const SemanticFeatureConceptBase &last, const SpeakableString &formattedLast) const |
| virtual SemanticConceptList * | setAfterLast (const SpeakableString &value) |
| virtual SpeakableString | getAfterLast (const SemanticFeatureConceptBase &last, const SpeakableString &formattedLast) const |
| virtual SemanticConceptList * | setItemPrefix (const SpeakableString &value) |
| virtual SpeakableString | getItemPrefix (const SemanticFeatureConceptBase &item, const SpeakableString &formattedItem) const |
| virtual SemanticConceptList * | setItemSuffix (const SpeakableString &value) |
| virtual SpeakableString | getItemSuffix (const SemanticFeatureConceptBase &item, const SpeakableString &formattedItem) const |
| virtual void | setAvoidItemAffixRedundancy (bool value) |
| SemanticConceptList (const SemanticFeatureModel *model, const ::std::vector< const SemanticFeatureConceptBase * > &values) | |
| SemanticConceptList (const SemanticFeatureModel *model, const ::std::vector< SemanticFeatureConceptBase * > &values) | |
| SemanticConceptList (const SemanticConceptList &other) | |
| ~SemanticConceptList () 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 | putConstraintByName (::std::u16string_view featureName, ::std::u16string_view featureValue) |
| virtual void | clearConstraintByName (::std::u16string_view featureName) |
| 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 { } |
Formats a list of SemanticFeatureConceptBase objects with context sensitive semantic features.
Definition at line 16 of file SemanticConceptList.hpp.
| inflection::dialog::SemanticConceptList::SemanticConceptList | ( | const SemanticFeatureModel * | model, |
| const ::std::vector< const SemanticFeatureConceptBase * > & | values ) |
Creates a list of immutable SemanticConcept
| inflection::dialog::SemanticConceptList::SemanticConceptList | ( | const SemanticFeatureModel * | model, |
| const ::std::vector< SemanticFeatureConceptBase * > & | values ) |
Creates a list of mutable SemanticConcept
| inflection::dialog::SemanticConceptList::SemanticConceptList | ( | const SemanticConceptList & | other | ) |
The copy constructor
|
override |
The destructor
|
overridevirtual |
Clean the constraint feature in the SemanticConceptList.
| feature | the feature of the constraint to be clearn. |
Reimplemented from inflection::dialog::SemanticFeatureConceptBase.
|
overridevirtual |
Return a clone of this object with a deep copy of the constraints.
Implements inflection::dialog::SemanticFeatureConceptBase.
| const SemanticFeatureConceptBase * inflection::dialog::SemanticConceptList::get | ( | int32_t | index | ) | const |
Retrieves the SemanticFeatureConceptBase object at the requested index.
| An | exception if the index is out of range. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| first | The first item in the list. |
| formattedFirst | The formatted form of the first item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
| second | The second item in the list. |
| formattedSecond | The formatted form of the second item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| last | The last item in the list. |
| formattedLast | The formatted form of the last item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| first | The first item in the list. |
| formattedFirst | The formatted form of the first item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| secondToLast | The second to last item. It is before the last item. |
| formattedSecondToLast | The formatted form of the second to last item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
| last | The last item in the list. |
| formattedLast | The formatted form of the last item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
|
overridevirtual |
Returns the String value of the specified feature for this concept, given its current constraints
Implements inflection::dialog::SemanticFeatureConceptBase.
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| previous | The previous item in the list. |
| formattedPrevious | The formatted form of the previous item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
| next | The mext item in the list. |
| formattedNext | The formatted form of the next item. This should already be formatted with the constraints, item prefix and item suffix as specified in this list. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| item | The current item to add a prefix. |
| formattedItem | The formatted form of the item. This should already be formatted with the constraints as specified in this list. |
|
virtual |
Without the context of the current list, return the SpeakableString given the parameters.
| item | The current item to add a suffix. |
| formattedItem | The formatted form of the item. This should already be formatted with the constraints as specified in this list. |
| int32_t inflection::dialog::SemanticConceptList::getSize | ( | ) | const |
Returns the number of items in the list.
|
overridevirtual |
Returns true if this list is not empty.
Implements inflection::dialog::SemanticFeatureConceptBase.
| const SemanticFeatureConceptBase * inflection::dialog::SemanticConceptList::operator[] | ( | int32_t | index | ) | const |
Retrieves the SemanticFeatureConceptBase object at the requested index.
| An | exception if the index is out of range. |
|
overridevirtual |
Put constraint feature and value into the SemanticConceptList.
| feature | the feature of the constraint to be added. |
| featureValue | the value of the constraint. |
Reimplemented from inflection::dialog::SemanticFeatureConceptBase.
|
overridevirtual |
Clear all constraints imposed on this SemanticFeatureConcept.
Reimplemented from inflection::dialog::SemanticFeatureConceptBase.
|
virtual |
If there are at least 2 items, show this value after the first value and before the second value
|
virtual |
If there is at least 1 item, show this value after the entire list.
|
virtual |
If the item's prefix or suffix is already a prefix or suffix to an item, should we avoid adding the same affix. The default is true.
|
virtual |
If there is at least 1 item, show this value before the entire list.
|
virtual |
If there are at least 2 items, show this value after the second to last value and before the last value
|
virtual |
The default delimiter between items. Usually it is some form of a comma.
|
virtual |
For each item, add the provided prefix.
|
virtual |
For each item, add the provided suffix.
|
overridevirtual |
Returns the concept as a SpeakableString.
Implements inflection::dialog::SpeakableConcept.
|
override |
Returns a debuggable representation of this list without the separators.