ADTF
Loading...
Searching...
No Matches
ddl::mapping::MappingConfiguration Class Referencefinal

Mapping Configuration model with validation and requirements management. More...

#include <mapping_configuration.h>

Public Types

using Header = datamodel::Header
 header type
 
using Sources = datamodel::MappingConfiguration::Sources
 Sources type.
 
using Targets = datamodel::MappingConfiguration::Targets
 Targets type.
 
using Functions = datamodel::MappingConfiguration::Functions
 Modules type.
 

Public Member Functions

 MappingConfiguration ()
 CTOR.
 
 MappingConfiguration (const Version &version)
 CTOR.
 
 MappingConfiguration (const MappingConfiguration &other)
 copy CTOR
 
 MappingConfiguration (MappingConfiguration &&other)
 move CTOR
 
 MappingConfiguration (const std::shared_ptr< datamodel::MappingConfiguration > &datamodel)
 Construct a new MappingConfiguration and set the datamodel to the given one.
 
 ~MappingConfiguration ()
 DTOR.
 
MappingConfigurationoperator= (const MappingConfiguration &other)
 copy assignment operator
 
MappingConfigurationoperator= (MappingConfiguration &&other)
 move assignment operator
 
bool operator== (const MappingConfiguration &other) const
 equality operator
 
bool operator!= (const MappingConfiguration &other) const
 inequality operator
 
void setModel (const std::shared_ptr< datamodel::MappingConfiguration > &datamodel)
 Sets and references the datamodel object, that is to validate and observe.
 
std::shared_ptr< const datamodel::MappingConfigurationgetModel () const
 Gets the datamodel reference.
 
std::shared_ptr< const HeadergetHeader () const
 Get the Header.
 
std::shared_ptr< HeadergetHeader ()
 Get the Header.
 
void setHeader (const Header &header)
 Set the Header.
 
Version getVersion () const
 Get the version.
 
void setVersion (const Version &version)
 Set the version.
 
const SourcesgetSources () const
 Get the Sources.
 
SourcesgetSources ()
 Get the Sources.
 
const TargetsgetTargets () const
 Get the Targets.
 
TargetsgetTargets ()
 Get the Targets.
 
const FunctionsgetFunctions () const
 Get the Modules.
 
FunctionsgetFunctions ()
 Get the Functions.
 
bool isValid (ValidationLevel level=ValidationLevel::valid) const
 Obtains if the validation level has reached at least the given level.
 
std::vector< ProblemgetValidationProtocol () const
 Gets a collection of all problems obtained while validating the MappingConfiguration.
 
Version getRequiredVersion () const
 Get the Required Version for the model.
 
std::vector< RequirementgetRequirements () const
 Get the Requirements that are at least 2.0 requirements.
 

Detailed Description

Mapping Configuration model with validation and requirements management.

Constructor & Destructor Documentation

◆ MappingConfiguration() [1/4]

ddl::mapping::MappingConfiguration::MappingConfiguration ( const Version & version)

CTOR.

Parameters
versionthe mapping version to use

◆ MappingConfiguration() [2/4]

ddl::mapping::MappingConfiguration::MappingConfiguration ( const MappingConfiguration & other)

copy CTOR

Parameters
otherthe object to copy

◆ MappingConfiguration() [3/4]

ddl::mapping::MappingConfiguration::MappingConfiguration ( MappingConfiguration && other)

move CTOR

Parameters
otherthe object to move

◆ MappingConfiguration() [4/4]

ddl::mapping::MappingConfiguration::MappingConfiguration ( const std::shared_ptr< datamodel::MappingConfiguration > & datamodel)

Construct a new MappingConfiguration and set the datamodel to the given one.

Parameters
datamodelthe datamodel to validate and observe.

Member Function Documentation

◆ getFunctions() [1/2]

Functions & ddl::mapping::MappingConfiguration::getFunctions ( )

Get the Functions.

Returns
Functions&

◆ getFunctions() [2/2]

const Functions & ddl::mapping::MappingConfiguration::getFunctions ( ) const

Get the Modules.

Returns
const Modules&

