Inflection
Morphology Inflection
Loading...
Searching...
No Matches
InflectableStringConcept.hpp
1/*
2 * Copyright 2017-2024 Apple Inc. All rights reserved.
3 */
4#pragma once
5
6#include <inflection/dialog/fwd.hpp>
7#include <inflection/dialog/SemanticFeatureConceptBase.hpp>
8#include <inflection/dialog/DisplayValue.hpp>
9#include <inflection/dialog/SpeakableString.hpp>
10#include <optional>
11#include <string>
12
18{
19public:
21 typedef SemanticFeatureConceptBase super;
23
24private:
25 SpeakableString value;
26 DisplayValue defaultDisplayValue;
27
28public: /* protected */
35 SpeakableString* getFeatureValue(const SemanticFeature& feature) const override;
36
37public:
42 bool isExists() const override;
46 ::std::u16string toString() const override;
47
48private:
49 ::std::optional<DisplayValue> getDisplayValue(bool allowInflectionGuess = true) const;
50
51public:
64
80private:
81 InflectableStringConcept& operator=(const InflectableStringConcept&) = delete;
82};
Represents a display value with constraint values.
Provides a way to format a word with additional grammatical category values or semantic features of a...
InflectableStringConcept(const SemanticFeatureModel *model, const SpeakableString &value)
InflectableStringConcept(const InflectableStringConcept &other)
SpeakableString * toSpeakableString() const override
SpeakableString * getFeatureValue(const SemanticFeature &feature) const override
InflectableStringConcept * clone() const override
::std::u16string toString() const override
Abstract base class of SpeakableConcept with inflectable constraints.
A semantic model that contains display data for semantic values and provides feature functions for de...
Represents a single semantic feature.
Represents a string with both a spoken and written representation.
The C++ namespace for Inflection.
Definition fwd.hpp:11