ADTF
Loading...
Searching...
No Matches
datamodel_xml_configuration.h File Reference
Include dependency graph for datamodel_xml_configuration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ddl
 definition of the ddl namespace
 
namespace  ddl::mapping
 definition of the mapping namespace
 

Functions

MappingConfiguration ddl::mapping::datamodel::fromXMLString (const std::string &xml_string, const mapping::Version &version={})
 creates a datamodel from a xml string
 
std::string ddl::mapping::datamodel::toXMLString (const MappingConfiguration &config)
 creates a XML from the MappingConfiguration.
 
MappingConfiguration ddl::mapping::datamodel::fromXMLFile (const std::string &xml_filepath)
 creates a datamodel from a xml file
 
void ddl::mapping::datamodel::toXMLFile (const MappingConfiguration &config, const std::string &xml_filepath)
 creates a XML file from the given MappingConfiguration datamodel.
 
void ddl::mapping::datamodel::toXMLFile (const MappingConfiguration &config, const std::string &xml_filepath, a_util::SortingOrder order)
 creates a XML file from the given MappingConfiguration datamodel.
 

Detailed Description

MappingConfiguration datamodel XML reader and writer

Function Documentation

◆ fromXMLFile()

MappingConfiguration ddl::mapping::datamodel::fromXMLFile ( const std::string & xml_filepath)

creates a datamodel from a xml file

Parameters
xml_filepatha valid file path (if relative the current working directory is base)
Returns
MappingConfiguration
Exceptions
throwsmapping::Error if the XML given is not valid. More information on exception.

◆ fromXMLString()

MappingConfiguration ddl::mapping::datamodel::fromXMLString ( const std::string & xml_string,
const mapping::Version & version = {} )

creates a datamodel from a xml string

Parameters
xml_stringthe string as xml
versionthe mapping version to set into model if possible
Returns
MappingConfiguration
Exceptions
throwsmapping::Error if the XML given is not valid. More information on exception.

◆ toXMLFile() [1/2]

void ddl::mapping::datamodel::toXMLFile ( const MappingConfiguration & config,
const std::string & xml_filepath )

creates a XML file from the given MappingConfiguration datamodel.

Parameters
configthe MappingConfiguration the xml file is to create
xml_filepatha valid file path (if relative the current working directory is base)
Exceptions
throwsmapping::Error if the version of the config is not valid for the items used within model.

◆ toXMLFile() [2/2]

void ddl::mapping::datamodel::toXMLFile ( const MappingConfiguration & config,
const std::string & xml_filepath,
a_util::SortingOrder order )

creates a XML file from the given MappingConfiguration datamodel.

Parameters
configthe MappingConfiguration the xml file is to create
xml_filepatha valid file path (if relative the current working directory is base)
orderSort nodes either in ascending or in descending order
Exceptions
throwsmapping::Error if the version of the config is not valid for the items used within model.

◆ toXMLString()

std::string ddl::mapping::datamodel::toXMLString ( const MappingConfiguration & config)

creates a XML from the MappingConfiguration.

Parameters
configthe MappingConfiguration the xml string is to create
Returns
std::string the xml string