Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType.
More...
#include <datamodel_xml_configurationtoxml_base.h>
|
| template<typename T> |
| static bool | setOptionalAttribute (DomNodeType &dom_node, const char *attribute_name, const utility::Optional< T > &value) |
| | Set the Optional Attribute. This will only set the attribute if the value is valid.
|
| |
| static bool | setOptionalAttribute (DomNodeType &dom_node, const char *attribute_name, const std::string &value) |
| | Set the Optional Attribute. This will only set the attribute if the value is not empty.
|
| |
| static void | setSubNodeData (DomNodeType &dom_node, const std::string &sub_node_name, const std::string &value) |
| | Set the data of the new created tag with the name sub_node_name.
|
| |
| static void | setOptionalSubNodeData (DomNodeType &dom_node, const std::string &sub_node_name, const std::string &value) |
| | Set the data of the new created tag with the name sub_node_name.
|
| |
template<typename DomNodeType>
struct ddl::mapping::MappingConfigurationToXMLFactoryBase< DomNodeType >
Template class to create MappingConfiguration DOM nodes with the help of the type DomNodeType.
- Template Parameters
-
| DomNodeType | The 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);
|
◆ setOptionalAttribute() [1/2]
template<typename DomNodeType>
Set the Optional Attribute. This will only set the attribute if the value is not empty.
- Parameters
-
| dom_node | the dom node where to set the attribute |
| attribute_name | the attribute name |
| value | the value of the attribute |
- Returns
- true the value was set
-
false the value was not set
◆ setOptionalAttribute() [2/2]
template<typename DomNodeType>
template<typename T>
Set the Optional Attribute. This will only set the attribute if the value is valid.
- Template Parameters
-
| T | The value_type of the optional |
- Parameters
-
| dom_node | the dom node where to set the attribute |
| attribute_name | the attribute name |
| value | the value of the attribute |
- Returns
- true the value was set
-
false the value was not set
◆ setOptionalSubNodeData()
template<typename DomNodeType>
Set the data of the new created tag with the name sub_node_name.
- Parameters
-
| dom_node | the dom node where to set the attribute |
| sub_node_name | the subnode tag name |
| value | the data content |
◆ setSubNodeData()
template<typename DomNodeType>
Set the data of the new created tag with the name sub_node_name.
- Parameters
-
| dom_node | the dom node where to set the attribute |
| sub_node_name | the subnode tag name |
| value | the data content |
The documentation for this struct was generated from the following file: