Inflection
Morphology Inflection
Loading...
Searching...
No Matches
SemanticValue.hpp
1/*
2 * Copyright 2018-2024 Apple Inc. All rights reserved.
3 */
4#pragma once
5
6#include <inflection/dialog/fwd.hpp>
7#include <inflection/Object.hpp>
8#include <string>
9
14class INFLECTION_CLASS_API inflection::dialog::SemanticValue
15 : public virtual ::inflection::Object
16{
17public:
19 typedef ::inflection::Object super;
21
22private:
23 ::std::u16string label { };
24 ::std::u16string value { };
25public:
29 const ::std::u16string& getValue() const;
30
34 const ::std::u16string& getLabel() const;
35
39 ::std::u16string toString() const override;
40
44 bool operator==(const SemanticValue& other) const;
48 std::strong_ordering operator<=>(const SemanticValue&) const;
49
53 SemanticValue(const ::std::u16string& label, const ::std::u16string& string);
57 ~SemanticValue() override;
58};
59
60inline
61const ::std::u16string& inflection::dialog::SemanticValue::getValue() const
62{
63 return value;
64}
65
66inline
67const ::std::u16string& inflection::dialog::SemanticValue::getLabel() const
68{
69 return label;
70}
Inflection's root object.
Definition Object.hpp:14
Represents an ontological label with a value.
const ::std::u16string & getLabel() const
const ::std::u16string & getValue() const
::std::u16string toString() const override
std::strong_ordering operator<=>(const SemanticValue &) const
bool operator==(const SemanticValue &other) const
SemanticValue(const ::std::u16string &label, const ::std::u16string &string)
The C++ namespace for Inflection.
Definition fwd.hpp:11