|
Dev Essential
1.6.3
|
DataDefinition Datamodel This datamodel is observable for any change of: More...
#include <datamodel_datadefinition.h>
Inherits ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelObserverUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode >, and ddl::dd::datamodel::InfoMap.
Public Types | |
| using | BaseUnits = utility::TypeAccessMap<BaseUnit, DataDefinition> |
| container class for all BaseUnits | |
| using | UnitPrefixes = utility::TypeAccessMap<UnitPrefix, DataDefinition> |
| container class for all UnitPrefixes | |
| using | Units = utility::TypeAccessMap<Unit, DataDefinition> |
| container class for all Units | |
| using | DataTypes = utility::TypeAccessMap<DataType, DataDefinition> |
| container class for all DataTypes | |
| using | EnumTypes = utility::TypeAccessMap<EnumType, DataDefinition> |
| container class for all EnumTypes | |
| using | StructTypes = utility::TypeAccessMap<StructType, DataDefinition> |
| container class for all StructTypes | |
| using | StreamMetaTypes = utility::TypeAccessMap<StreamMetaType, DataDefinition> |
| container class for all StreamMetaTypes | |
| using | Streams = utility::TypeAccessMap<Stream, DataDefinition> |
| container class for all Streams | |
Public Types inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode > | |
| typedef ModelEventCode | event_code_type |
| local definition of the event code type | |
| typedef TYPE | subject_type |
| local definition of the subject type | |
| typedef ModelObserverUtility< TYPE, ModelEventCode > | observer_type |
| local definition of the observer type to notify | |
| typedef ModelEventCode | event_code_type |
| local definition of the event code type | |
| typedef TYPE | subject_type |
| local definition of the subject type | |
| typedef ModelObserverUtility< TYPE, ModelEventCode > | observer_type |
| local definition of the observer type to notify | |
| typedef ModelEventCode | event_code_type |
| local definition of the event code type | |
| typedef TYPE | subject_type |
| local definition of the subject type | |
| typedef ModelObserverUtility< TYPE, ModelEventCode > | observer_type |
| local definition of the observer type to notify | |
| typedef ModelEventCode | event_code_type |
| local definition of the event code type | |
| typedef TYPE | subject_type |
| local definition of the subject type | |
| typedef ModelObserverUtility< TYPE, ModelEventCode > | observer_type |
| local definition of the observer type to notify | |
Public Member Functions | |
| DataDefinition () | |
| CTOR. Creates a datamodel with the current version (ddl::dd::Version) | |
| DataDefinition (const dd::Version &ddl_version) | |
| CTOR. Creates a datamodel with the given version (ddl::dd::Version) | |
| DataDefinition (DataDefinition &&) | |
| move CTOR | |
| DataDefinition & | operator= (DataDefinition &&) |
| move assignment operator | |
| DataDefinition (const DataDefinition &other) | |
| CTOR. Copies the datamodel DD. | |
| DataDefinition & | operator= (const DataDefinition &other) |
resets the current content an copies the other | |
| virtual | ~DataDefinition ()=default |
| void | setVersion (const dd::Version &ddl_version) |
| Set the DDL Version (in the header!) | |
| Version | getVersion () const |
| Get the DDL Version. | |
| std::shared_ptr< const Header > | getHeader () const |
| Get the Header object. | |
| std::shared_ptr< Header > | getHeader () |
| Get the Header object. | |
| void | setHeader (const Header &header) |
| Set the Header object. | |
| const BaseUnits & | getBaseUnits () const |
| Get the Base Units object. | |
| BaseUnits & | getBaseUnits () |
| Get the Base Units object. | |
| const UnitPrefixes & | getUnitPrefixes () const |
| Get the Unit Prefixes object. | |
| UnitPrefixes & | getUnitPrefixes () |
| Get the Unit Prefixes object. | |
| const Units & | getUnits () const |
| Get the Units object. | |
| Units & | getUnits () |
| Get the Units object. | |
| const DataTypes & | getDataTypes () const |
| Get the Data Types object. | |
| DataTypes & | getDataTypes () |
| Get the Data Types object. | |
| const EnumTypes & | getEnumTypes () const |
| Get the Enum Types object. | |
| EnumTypes & | getEnumTypes () |
| Get the Enum Types object. | |
| const StructTypes & | getStructTypes () const |
| Get the Struct Types object. | |
| StructTypes & | getStructTypes () |
| Get the Struct Types object. | |
| const StreamMetaTypes & | getStreamMetaTypes () const |
| Get the Stream Meta Types object. | |
| StreamMetaTypes & | getStreamMetaTypes () |
| Get the Stream Meta Types object. | |
| const Streams & | getStreams () const |
| Get the Streams object. | |
| Streams & | getStreams () |
| Get the Streams object. | |
| bool | containsType (const std::string &type_name) const |
| Retrieve information if the datamodel contains a type with the given name. Following types are considered: DataType, StructType, EnumType, StreamMetaType. | |
| TypeOfType | getTypeOfType (const std::string &type_name) const |
| Retrieve information if the datamodel contains a type with the given name and return the type of it. Following types are considered: DataType, StructType, EnumType, StreamMetaType. | |
| bool | containsUnit (const std::string &unit_name) const |
| Retrieve information if the datamodel contains a unit with the given name. Following units are considered: BaseUnit, Unit. | |
| TypeOfUnit | getTypeOfUnit (const std::string &unit_name) const |
| Retrieve information if the datamodel contains a unit with the given name and return the type of it. Following units are considered: BaseUnit, Unit. | |
| bool | isEmpty () const |
Public Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode > | |
| 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! | |
| 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! | |
| ModelSubjectUtility & | operator= (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! | |
| ModelSubjectUtility & | operator= (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! | |
| ModelSubjectUtility & | operator= (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 | |
| InfoMap & | operator= (const InfoMap &) |
| copy assignment operator | |
| InfoMap & | operator= (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 | |
Protected Member Functions inherited from ddl::dd::utility::ModelSubjectUtility< TYPE, ModelEventCode > | |
| 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 | |
DataDefinition Datamodel This datamodel is observable for any change of:
Use the ModelObserver template to observe the specific change.
Example: If you observe the changes on a StructType:
| ddl::dd::datamodel::DataDefinition::DataDefinition | ( | const dd::Version & | ddl_version | ) |
CTOR. Creates a datamodel with the given version (ddl::dd::Version)
| ddl_version | the version to use. |
| ddl::dd::datamodel::DataDefinition::DataDefinition | ( | const DataDefinition & | other | ) |
CTOR. Copies the datamodel DD.
| other | the other DD to copy. |
|
virtualdefault |
DTOR
| bool ddl::dd::datamodel::DataDefinition::containsType | ( | const std::string & | type_name | ) | const |
Retrieve information if the datamodel contains a type with the given name.
Following types are considered: DataType, StructType, EnumType, StreamMetaType.
| type_name | the name to check |
| bool ddl::dd::datamodel::DataDefinition::containsUnit | ( | const std::string & | unit_name | ) | const |
| BaseUnits & ddl::dd::datamodel::DataDefinition::getBaseUnits | ( | ) |
| const BaseUnits & ddl::dd::datamodel::DataDefinition::getBaseUnits | ( | ) | const |
| DataTypes & ddl::dd::datamodel::DataDefinition::getDataTypes | ( | ) |
Get the Data Types object.
| const DataTypes & ddl::dd::datamodel::DataDefinition::getDataTypes | ( | ) | const |
Get the Data Types object.
| EnumTypes & ddl::dd::datamodel::DataDefinition::getEnumTypes | ( | ) |
Get the Enum Types object.
| const EnumTypes & ddl::dd::datamodel::DataDefinition::getEnumTypes | ( | ) | const |
Get the Enum Types object.
| std::shared_ptr< Header > ddl::dd::datamodel::DataDefinition::getHeader | ( | ) |
Get the Header object.
| std::shared_ptr< const Header > ddl::dd::datamodel::DataDefinition::getHeader | ( | ) | const |
Get the Header object.
| StreamMetaTypes & ddl::dd::datamodel::DataDefinition::getStreamMetaTypes | ( | ) |
Get the Stream Meta Types object.
| const StreamMetaTypes & ddl::dd::datamodel::DataDefinition::getStreamMetaTypes | ( | ) | const |
Get the Stream Meta Types object.
| Streams & ddl::dd::datamodel::DataDefinition::getStreams | ( | ) |
| const Streams & ddl::dd::datamodel::DataDefinition::getStreams | ( | ) | const |
| StructTypes & ddl::dd::datamodel::DataDefinition::getStructTypes | ( | ) |
Get the Struct Types object.
| const StructTypes & ddl::dd::datamodel::DataDefinition::getStructTypes | ( | ) | const |
Get the Struct Types object.
| TypeOfType ddl::dd::datamodel::DataDefinition::getTypeOfType | ( | const std::string & | type_name | ) | const |
Retrieve information if the datamodel contains a type with the given name and return the type of it.
Following types are considered: DataType, StructType, EnumType, StreamMetaType.
| type_name | the name to check |
| TypeOfType::invalid_type | A type with the given name does not exists. |
| TypeOfType::data_type | A type with the given name is a DataType. |
| TypeOfType::enum_type | A type with the given name is a EnumType. |
| TypeOfType::struct_type | A type with the given name is a StructType. |
| TypeOfType::streammetatype_type | A type with the given name is a StreamMetaType. |
| TypeOfUnit ddl::dd::datamodel::DataDefinition::getTypeOfUnit | ( | const std::string & | unit_name | ) | const |
Retrieve information if the datamodel contains a unit with the given name and return the type of it.
Following units are considered: BaseUnit, Unit.
| unit_name | the name to check |
| TypeOfUnit::invalid_unit | A unit with the given name does not exists. |
| TypeOfUnit::unit | A unit with the given name is a Unit. |
| TypeOfUnit::base_unit | A unit with the given name is a BaseUnit. |
| UnitPrefixes & ddl::dd::datamodel::DataDefinition::getUnitPrefixes | ( | ) |
Get the Unit Prefixes object.
| const UnitPrefixes & ddl::dd::datamodel::DataDefinition::getUnitPrefixes | ( | ) | const |
Get the Unit Prefixes object.
| const Units & ddl::dd::datamodel::DataDefinition::getUnits | ( | ) | const |
| Version ddl::dd::datamodel::DataDefinition::getVersion | ( | ) | const |
| bool ddl::dd::datamodel::DataDefinition::isEmpty | ( | ) | const |
indicates the model as empty or not.
| DataDefinition & ddl::dd::datamodel::DataDefinition::operator= | ( | const DataDefinition & | other | ) |
resets the current content an copies the other
| other | the other to copy from |
| DataDefinition & ddl::dd::datamodel::DataDefinition::operator= | ( | DataDefinition && | ) |
move assignment operator
| void ddl::dd::datamodel::DataDefinition::setHeader | ( | const Header & | header | ) |
Set the Header object.
| header | the header to set |
| void ddl::dd::datamodel::DataDefinition::setVersion | ( | const dd::Version & | ddl_version | ) |
Set the DDL Version (in the header!)
| ddl_version | the version to set |