◆ getHeader() [1/2]

std::shared_ptr< Header > ddl::mapping::MappingConfiguration::getHeader ( )

Get the Header.

Returns
std::shared_ptr<Header>

◆ getHeader() [2/2]

std::shared_ptr< const Header > ddl::mapping::MappingConfiguration::getHeader ( ) const

Get the Header.

Returns
std::shared_ptr<const Header>

◆ getModel()

std::shared_ptr< const datamodel::MappingConfiguration > ddl::mapping::MappingConfiguration::getModel ( ) const

Gets the datamodel reference.

Returns
std::shared_ptr<const datamodel::MappingConfiguration> the datamodel reference

◆ getRequiredVersion()

Version ddl::mapping::MappingConfiguration::getRequiredVersion ( ) const

Get the Required Version for the model.

If there are items used that requires a higher version than mapping 2.0 getRequirements will contain more information about them

Returns
Version the Version that is at least required to write the model to a file or string

◆ getRequirements()

std::vector< Requirement > ddl::mapping::MappingConfiguration::getRequirements ( ) const

Get the Requirements that are at least 2.0 requirements.

Returns
std::vector<Requirement>

◆ getSources() [1/2]

Sources & ddl::mapping::MappingConfiguration::getSources ( )

Get the Sources.

Returns
Sources&

◆ getSources() [2/2]

const Sources & ddl::mapping::MappingConfiguration::getSources ( ) const

Get the Sources.

Returns
const Sources&

◆ getTargets() [1/2]

Targets & ddl::mapping::MappingConfiguration::getTargets ( )

Get the Targets.

Returns
Targets&

◆ getTargets() [2/2]

const Targets & ddl::mapping::MappingConfiguration::getTargets ( ) const

Get the Targets.

Returns
const Targets&

◆ getValidationProtocol()

std::vector< Problem > ddl::mapping::MappingConfiguration::getValidationProtocol ( ) const

Gets a collection of all problems obtained while validating the MappingConfiguration.

Returns
std::vector<Problem> the collection of problems
Remarks
to print or flatten the protocol consider ddl::mapping::transformValidationProblemList.

◆ getVersion()

Version ddl::mapping::MappingConfiguration::getVersion ( ) const

Get the version.

Returns
Version

◆ isValid()

bool ddl::mapping::MappingConfiguration::isValid ( ValidationLevel level = ValidationLevel::valid) const

Obtains if the validation level has reached at least the given level.

Parameters
levelthe level to check
Returns
true the level is at least level
false the level is below level

◆ operator!=()

bool ddl::mapping::MappingConfiguration::operator!= ( const MappingConfiguration & other) const

inequality operator

Remarks
this will NOT compare the headers, except of used mapping version
Parameters
otherthe object to compare to
Returns
true is not equal
false is equal

◆ operator=() [1/2]

MappingConfiguration & ddl::mapping::MappingConfiguration::operator= ( const MappingConfiguration & other)

copy assignment operator

Parameters
otherthe object to copy
Returns
MappingConfiguration&

◆ operator=() [2/2]

MappingConfiguration & ddl::mapping::MappingConfiguration::operator= ( MappingConfiguration && other)

move assignment operator

Parameters
otherthe object to move
Returns
MappingConfiguration&

◆ operator==()

bool ddl::mapping::MappingConfiguration::operator== ( const MappingConfiguration & other) const

equality operator

Remarks
this will NOT compare the headers, except of used mapping version
Parameters
otherthe object to compare to
Returns
true is equal
false is not equal

◆ setHeader()

void ddl::mapping::MappingConfiguration::setHeader ( const Header & header)

Set the Header.

Parameters
headerthe header to set

◆ setModel()

void ddl::mapping::MappingConfiguration::setModel ( const std::shared_ptr< datamodel::MappingConfiguration > & datamodel)

Sets and references the datamodel object, that is to validate and observe.

Parameters
datamodelthe datamodel to validate and observe.

◆ setVersion()

void ddl::mapping::MappingConfiguration::setVersion ( const Version & version)

Set the version.

Parameters
versionthe mapping version to set

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