ADTF
MappingConfigurationfinal

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

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

Private Attributes

std::unique_ptr< MappingConfigurationImpl > _impl
 

Detailed Description

Mapping Configuration model with validation and requirements management.

Definition at line 34 of file mapping_configuration.h.

Constructor & Destructor Documentation

◆ MappingConfiguration() [1/4]

MappingConfiguration ( const Version version)

CTOR.

Parameters
versionthe mapping version to use

◆ MappingConfiguration() [2/4]

copy CTOR

Parameters
otherthe object to copy

◆ MappingConfiguration() [3/4]

move CTOR

Parameters
otherthe object to move

◆ MappingConfiguration() [4/4]

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& getFunctions ( )

Get the Functions.

Returns
Functions&

◆ getFunctions() [2/2]

const Functions& getFunctions ( ) const

Get the Modules.

Returns
const Modules&

◆ getHeader() [1/2]

std::shared_ptr<Header> getHeader ( )

Get the Header.

Returns
std::shared_ptr<Header>

◆ getHeader() [2/2]

std::shared_ptr<const Header> getHeader ( ) const

Get the Header.

Returns
std::shared_ptr<const Header>

◆ getModel()

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

Gets the datamodel reference.

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

◆ getRequiredVersion()

Version 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> getRequirements ( ) const

Get the Requirements that are at least 2.0 requirements.

Returns
std::vector<Requirement>

◆ getSources() [1/2]

Sources& getSources ( )

Get the Sources.

Returns
Sources&

◆ getSources() [2/2]

const Sources& getSources ( ) const

Get the Sources.

Returns
const Sources&

◆ getTargets() [1/2]

Targets& getTargets ( )

Get the Targets.

Returns
Targets&

◆ getTargets() [2/2]

const Targets& getTargets ( ) const

Get the Targets.

Returns
const Targets&

◆ getValidationProtocol()

std::vector<Problem> 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 getVersion ( ) const

Get the version.

Returns
Version

◆ isValid()

bool 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 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& operator= ( const MappingConfiguration other)

copy assignment operator

Parameters
otherthe object to copy
Returns
MappingConfiguration&

◆ operator=() [2/2]

MappingConfiguration& operator= ( MappingConfiguration &&  other)

move assignment operator

Parameters
otherthe object to move
Returns
MappingConfiguration&

◆ operator==()

bool 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 setHeader ( const Header header)

Set the Header.

Parameters
headerthe header to set

◆ setModel()

void 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 setVersion ( const Version version)

Set the version.

Parameters
versionthe mapping version to set