ADTF
|
observable DataDefinition object class to describe EnumType. More...
Public Types | |
using | Element = KeyValuePair |
Enum type element defintion as Name Value pair. | |
using | Elements = utility::TypeAccessMap< Element, EnumType > |
container class for elements in EnumType | |
Public Types inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T > | |
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 | |
Public Member Functions | |
EnumType ()=delete | |
no default CTOR | |
EnumType (EnumType &&) | |
move CTOR. | |
EnumType & | operator= (EnumType &&) |
move assignment operator More... | |
EnumType (const EnumType &other) | |
Copy CTOR. More... | |
EnumType & | operator= (const EnumType &other) |
copy assignment operator More... | |
EnumType (const std::string &name, const std::string &data_type_name, const std::vector< Element > &elements={}) | |
Construct a new Enum Type object. More... | |
virtual | ~EnumType ()=default |
DTOR. | |
bool | operator== (const EnumType &other) const |
equality operator. More... | |
bool | operator!= (const EnumType &other) const |
non equality operator. More... | |
const Elements & | getElements () const |
Get the Elements object. More... | |
Elements & | getElements () |
Get the Elements object. More... | |
TypeOfType | getTypeOfType () const override |
Get the Type Of the Type (data_type, enum_type, struct_type, stream_meta_type). More... | |
void | setName (const std::string &name) override |
Set the Name. More... | |
const std::string & | getDataTypeName () const |
Get the Data Type Name. More... | |
void | setDataTypeName (const std::string &data_type_name) |
Set the Data Type Name. More... | |
Public Member Functions inherited from TypeBase | |
TypeBase ()=default | |
CTOR. | |
TypeBase (const TypeBase &)=default | |
copy CTOR | |
TypeBase (TypeBase &&)=default | |
move CTOR | |
TypeBase & | operator= (const TypeBase &)=default |
copy assignment operator More... | |
TypeBase & | operator= (TypeBase &&)=default |
move assignment operator More... | |
TypeBase (const std::string &name) | |
CTOR. More... | |
virtual | ~TypeBase ()=default |
DTOR. | |
const std::string & | getName () const |
Get the Name. More... | |
Public Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T > | |
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... | |
Public Member Functions inherited from InfoMap | |
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 Member Functions | |
void | notify (ModelEventCode code, utility::TypeAccessMapEventCode forward_code, const std::string &additional_info) |
bool | validateContains (const Elements::access_type &element_name) const |
void | notifyChangedMapContent (utility::TypeAccessMapEventCode code, Elements::access_type &element, const std::string &additional_info) |
Private Attributes | |
std::string | _data_type_name = {} |
Elements | _elements |
Additional Inherited Members | |
Protected Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T > | |
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... | |
Protected Attributes inherited from TypeBase | |
std::string | _name |
name storage value | |
observable DataDefinition object class to describe EnumType.
Definition at line 318 of file datamodel_types.h.
EnumType | ( | const std::string & | name, |
const std::string & | data_type_name, | ||
const std::vector< Element > & | elements = {} |
||
) |
Construct a new Enum Type object.
name | name of the enum |
data_type_name | name of the data type this enumtype refers to |
elements | vector of elements to add while constructing |
may | throw if elements contains elements with trhe same name twice! |
const std::string& getDataTypeName | ( | ) | const |
Get the Data Type Name.
Elements& getElements | ( | ) |
Get the Elements object.
const Elements& getElements | ( | ) | const |
Get the Elements object.
|
overridevirtual |
Get the Type Of the Type (data_type, enum_type, struct_type, stream_meta_type).
Implements TypeBase.
bool operator!= | ( | const EnumType & | other | ) | const |
non equality operator.
other | the enum type to compare the enum to |
bool operator== | ( | const EnumType & | other | ) | const |
equality operator.
other | the enum type to compare the enum to |
void setDataTypeName | ( | const std::string & | data_type_name | ) |
Set the Data Type Name.
data_type_name | name of the datatype this enumtype referes to. |
|
overridevirtual |
Set the Name.
name | The name of type. |
This | might throw if the set name does already exist in the container this type is part of. |
Reimplemented from TypeBase.