ADTF
|
observable DataDefinition object class to describe (POD) DataType. More...
Public Member Functions | |
DataType () | |
default CTOR | |
DataType (const DataType &)=default | |
copy CTOR | |
DataType (DataType &&)=default | |
move CTOR | |
DataType & | operator= (const DataType &)=default |
copy assignment operator. More... | |
DataType & | operator= (DataType &&)=default |
move assignment operator. More... | |
DataType (const std::string &name, size_t bit_size, const std::string &description={}, OptionalSize array_size={}, const std::string &unit_name={}, const std::string &minimum_value={}, const std::string &maximum_value={}, OptionalSize default_type_alignment={}) | |
CTOR. More... | |
DataType (const std::initializer_list< std::string > &initializer) | |
CTOR with initializer. More... | |
virtual | ~DataType ()=default |
DTOR. | |
bool | operator== (const DataType &other) const |
equality operator. More... | |
bool | operator!= (const DataType &other) const |
non equality operator. 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... | |
size_t | getBitSize () const |
Get the Bit Size. More... | |
void | setBitSize (size_t size) |
Set the Bit Size. More... | |
OptionalSize | getArraySize () const |
Get the Array Size (optional) More... | |
void | setArraySize (OptionalSize array_size) |
Set the Array Size object. More... | |
const std::string & | getUnitName () const |
Get the Unit Name. More... | |
void | setUnitName (const std::string &unit_name) |
Set the Unit Name. More... | |
const std::string & | getMin () const |
Get the Min Value for information (introduced in DDL 3.0) More... | |
void | setMin (const std::string &minimum_value) |
Set the Min (introduced in DDL 3.0) More... | |
const std::string & | getMax () const |
Get the Max Value for information (introduced in DDL 3.0) More... | |
void | setMax (const std::string &maximum_value) |
Set the Max (introduced in DDL 3.0) More... | |
const std::string & | getDescription () const |
Get the Description. More... | |
void | setDescription (const std::string &description) |
Set the Description. More... | |
const OptionalSize & | getDefaultAlignment () const |
Get the default Alignment if set. 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 (const std::string &additional_info) |
Private Attributes | |
size_t | _bit_size = 0 |
std::string | _description = {} |
OptionalSize | _array_size = {} |
std::string | _unit_name = {} |
std::string | _minimum_value = {} |
std::string | _maximum_value = {} |
OptionalSize | _default_type_alignment = {} |
Additional Inherited Members | |
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 | |
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 (POD) DataType.
Definition at line 111 of file datamodel_types.h.
DataType | ( | const std::string & | name, |
size_t | bit_size, | ||
const std::string & | description = {} , |
||
OptionalSize | array_size = {} , |
||
const std::string & | unit_name = {} , |
||
const std::string & | minimum_value = {} , |
||
const std::string & | maximum_value = {} , |
||
OptionalSize | default_type_alignment = {} |
||
) |
CTOR.
name | name of the datatype |
bit_size | bit size of the datatype |
description | description of the datatype |
array_size | arraysize of the datatype (this is not support in this implementation of StructTypeAccess and typeinfo model!) |
unit_name | unit name of the datatype |
minimum_value | the minimum value (for information only) |
maximum_value | the maximum value (for information only) |
default_type_alignment | Type alignment (this is optional, because it is not part of the DD, but important for automatic calculation of member positions) |
DataType | ( | const std::initializer_list< std::string > & | initializer | ) |
CTOR with initializer.
initializer | the list containing the same values as the CTOR before. Valid in this order:
|
OptionalSize getArraySize | ( | ) | const |
Get the Array Size (optional)
size_t getBitSize | ( | ) | const |
Get the Bit Size.
const OptionalSize& getDefaultAlignment | ( | ) | const |
Get the default Alignment if set.
const std::string& getDescription | ( | ) | const |
Get the Description.
const std::string& getMax | ( | ) | const |
Get the Max Value for information (introduced in DDL 3.0)
const std::string& getMin | ( | ) | const |
Get the Min Value for information (introduced in DDL 3.0)
|
overridevirtual |
Get the Type Of the Type (data_type, enum_type, struct_type, stream_meta_type).
Implements TypeBase.
const std::string& getUnitName | ( | ) | const |
Get the Unit Name.
bool operator!= | ( | const DataType & | other | ) | const |
non equality operator.
other | the other datatype to compare this type to. |
bool operator== | ( | const DataType & | other | ) | const |
equality operator.
other | the other datatype to compare this type to. |
void setArraySize | ( | OptionalSize | array_size | ) |
Set the Array Size object.
array_size | the optional array to set. |
void setBitSize | ( | size_t | size | ) |
Set the Bit Size.
size | the number of bits of this type |
void setDescription | ( | const std::string & | description | ) |
Set the Description.
description | the description to set |
void setMax | ( | const std::string & | maximum_value | ) |
Set the Max (introduced in DDL 3.0)
maximum_value | the maximum value to set for information |
void setMin | ( | const std::string & | minimum_value | ) |
Set the Min (introduced in DDL 3.0)
minimum_value | the minimum value to set for information |
|
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.
void setUnitName | ( | const std::string & | unit_name | ) |
Set the Unit Name.
unit_name |