ADTF
Loading...
Searching...
No Matches
datamodel_base.h File Reference
Include dependency graph for datamodel_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ddl
 definition of the ddl namespace
 
namespace  ddl::mapping
 definition of the mapping namespace
 

Typedefs

template<typename SubjectType>
using ddl::mapping::datamodel::ModelSubject = ddl::utility::ModelSubjectUtility<SubjectType, ModelEventCode>
 Subject template class for observable objects.
 
template<typename SubjectType>
using ddl::mapping::datamodel::ModelObserver = ddl::utility::ModelObserverUtility<SubjectType, ModelEventCode>
 Observer template class that observe the SubjectType.
 
using ddl::mapping::datamodel::InfoMap = ddl::utility::InfoMap
 reuse of InfoMap with the mapping data model
 

Enumerations

enum  ddl::mapping::datamodel::ModelEventCode {
  ddl::mapping::datamodel::item_changed , ddl::mapping::datamodel::item_removed , ddl::mapping::datamodel::item_added , ddl::mapping::datamodel::item_renamed ,
  ddl::mapping::datamodel::subitem_added , ddl::mapping::datamodel::subitem_removed , ddl::mapping::datamodel::subitem_changed , ddl::mapping::datamodel::subitem_renamed ,
  ddl::mapping::datamodel::subitem_popped , ddl::mapping::datamodel::subitem_inserted , ddl::mapping::datamodel::item_removing , ddl::mapping::datamodel::subitem_removing ,
  ddl::mapping::datamodel::item_renaming , ddl::mapping::datamodel::subitem_renaming
}
 Model event code for the data model observer. More...
 

Detailed Description

Mapping Configuration data model observer - subject pattern usage definition

Typedef Documentation

◆ ModelObserver

template<typename SubjectType>
using ddl::mapping::datamodel::ModelObserver = ddl::utility::ModelObserverUtility<SubjectType, ModelEventCode>

Observer template class that observe the SubjectType.

Template Parameters
SubjectTypeObject type that is the subject to observe.

◆ ModelSubject

template<typename SubjectType>
using ddl::mapping::datamodel::ModelSubject = ddl::utility::ModelSubjectUtility<SubjectType, ModelEventCode>

Subject template class for observable objects.

Template Parameters
SubjectTypeObject type that is the subject to observe.

Enumeration Type Documentation

◆ ModelEventCode

Model event code for the data model observer.

Enumerator
item_changed 

any content of the item was changed.


Possible items

  • header
  • target
  • source
  • module

The event has a additional parameter "additional_info": This is set to the name of attribute changed. Following rule (camelCase to snake_case):

  • if the function setSymbol() was call this is set to "symbol"
  • if the function setStructVersion() was called this is set to "struct_version"
item_removed 

the item was removed.
Possible items

  • target
  • source
  • module
item_added 

the item was added.
Possible items

  • target
  • source
  • module
item_renamed 

the item was renamed.
Possible items

  • target
  • source
  • module

The event has a additional parameter "additional_info": This is set to the old name of item that was changed.

subitem_added 

the sub item was added

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
  • for target -> property
  • for source -> property
  • for module -> property
subitem_removed 

the sub item was removed

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
  • for target -> property
  • for source -> property
  • for module -> property
subitem_changed 

the sub item was changed

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
  • for target -> property
  • for source -> property
  • for module -> property

The event has a additional parameter "additional_info": This is set to the name of attribute changed. Following rule (camelCase to snake_case):

  • if the function setSymbol() was call this is set to "symbol"
  • if the function setType() was called this is set to "type"
  • if the function setArraySize() was called this is set to "array_size"
subitem_renamed 

the sub item was renamed

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
  • for target -> property
  • for source -> property
  • for module -> property

The event has a additional parameter "additional_info": This is set to the old name of item that was changed.

subitem_popped 

the last item was removed.

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
subitem_inserted 

the sub item was inserted

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
item_removing 

the item is about to removing
Possible items

  • target
  • source
  • module
subitem_removing 

the sub item is about to removing

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
item_renaming 

the item is about to be renamed renamed.
Possible items

  • target
  • source
  • module

The event has a additional parameter "additional_info": This is set to the new name of item that will be changed changed.

subitem_renaming 

the sub item is about to be renamed

  • for target -> assignment
  • for target -> assignment -> parameter_value
  • for target -> trigger
  • for target -> property
  • for source -> property
  • for module -> property

The event has a additional parameter "additional_info": This is set to the new name of item that will be changed.