1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace attribute_registry
5 {
6 // clang-format off
7 
8 enum class AttributeType{
9     Invalid,
10     Enumeration,
11     String,
12     Integer,
13     Boolean,
14     Password,
15 };
16 
17 enum class DependencyType{
18     Invalid,
19     Map,
20 };
21 
22 enum class MapFromCondition{
23     Invalid,
24     EQU,
25     NEQ,
26     GTR,
27     GEQ,
28     LSS,
29     LEQ,
30 };
31 
32 enum class MapFromProperty{
33     Invalid,
34     CurrentValue,
35     DefaultValue,
36     ReadOnly,
37     WriteOnly,
38     GrayOut,
39     Hidden,
40     LowerBound,
41     UpperBound,
42     MinLength,
43     MaxLength,
44     ScalarIncrement,
45 };
46 
47 enum class MapTerms{
48     Invalid,
49     AND,
50     OR,
51 };
52 
53 enum class MapToProperty{
54     Invalid,
55     CurrentValue,
56     DefaultValue,
57     ReadOnly,
58     WriteOnly,
59     GrayOut,
60     Hidden,
61     Immutable,
62     HelpText,
63     WarningText,
64     DisplayName,
65     DisplayOrder,
66     LowerBound,
67     UpperBound,
68     MinLength,
69     MaxLength,
70     ScalarIncrement,
71     ValueExpression,
72 };
73 
74 NLOHMANN_JSON_SERIALIZE_ENUM(AttributeType, {
75     {AttributeType::Invalid, "Invalid"},
76     {AttributeType::Enumeration, "Enumeration"},
77     {AttributeType::String, "String"},
78     {AttributeType::Integer, "Integer"},
79     {AttributeType::Boolean, "Boolean"},
80     {AttributeType::Password, "Password"},
81 });
82 
83 NLOHMANN_JSON_SERIALIZE_ENUM(DependencyType, {
84     {DependencyType::Invalid, "Invalid"},
85     {DependencyType::Map, "Map"},
86 });
87 
88 NLOHMANN_JSON_SERIALIZE_ENUM(MapFromCondition, {
89     {MapFromCondition::Invalid, "Invalid"},
90     {MapFromCondition::EQU, "EQU"},
91     {MapFromCondition::NEQ, "NEQ"},
92     {MapFromCondition::GTR, "GTR"},
93     {MapFromCondition::GEQ, "GEQ"},
94     {MapFromCondition::LSS, "LSS"},
95     {MapFromCondition::LEQ, "LEQ"},
96 });
97 
98 NLOHMANN_JSON_SERIALIZE_ENUM(MapFromProperty, {
99     {MapFromProperty::Invalid, "Invalid"},
100     {MapFromProperty::CurrentValue, "CurrentValue"},
101     {MapFromProperty::DefaultValue, "DefaultValue"},
102     {MapFromProperty::ReadOnly, "ReadOnly"},
103     {MapFromProperty::WriteOnly, "WriteOnly"},
104     {MapFromProperty::GrayOut, "GrayOut"},
105     {MapFromProperty::Hidden, "Hidden"},
106     {MapFromProperty::LowerBound, "LowerBound"},
107     {MapFromProperty::UpperBound, "UpperBound"},
108     {MapFromProperty::MinLength, "MinLength"},
109     {MapFromProperty::MaxLength, "MaxLength"},
110     {MapFromProperty::ScalarIncrement, "ScalarIncrement"},
111 });
112 
113 NLOHMANN_JSON_SERIALIZE_ENUM(MapTerms, {
114     {MapTerms::Invalid, "Invalid"},
115     {MapTerms::AND, "AND"},
116     {MapTerms::OR, "OR"},
117 });
118 
119 NLOHMANN_JSON_SERIALIZE_ENUM(MapToProperty, {
120     {MapToProperty::Invalid, "Invalid"},
121     {MapToProperty::CurrentValue, "CurrentValue"},
122     {MapToProperty::DefaultValue, "DefaultValue"},
123     {MapToProperty::ReadOnly, "ReadOnly"},
124     {MapToProperty::WriteOnly, "WriteOnly"},
125     {MapToProperty::GrayOut, "GrayOut"},
126     {MapToProperty::Hidden, "Hidden"},
127     {MapToProperty::Immutable, "Immutable"},
128     {MapToProperty::HelpText, "HelpText"},
129     {MapToProperty::WarningText, "WarningText"},
130     {MapToProperty::DisplayName, "DisplayName"},
131     {MapToProperty::DisplayOrder, "DisplayOrder"},
132     {MapToProperty::LowerBound, "LowerBound"},
133     {MapToProperty::UpperBound, "UpperBound"},
134     {MapToProperty::MinLength, "MinLength"},
135     {MapToProperty::MaxLength, "MaxLength"},
136     {MapToProperty::ScalarIncrement, "ScalarIncrement"},
137     {MapToProperty::ValueExpression, "ValueExpression"},
138 });
139 
140 }
141 // clang-format on
142