ADTF
Loading...
Searching...
No Matches
ddl::dd::datamodel::KeyValuePair Class Reference

observable KeyValuePair More...

#include <datamodel_keyvalue.h>

Inherits ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >, and ddl::dd::datamodel::InfoMap.

Public Member Functions

 KeyValuePair ()=default
 Construct a observable new Key Value Pair.
 
 KeyValuePair (const KeyValuePair &)=default
 copy CTOR
 
 KeyValuePair (KeyValuePair &&)=default
 move CTOR
 
KeyValuePairoperator= (const KeyValuePair &)=default
 copy assignment operator
 
KeyValuePairoperator= (KeyValuePair &&)=default
 move assignment operator
 
 KeyValuePair (std::string name_key, std::string value_type)
 CTOR.
 
virtual ~KeyValuePair ()=default
 DTOR.
 
bool operator== (const KeyValuePair &other) const
 equality operator.
 
bool operator!= (const KeyValuePair &other) const
 non-equality operator.
 
const std::string & getName () const
 Get the Name (same as key)
 
void setName (const std::string &name)
 Sets the Name (same as key)
 
const std::string & getKey () const
 Get the Key (same as name)
 
void setKey (const std::string &key)
 Set the Key (same as name)
 
const std::string & getValue () const
 Get the value (same as type)
 
void setValue (const std::string &value)
 Set the Value (same as type)
 
const std::string & getType () const
 Get the Type (same as value)
 
void setType (const std::string &type)
 Set the Type (same as value)
 
- Public Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of!
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify.
 
void detachObserver (observer_type *observer)
 remove a observer if in list.
 
- Public Member Functions inherited from ddl::dd::datamodel::InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR
 
 InfoMap (InfoMap &&)
 move CTOR
 
InfoMapoperator= (const InfoMap &)
 copy assignment operator
 
InfoMapoperator= (InfoMap &&)
 move assignment operator
 
template<typename INFO_T>
const INFO_T * getInfo () const
 Get the Info Pointer.
 
template<typename INFO_T>
INFO_T * getInfo ()
 Get the Info Pointer.
 
template<typename INFO_T>
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer.
 

Additional Inherited Members

- Public Types inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
typedef TypeAccessMapEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< T, TypeAccessMapEventCodeobserver_type
 local definition of the observer type to notify
 
- Protected Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< T, TypeAccessMapEventCode >
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers
 

Detailed Description

observable KeyValuePair

Constructor & Destructor Documentation

◆ KeyValuePair()

ddl::dd::datamodel::KeyValuePair::KeyValuePair ( std::string name_key,
std::string value_type )

CTOR.

Parameters
name_keyThe name or key of the pair.
value_typeThe value or type of the pair.

Member Function Documentation

◆ getKey()

const std::string & ddl::dd::datamodel::KeyValuePair::getKey ( ) const

Get the Key (same as name)

Returns
const std::string&

◆ getName()

const std::string & ddl::dd::datamodel::KeyValuePair::getName ( ) const

Get the Name (same as key)

Returns
const std::string&

◆ getType()

const std::string & ddl::dd::datamodel::KeyValuePair::getType ( ) const

Get the Type (same as value)

Returns
const std::string&

◆ getValue()

const std::string & ddl::dd::datamodel::KeyValuePair::getValue ( ) const

Get the value (same as type)

Returns
const std::string&

◆ operator!=()

bool ddl::dd::datamodel::KeyValuePair::operator!= ( const KeyValuePair & other) const

non-equality operator.

Parameters
otherthe other key valu to compare
Returns
false the key and value are equal.
true the key and value are not equal.

◆ operator=() [1/2]

KeyValuePair & ddl::dd::datamodel::KeyValuePair::operator= ( const KeyValuePair & )
default

copy assignment operator

Returns
KeyValuePair&

◆ operator=() [2/2]

KeyValuePair & ddl::dd::datamodel::KeyValuePair::operator= ( KeyValuePair && )
default

move assignment operator

Returns
KeyValuePair&

◆ operator==()

bool ddl::dd::datamodel::KeyValuePair::operator== ( const KeyValuePair & other) const

equality operator.

Parameters
otherthe other key valu to compare
Returns
true the key and value are equal.
false the key and value are not equal.

◆ setKey()

void ddl::dd::datamodel::KeyValuePair::setKey ( const std::string & key)

Set the Key (same as name)

Parameters
keythe key
Remarks
This change is observable.
Exceptions
Eachchange may throw if a value with this key already exists.

◆ setName()

void ddl::dd::datamodel::KeyValuePair::setName ( const std::string & name)

Sets the Name (same as key)

Parameters
namethe name to set
Remarks
This change is observable.
Exceptions
Eachchange may throw if a value with this name already exists.

◆ setType()

void ddl::dd::datamodel::KeyValuePair::setType ( const std::string & type)

Set the Type (same as value)

Parameters
typethe type to set.
Remarks
This change is observable.

◆ setValue()

void ddl::dd::datamodel::KeyValuePair::setValue ( const std::string & value)

Set the Value (same as type)

Parameters
valuethe value
Remarks
This change is observable.

The documentation for this class was generated from the following file: