ADTF
Loading...
Searching...
No Matches
xml_ddfromxml_factory.h File Reference
#include <ddl/dd/datamodel/datamodel_datadefinition.h>
#include <ddl/dd/datamodel/xml_literals.h>
#include <ddl/dd/dd_predefined_datatypes.h>
#include <ddl/utilities/access_optional.h>
#include <ddl/utilities/ddl_error.h>
#include <ddl/utilities/std_to_string.h>
#include <ddl/utilities/string_check.h>
#include <list>
#include <regex>
#include <stdexcept>
#include <string>
#include <string_view>
Include dependency graph for xml_ddfromxml_factory.h:

Go to the source code of this file.

Classes

struct  ddl::dd::DDFromXMLFactory< DOM_NODE_TYPE >
 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...
 
struct  ddl::dd::DDFromXMLFactory< DOM_NODE_TYPE >::Mandatory
 
struct  ddl::dd::DDFromXMLFactory< DOM_NODE_TYPE >::AsOptional
 

Namespaces

namespace  ddl
 definition of the ddl namespace
 
namespace  ddl::dd
 definition of the dd namespace
 

Functions

template<typename T>
ddl::dd::detail::toType (std::string from_string, T default_value) noexcept
 Conversion to T.
 
template<typename T>
ddl::dd::detail::toRequiredType (std::string from_string)
 Conversion to T without fallback.
 
template<>
int ddl::dd::detail::toType< int > (std::string from_string, int default_value) noexcept
 
template<>
int ddl::dd::detail::toRequiredType< int > (std::string from_string)
 
template<>
size_t ddl::dd::detail::toType< size_t > (std::string from_string, size_t default_value) noexcept
 
template<>
size_t ddl::dd::detail::toRequiredType< size_t > (std::string from_string)
 
template<>
std::string ddl::dd::detail::toType< std::string > (std::string from_string, std::string default_value) noexcept
 
template<>
std::string ddl::dd::detail::toRequiredType< std::string > (std::string from_string)
 

Detailed Description

OO DataDefinition Redesign

Function Documentation

◆ toRequiredType()

template<typename T>
T ddl::dd::detail::toRequiredType ( std::string from_string)

Conversion to T without fallback.

Parameters
from_stringstring representation of the value
Returns
T when from_string is not empty and vvertible to T.
Exceptions
std::exceptionwhen from_string is emoty or not convertible.

◆ toType()

template<typename T>
T ddl::dd::detail::toType ( std::string from_string,
T default_value )
noexcept

Conversion to T.

Parameters
from_stringstring representation of the value
default_valuethe optional value to set if not set in from_string
Returns
T