Inflection
Morphology Inflection
Loading...
Searching...
No Matches
SemanticFeature.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/Object.hpp>
8#include <string>
9#include <set>
10
14class INFLECTION_CLASS_API inflection::dialog::SemanticFeature
15 : public virtual ::inflection::Object
16{
17public:
19 typedef ::inflection::Object super;
21
22public:
26 enum Type {
27 NoValue,
28 BoundedValue,
29 UnboundedValue
30 };
31
32private:
33 Type type { };
34 ::std::u16string name { };
35 ::std::set<::std::u16string> boundedValues { };
36 bool aliased { };
37
38public:
43 static SemanticFeature* noValue(const ::std::u16string& name);
49 static SemanticFeature* boundedValue(const ::std::u16string& name, const ::std::set<::std::u16string>& values);
54 static SemanticFeature* unboundedValue(const ::std::u16string& name);
55
56public:
60 virtual Type getType() const;
64 virtual const ::std::u16string& getName() const;
69 virtual const ::std::set<::std::u16string>& getBoundedValues() const;
74 virtual bool isAliased() const;
81 bool operator==(const SemanticFeature& other) const;
85 std::weak_ordering operator<=>(const SemanticFeature& other) const;
86
94 SemanticFeature(const ::std::u16string& name, Type type, const ::std::set<::std::u16string>& boundedValues, bool aliased);
103
104private:
105 SemanticFeature& operator=(const SemanticFeature& other) = delete;
106};
Inflection's root object.
Definition Object.hpp:14
Represents a single semantic feature.
SemanticFeature(const SemanticFeature &other)
static SemanticFeature * boundedValue(const ::std::u16string &name, const ::std::set<::std::u16string > &values)
SemanticFeature(const ::std::u16string &name, Type type, const ::std::set<::std::u16string > &boundedValues, bool aliased)
bool operator==(const SemanticFeature &other) const
static SemanticFeature * noValue(const ::std::u16string &name)
std::weak_ordering operator<=>(const SemanticFeature &other) const
static SemanticFeature * unboundedValue(const ::std::u16string &name)
virtual const ::std::u16string & getName() const
virtual const ::std::set<::std::u16string > & getBoundedValues() const
The C++ namespace for Inflection.
Definition fwd.hpp:11