ADTF
|
observable KeyValuePair More...
Public Member Functions | |
KeyValuePair ()=default | |
Construct a observable new Key Value Pair. | |
KeyValuePair (const KeyValuePair &)=default | |
copy CTOR | |
KeyValuePair (KeyValuePair &&)=default | |
move CTOR | |
KeyValuePair & | operator= (const KeyValuePair &)=default |
copy assignment operator More... | |
KeyValuePair & | operator= (KeyValuePair &&)=default |
move assignment operator More... | |
KeyValuePair (const std::string &name_key, const std::string &value_type) | |
CTOR. More... | |
virtual | ~KeyValuePair ()=default |
DTOR. | |
bool | operator== (const KeyValuePair &other) const |
equality operator. More... | |
bool | operator!= (const KeyValuePair &other) const |
non-equality operator. More... | |
const std::string & | getName () const |
Get the Name (same as key) More... | |
void | setName (const std::string &name) |
Sets the Name (same as key) More... | |
const std::string & | getKey () const |
Get the Key (same as name) More... | |
void | setKey (const std::string &key) |
Set the Key (same as name) More... | |
const std::string & | getValue () const |
Get the value (same as type) More... | |
void | setValue (const std::string &value) |
Set the Value (same as type) More... | |
const std::string & | getType () const |
Get the Type (same as value) More... | |
void | setType (const std::string &type) |
Set the Type (same as value) More... | |
![]() | |
ModelSubjectUtility ()=default | |
CTOR. | |
ModelSubjectUtility (const ModelSubjectUtility &) | |
copy CTOR which removes the observers in case of! | |
ModelSubjectUtility & | operator= (const ModelSubjectUtility &) |
copy assignment operator which removes the observers in case of! More... | |
virtual | ~ModelSubjectUtility ()=default |
DTOR. | |
void | attachObserver (observer_type *observer) |
adda a observer to notify. More... | |
void | detachObserver (observer_type *observer) |
remove a observer if in list. More... | |
![]() | |
InfoMap ()=default | |
CTOR. | |
InfoMap (const InfoMap &) | |
copy CTOR More... | |
InfoMap (InfoMap &&) | |
move CTOR More... | |
InfoMap & | operator= (const InfoMap &) |
copy assignment operator More... | |
InfoMap & | operator= (InfoMap &&) |
move assignment operator More... | |
template<typename INFO_T > | |
const INFO_T * | getInfo () const |
Get the Info Pointer. More... | |
template<typename INFO_T > | |
INFO_T * | getInfo () |
Get the Info Pointer. More... | |
template<typename INFO_T > | |
void | setInfo (const std::shared_ptr< INFO_T > &info) |
Set the Info object as shared pointer. More... | |
Private Attributes | |
std::string | _name_key |
std::string | _value_type |
Additional Inherited Members | |
![]() | |
typedef EVENT_CODE_T | event_code_type |
local definition of the event code type | |
typedef MODEL_SUBJECT_T | subject_type |
local definition of the subject type | |
typedef ModelObserverUtility< MODEL_SUBJECT_T, EVENT_CODE_T > | observer_type |
local definition of the observer type to notify | |
![]() | |
void | notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info) |
helper utility function to notify the current observers More... | |
observable KeyValuePair
Definition at line 33 of file datamodel_keyvalue.h.
KeyValuePair | ( | const std::string & | name_key, |
const std::string & | value_type | ||
) |
CTOR.
name_key | The name or key of the pair. |
value_type | The value or type of the pair. |
const std::string& getKey | ( | ) | const |
Get the Key (same as name)
const std::string& getName | ( | ) | const |
Get the Name (same as key)
const std::string& getType | ( | ) | const |
Get the Type (same as value)
const std::string& getValue | ( | ) | const |
Get the value (same as type)
bool operator!= | ( | const KeyValuePair & | other | ) | const |
non-equality operator.
other | the other key valu to compare |
|
default |
copy assignment operator
|
default |
move assignment operator
bool operator== | ( | const KeyValuePair & | other | ) | const |
equality operator.
other | the other key valu to compare |
void setKey | ( | const std::string & | key | ) |
Set the Key (same as name)
key | the key |
Each | change may throw if a value with this key already exists. |
void setName | ( | const std::string & | name | ) |
Sets the Name (same as key)
name | the name to set |
Each | change may throw if a value with this name already exists. |
void setType | ( | const std::string & | type | ) |
Set the Type (same as value)
type | the type to set. |
void setValue | ( | const std::string & | value | ) |
Set the Value (same as type)
value | the value |