Dev Essential
Loading...
Searching...
No Matches
ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType > Struct Template Reference

Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType. More...

#include <datamodel_xml_configurationtoxml_10.h>

Public Types

using xml_base_type = MappingConfigurationToXMLFactoryBase<DomNodeType>
 base factory helper type for xml writing
 

Static Public Member Functions

static void createNode (DomNodeType &parent_node, const datamodel::Source &source)
 Create a Node for a source.
 
static void resolveFunctionCall (DomNodeType &assignment_node, const datamodel::Assignment &assignment, const std::string &current_target_name, const datamodel::MappingConfiguration::Functions &functions)
 resolve a function call to a version 1.0 valid assignment
 
static void createNode (DomNodeType &parent_node, const datamodel::Assignment &assignment, const std::string &current_target_name, const datamodel::MappingConfiguration::Functions &functions)
 Create a Node for an Assignment.
 
static void createNode (DomNodeType &parent_node, const datamodel::Trigger &trigger)
 Create a Node for a Trigger.
 
static void createNode (DomNodeType &parent_node, const datamodel::Target &target, const datamodel::MappingConfiguration::Functions &functions)
 Create a Node for a Target.
 
template<typename PropertiesType>
static void setPropertyAsAttribute (DomNodeType &parent_node, const std::string &name, const PropertiesType &properties, bool is_mandatory)
 Set a Property as attribute if property exists.
 
static void setEnumTableNodes (DomNodeType &dom_node, const std::shared_ptr< const datamodel::Property > &prop)
 Set the Enum Table conversion Nodes of mpping 1.0 from the given property.
 
static void createNode (DomNodeType &parent_node, const datamodel::Function &function_inst)
 Create a Node for a Module.
 
static void createNode (DomNodeType &parent_node, const datamodel::MappingConfiguration &config)
 Create a Node for the config.
 

Detailed Description

template<typename DomNodeType>
struct ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >

Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType.

Template Parameters
DomNodeTypeThe type for the DOM Node which must follow the concept of implementing functions:
  • setAttribute(const std::string& name, const std::string& value);
  • DomNodeType& createChild(const std::string& name);
  • setData(const std::string& name, const std::string& data);

Member Function Documentation

◆ createNode() [1/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::Assignment & assignment,
const std::string & current_target_name,
const datamodel::MappingConfiguration::Functions & functions )
inlinestatic

Create a Node for an Assignment.

Parameters
parent_nodethe parent node where to create the node
assignmentthe datamodel of the assignment
current_target_namethe target name the assignment belongs to
functionsthe functions of the configuration

◆ createNode() [2/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::Function & function_inst )
inlinestatic

Create a Node for a Module.

Parameters
parent_nodethe parent node where to create the node
function_instthe datamodel of the function

◆ createNode() [3/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::MappingConfiguration & config )
inlinestatic

Create a Node for the config.

Parameters
parent_nodethe parent node where to create the node
configthe datamodel of MappingConfiguration

◆ createNode() [4/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::Source & source )
inlinestatic

Create a Node for a source.

Parameters
parent_nodethe parent node where to create the node
sourcethe datamodel of the source

◆ createNode() [5/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::Target & target,
const datamodel::MappingConfiguration::Functions & functions )
inlinestatic

Create a Node for a Target.

Parameters
parent_nodethe parent node where to create the node
targetthe datamodel of the target
functionsthe functions of the configuration

◆ createNode() [6/6]

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::createNode ( DomNodeType & parent_node,
const datamodel::Trigger & trigger )
inlinestatic

Create a Node for a Trigger.

Parameters
parent_nodethe parent node where to create the node
triggerthe datamodel of the Trigger

◆ resolveFunctionCall()

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::resolveFunctionCall ( DomNodeType & assignment_node,
const datamodel::Assignment & assignment,
const std::string & current_target_name,
const datamodel::MappingConfiguration::Functions & functions )
inlinestatic

resolve a function call to a version 1.0 valid assignment

Parameters
assignment_nodethe assignment node
assignmentthe assignment
current_target_namethe current target the assignment belongs to
functionsthe functions in config

◆ setEnumTableNodes()

template<typename DomNodeType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::setEnumTableNodes ( DomNodeType & dom_node,
const std::shared_ptr< const datamodel::Property > & prop )
inlinestatic

Set the Enum Table conversion Nodes of mpping 1.0 from the given property.

Parameters
dom_nodethe node to set the conversion nodes to
propthe property to convert

◆ setPropertyAsAttribute()

template<typename DomNodeType>
template<typename PropertiesType>
static void ddl::mapping::MappingConfigurationToXMLFactory10< DomNodeType >::setPropertyAsAttribute ( DomNodeType & parent_node,
const std::string & name,
const PropertiesType & properties,
bool is_mandatory )
inlinestatic

Set a Property as attribute if property exists.

Template Parameters
PropertiesType
Parameters
parent_nodethe node to set the attribute to
namethe name of the property and attribute
propertiesthe properties to retrieve the property from
is_mandatoryindicates if the property must exists or not
Exceptions
mapping::Errorif is_mandatory is set and the property was not found

The documentation for this struct was generated from the following file: