14 #ifndef HEADER_MAP_CONFIGURATION_H
15 #define HEADER_MAP_CONFIGURATION_H
41 mc_load_mapping = 0x1 << 0,
45 mc_merge_mapping = 0x1 << 1
65 const std::shared_ptr<const ddl::dd::datamodel::DataDefinition>& ddl_datamodel);
132 std::shared_ptr<const ddl::dd::datamodel::DataDefinition>
getDD()
const;
152 uint32_t flags = mc_load_mapping);
183 uint32_t flags = mc_load_mapping);
199 uint32_t flags = mc_load_mapping);
217 uint32_t flags = mc_load_mapping);
300 const std::string& transformation_type);
505 const std::string& path)
const;
563 std::shared_ptr<const ddl::dd::datamodel::DataDefinition> _ddl_ref;
564 bool _checked_for_consistency;
A common result class usable as return value throughout.
XML parser to read and write standard XML files.
The Data Definiton class uses the validation model to keep a Data Definition datamodel (ddl::dd::data...
Class to access and obtain the byte position and other information of a instance of this element with...
observable DataDefinition object class to describe StructType.
MapConfiguration is the central class of the mapping::dd namespace.
a_util::result::Result checkAssignmentReferences(const MapAssignment &assignment) const
Checks the configuration for consistency of a new assignment.
a_util::result::Result loadFromFile(const std::string &file_path, uint32_t flags=mc_load_mapping)
Import mapping configuration from a file Load file in DOM and call loadFromDOM()
const MapTransformationBase * getTransformation(const std::string &transformation_name) const
Returns a specific transformation from the configuration.
a_util::result::Result addTarget(const std::string &name, const std::string &type)
Add a target signal to use in mapping.
a_util::result::Result addTarget(const MapTarget &target)
Add a target signal to configuration.
a_util::result::Result checkSignalName(const std::string &name) const
Checks the configuration for consistency of a new signal.
a_util::result::Result resetErrors()
Clear error list and verify DataDefinition Description exists.
MapConfiguration & operator=(MapConfiguration &&other)
Assignment operator.
a_util::result::Result setDD(const ddl::dd::DataDefinition &dd)
Set the reference DD.
MapTarget * getTarget(const std::string &target_name)
Returns a specific mapping target from the configuration.
a_util::result::Result setHeaderDescription(const std::string &desc)
Set the description in configuration header.
void repairConfigReferences(MapConfiguration &config)
Set reference to new configuration.
a_util::result::Result checkSignalType(const std::string &type) const
Checks the configuration for consistency of a new signal.
const ddl::dd::StructElementAccess findTypeObject(const std::string &struct_name, const std::string &path) const
Find a DataDefinition data type within a struct given a path to the element.
a_util::result::Result loadPartiallyFromDOM(a_util::xml::DOM &dom, uint32_t flags=mc_load_mapping)
Import mapping configuration from a XML dom instance Modell is laoding even if it is not consistent w...
std::shared_ptr< const ddl::dd::datamodel::DataDefinition > getDD() const
Get the reference ddl description.
a_util::result::Result merge(const MapConfiguration &other)
merge another configuration into this one
a_util::result::Result checkAssignmentType(const std::string &signal_name, const ddl::dd::datamodel::StructType &signal_struct, const MapAssignment &assignment) const
Checks the configuration for consistency of a new assignment.
a_util::result::Result writeToFile(const std::string &file_path)
Export mapping configuration to a file Call writeToDOM() and wirte DOM to file.
MapConfiguration(const std::shared_ptr< const ddl::dd::datamodel::DataDefinition > &ddl_datamodel)
CTOR.
a_util::result::Result removeTarget(const std::string &name)
Remove a target signal from the configuration All connections using this source will be deleted.
a_util::result::Result loadPartiallyFromFile(const std::string &file_path, uint32_t flags=mc_load_mapping)
Import mapping configuration from a file Load file in DOM and call loadPartiallyFromDOM() Modell is l...
a_util::result::Result removeSource(const std::string &name)
Remove a source signal from the configuration All connections using this source will be deleted.
const MapTarget * getTarget(const std::string &target_name) const
Returns a specific mapping target from the configuration.
a_util::result::Result modifyDD(const ddl::dd::DataDefinition &ddl)
Modify the reference ddl description Set the new ddl description and check mapping consistency.
a_util::result::Result addSource(const std::string &name, const std::string &type)
Add a source signal to use in mapping.
const MapTransformationList & getTransformationList() const
Returns all transformations contained in the configuration.
a_util::result::Result checkMappingConsistency()
Checks the mapping for consistency All referenced Sources and Transformations must exist in Mapping.
a_util::result::Result removeTransformation(const std::string &transformation_name)
Remove a transformation.
MapConfiguration(const ddl::dd::DataDefinition &ddl)
CTOR.
MapTransformationBase * getTransformation(const std::string &transformation_name)
Returns a specific transformation from the configuration.
const std::string & getHeaderDDPaths() const
Get the ddl paths attribute from configuration header.
a_util::result::Result checkTriggerType(const MapTriggerBase *trigger) const
Checks the configuration for consistency of a new trigger.
const MapErrorList & getErrorList() const
Returns the error list, containing human readable error messages.
MapConfiguration(MapConfiguration &&other)
C-CTOR.
a_util::result::Result loadFromDOM(a_util::xml::DOM &dom, uint32_t flags=mc_load_mapping)
Import mapping configuration from a XML dom instance.
void swap(MapConfiguration &other)
swap implementation for use in the assignment op
const MapSourceList & getSourceList() const
Returns all mapping sources contained in the configuration.
a_util::result::Result loadFromDOMWithoutDDLConsistency(a_util::xml::DOM &dom, uint32_t flags=mc_load_mapping)
Import mapping configuration from a XML dom instance without checking for DataDefinition consistency.
a_util::result::Result setDDWithoutConsistency(const ddl::dd::DataDefinition &ddl)
Set the reference Data description without consistency check.
bool isConsistencyChecked()
Returns bool flag indicating whether consistency of mapping with its DataDefinition was already check...
a_util::result::Result setHeaderDDPaths(const std::string &ddl_path)
Set the ddl paths attribute in configuration header.
const MapSource * getSource(const std::string &source_name) const
Returns a specific mapping source from the configuration.
MapSource * getSource(const std::string &source_name)
Returns a specific mapping source from the configuration.
a_util::result::Result checkDDLConsistency()
Checks the configuration for consistency with ddl representation (all types, transformations etc.
bool isConsistent()
Returns bool flag indicating consistency of mapping with its DataDefinition.
MapConfiguration(const MapConfiguration &other)
C-CTOR.
static a_util::result::Result loadMappingFromDOM(a_util::xml::DOM &dom, MapConfiguration &tmp_config)
Import mapping configuration from a XML dom instance.
void reset()
Resets the entire map configuration to its initial, empty state.
MapConfigFlags
Mapping import flags (loadFromFile, loadFromDOM)
void appendError(const std::string &error_string) const
Append error to error list.
a_util::result::Result addTransformation(const std::string &transformation_name, const std::string &transformation_type)
Add a transformation to use in mapping.
const MapTargetList & getTargetList() const
Returns all mapping targets contained in the configuration.
a_util::result::Result writeToDOM(a_util::xml::DOM &dom)
Export mapping configuration to a XML dom instance.
a_util::result::Result resetDD()
Resets the reference DD.
a_util::result::Result addSource(const MapSource &source)
Add a source signal to configuration.
const MapHeader & getHeader() const
Returns the mapping header of the configuration.
MapConfiguration & operator=(const MapConfiguration &other)
Assignment operator.
implementation of a data trigger in the configuration api
MapSource represents a mapping source from the configuration file.
MapTarget represents a mapped target from the mapping configuration.
cMapTrigger forms a base class for a trigger contained in the configuration
OO DataDefinition - Data Definition.
WRITER_TYPE & trigger(WRITER_TYPE &oWriter)
Global function template to trigger a writers sample stream manually.
std::vector< std::string > MapErrorList
container type for mapping errors
std::vector< MapSource > MapSourceList
Public composite types used in the mapping::dd namespace.
std::vector< MapTransformationBase * > MapTransformationList
Public composite types used in the mapping::dd namespace.
std::vector< MapTarget > MapTargetList
Public composite types used in the mapping::dd namespace.
definition of the ddl namespace