|
ADTF
|
Factory to create a DataDefinition out of a XML based description. This factory uses a template type DOM_NODE_TYPE which is design to follow the a concept class type definition of the a_util::DOMElement. More...
#include <xml_ddfromxml_factory.h>
Classes | |
| struct | AsOptional |
| struct | Mandatory |
Static Public Member Functions | |
| static bool | isInteger (const std::string &string_to_check) noexcept |
| Checks if the given string is an integer value. | |
| template<typename T> | |
| static utility::Optional< T > | getAttribute (const DOM_NODE_TYPE &dom_node, const std::string &attribute_name, AsOptional) |
Get the Attribute from the dom_node. Return a valid Optional<T> if set, otherwise return default_value or throw. | |
| template<typename T> | |
| static T | getAttribute (const DOM_NODE_TYPE &dom_node, const std::string &attribute_name, T default_value) noexcept |
| template<typename T> | |
| static T | getAttribute (const DOM_NODE_TYPE &dom_node, const std::string &attribute_name, Mandatory) |
| template<typename T> | |
| static utility::Optional< T > | getData (const DOM_NODE_TYPE &dom_node, const std::string &sub_node_name, AsOptional) |
Get the data content of a subnode of dom_node. Return a valid Optional<T> if set, otherwise return default_value or throw. | |
| template<typename T> | |
| static T | getData (const DOM_NODE_TYPE &dom_node, const std::string &sub_node_name, T default_value) noexcept |
| template<typename T> | |
| static T | getData (const DOM_NODE_TYPE &dom_node, const std::string &sub_node_name, Mandatory) |
| static datamodel::Header::ExtDeclaration | createHeaderExtDeclaration (const DOM_NODE_TYPE &dom_node) |
| Create a Header Ext Declaration object. | |
| static datamodel::Header | createHeader (const DOM_NODE_TYPE &dom_node) |
| Create a Header object. | |
| static datamodel::BaseUnit | createBaseUnit (const DOM_NODE_TYPE &dom_node) |
| Create a Base Unit object. | |
| static datamodel::UnitPrefix | createUnitPrefix (const DOM_NODE_TYPE &dom_node) |
| Create a Unit Prefix object. | |
| static datamodel::Unit::RefUnit | createRefUnit (const DOM_NODE_TYPE &dom_node) |
| Create a Ref Unit object. | |
| static datamodel::Unit | createUnit (const DOM_NODE_TYPE &dom_node) |
| Create a Unit object. | |
| static datamodel::DataType | createDataType (const DOM_NODE_TYPE &dom_node, const Version &file_ddl_version, bool strict) |
| Create a Data Type object. | |
| static datamodel::EnumType::Element | createEnumTypeElement (const DOM_NODE_TYPE &dom_node) |
| Create a Enum Type Element object. | |
| static datamodel::EnumType | createEnumType (const DOM_NODE_TYPE &dom_node) |
| Create a Enum Type object. | |
| static datamodel::StructType::Element | createStructTypeElement (const DOM_NODE_TYPE &dom_node, const Version &file_ddl_version, bool strict) |
| Create a Struct Type Element object. | |
| static datamodel::StructType | createStructType (const DOM_NODE_TYPE &dom_node, const Version &file_ddl_version, bool strict) |
| Create a Struct Type object. | |
| static datamodel::StreamMetaType::Property | createStreamMetaTypeProperty (const DOM_NODE_TYPE &dom_node) |
| Create a Stream Meta Type Property object. | |
| static datamodel::StreamMetaType | createStreamMetaType (const DOM_NODE_TYPE &dom_node) |
| Create a Stream Meta Type object. | |
| static datamodel::Stream::Struct | createStreamStruct (const DOM_NODE_TYPE &dom_node) |
| Create a Stream Struct object. | |
| static datamodel::Stream | createStream (const DOM_NODE_TYPE &dom_node) |
| Create a Stream object. | |
| static datamodel::DataDefinition | createDD (const DOM_NODE_TYPE &dom_node, const dd::Version &language_version, bool strict) |
| Creates a whole DataDefinition and read all sub node. | |
Factory to create a DataDefinition out of a XML based description. This factory uses a template type DOM_NODE_TYPE which is design to follow the a concept class type definition of the a_util::DOMElement.
| DOM_NODE_TYPE | a DOMElement class must implement following funtions:
|
|
inlinestatic |
Create a Base Unit object.
| dom_node | the node to create the BaseUnit from (should be "baseunit" tag name). |
|
inlinestatic |
Create a Data Type object.
| dom_node | the node to create the DataType from (should be "datatype" tag name). |
| file_ddl_version | the set filename language verion (from header) |
| strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
|
inlinestatic |
Creates a whole DataDefinition and read all sub node.
| dom_node | node to create the DataDefinition from. |
| language_version | forced language version is no header-tag is found within the dom definition |
| strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
|
inlinestatic |
Create a Enum Type object.
| dom_node | the node to create the EnumType from (should be "enum" tag name). |
|
inlinestatic |
Create a Enum Type Element object.
| dom_node | the node to create the EnumType::Element from (should be "element" tag name). |
|
inlinestatic |
Create a Header object.
| dom_node | the node to create the header from (should be "header" tag name). |
|
inlinestatic |
Create a Header Ext Declaration object.
| dom_node | the node to create the ExDeclaration from (should be "ext_declaration" tag name). |
|
inlinestatic |
Create a Ref Unit object.
| dom_node | the node to create the RefUnit from (should be "refUnit" tag name). |
|
inlinestatic |
Create a Stream object.
| dom_node | node to create the Stream from (should be "stream" tag name). |
|
inlinestatic |
Create a Stream Meta Type object.
| dom_node | node to create the StreamMetaType from (should be "streammetatype" tag name). |
|
inlinestatic |
Create a Stream Meta Type Property object.
| dom_node | node to create the StreamMetaType::Property from (should be "property" tag name). |
|
inlinestatic |
Create a Stream Struct object.
| dom_node | node to create the Stream::Struct from (should be "struct" tag name). |
|
inlinestatic |
Create a Struct Type object.
| dom_node | node to create the StructType from (should be "struct" tag name). |
| file_ddl_version | the set filename language verion (from header) |
| strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
|
inlinestatic |
Create a Struct Type Element object.
| dom_node | the node to create the StructType::Element from (should be "element" tag name). |
| file_ddl_version | the set filename language verion (from header) |
| strict | set to true to load the datamodel exactly like defined (no mixture of DDL tag definitions allowed). |
|
inlinestatic |
Create a Unit object.
| dom_node | the node to create the Unit from (should be "unit" tag name). |
|
inlinestatic |
Create a Unit Prefix object.
| dom_node | the node to create the UnitPrefix from (should be "prefixes" tag name). |
|
inlinestatic |
Get the Attribute from the dom_node. Return a valid Optional<T> if set, otherwise return default_value or throw.
| T | the value type of the returned Optional |
| dom_node | the dom node (see also DDFromXMLFactory) |
| attribute_name | the attribute name |
| default_value | the default value if the attribute was not set. (this will be only used if is_mandatory is false) |
|
inlinestatic |
Get the data content of a subnode of dom_node. Return a valid Optional<T> if set, otherwise return default_value or throw.
| T | the value type of the returned Optional |
| dom_node | the dom node (see also DDFromXMLFactory) |
| sub_node_name | the sub node name |
| default_value | the default value if the attribute was not set. (this will be only used if is_mandatory is false) |
| is_mandatory | if set to true this function will throw if the data area is not set in sub node |
| dd::Error | The function will throw only if is_mandatory is set to true. |
|
inlinestaticnoexcept |
Checks if the given string is an integer value.
| [in] | string_to_check | the string to check |