ADTF  3.18.2
datamodel_keyvalue.h
Go to the documentation of this file.
1 
15 #ifndef DD_DATA_MODEL_KEYVALUE_H_INCLUDED
16 #define DD_DATA_MODEL_KEYVALUE_H_INCLUDED
17 
20 
21 #include <string>
22 
23 namespace ddl {
24 
25 namespace dd {
26 
27 namespace datamodel {
28 
33 class KeyValuePair : public utility::TypeAccessMapSubject<KeyValuePair>, public InfoMap {
34 public:
39  KeyValuePair() = default;
44  KeyValuePair(const KeyValuePair&) = default;
49  KeyValuePair(KeyValuePair&&) = default;
55  KeyValuePair& operator=(const KeyValuePair&) = default;
68  KeyValuePair(const std::string& name_key, const std::string& value_type);
73  virtual ~KeyValuePair() = default;
74 
82  bool operator==(const KeyValuePair& other) const;
90  bool operator!=(const KeyValuePair& other) const;
91 
97  const std::string& getName() const;
105  void setName(const std::string& name);
106 
112  const std::string& getKey() const;
120  void setKey(const std::string& key);
121 
127  const std::string& getValue() const;
134  void setValue(const std::string& value);
135 
141  const std::string& getType() const;
148  void setType(const std::string& type);
149 
150 private:
151  std::string _name_key;
152  std::string _value_type;
153 };
154 
155 } // namespace datamodel
156 } // namespace dd
157 } // namespace ddl
158 
159 #endif // DD_DATA_MODEL_KEYVALUE_H_INCLUDED
Info Map for the datamodel to hold a set of optional IInfo instances.
KeyValuePair & operator=(KeyValuePair &&)=default
move assignment operator
KeyValuePair(const std::string &name_key, const std::string &value_type)
CTOR.
const std::string & getType() const
Get the Type (same as value)
KeyValuePair & operator=(const KeyValuePair &)=default
copy assignment operator
void setKey(const std::string &key)
Set the Key (same as name)
KeyValuePair(const KeyValuePair &)=default
copy CTOR
const std::string & getKey() const
Get the Key (same as name)
const std::string & getValue() const
Get the Value (same as type)
const std::string & getName() const
Get the Name (same as key)
void setName(const std::string &name)
Sets the Name (same as key)
void setType(const std::string &type)
Set the Type (same as value)
KeyValuePair(KeyValuePair &&)=default
move CTOR
void setValue(const std::string &value)
Set the Value (same as type)
bool operator!=(const KeyValuePair &other) const
non-equality operator.
virtual ~KeyValuePair()=default
DTOR.
KeyValuePair()=default
Construct a observable new Key Value Pair.
bool operator==(const KeyValuePair &other) const
equality operator.
Model Subject utility to define a Model Subject that notifies one or more observers.
DataDefinition Utility class for observable items.
OO DataDefinition Redesign - Data model info extension.