Dev Essential
Loading...
Searching...
No Matches
mapping_configuration.h
Go to the documentation of this file.
1
20
21#ifndef _MAPPING_CONFIGURATION_HEADER
22#define _MAPPING_CONFIGURATION_HEADER
23
27
28namespace ddl {
29namespace mapping {
30
35public:
59 MappingConfiguration(const std::shared_ptr<datamodel::MappingConfiguration>& datamodel);
64
77
85 bool operator==(const MappingConfiguration& other) const;
93 bool operator!=(const MappingConfiguration& other) const;
94
100 void setModel(const std::shared_ptr<datamodel::MappingConfiguration>& datamodel);
106 std::shared_ptr<const datamodel::MappingConfiguration> getModel() const;
107
116 std::shared_ptr<const Header> getHeader() const;
121 std::shared_ptr<Header> getHeader();
126 void setHeader(const Header& header);
127
137 void setVersion(const Version& version);
138
147 const Sources& getSources() const;
153
162 const Targets& getTargets() const;
168
177 const Functions& getFunctions() const;
183
192
200 std::vector<Problem> getValidationProtocol() const;
201
213 std::vector<Requirement> getRequirements() const;
214
215private:
216 // for internal use
217 class MappingConfigurationImpl;
218 std::unique_ptr<MappingConfigurationImpl> _impl;
219};
220
238std::vector<std::string> transformValidationProblemList(const std::vector<Problem>& problems);
239
240} // namespace mapping
241} // namespace ddl
242#endif // _MAPPING_CONFIGURATION_HEADER
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::MappingConfiguration > getModel() const
Gets the datamodel reference.
datamodel::MappingConfiguration::Functions Functions
Modules type.
Definition mapping_configuration.h:172
bool operator!=(const MappingConfiguration &other) const
inequality operator
MappingConfiguration(const MappingConfiguration &other)
copy CTOR
const Targets & getTargets() const
Get the Targets.
Sources & getSources()
Get the Sources.
void setHeader(const Header &header)
Set the Header.
MappingConfiguration(const Version &version)
CTOR.
MappingConfiguration(const std::shared_ptr< datamodel::MappingConfiguration > &datamodel)
Construct a new MappingConfiguration and set the datamodel to the given one.
std::shared_ptr< Header > getHeader()
Get the Header.
std::vector< Requirement > getRequirements() const
Get the Requirements that are at least 2.0 requirements.
bool operator==(const MappingConfiguration &other) const
equality operator
datamodel::MappingConfiguration::Sources Sources
Sources type.
Definition mapping_configuration.h:142
void setVersion(const Version &version)
Set the version.
std::vector< Problem > getValidationProtocol() const
Gets a collection of all problems obtained while validating the MappingConfiguration.
Version getVersion() const
Get the version.
Functions & getFunctions()
Get the Functions.
std::shared_ptr< const Header > getHeader() const
Get the Header.
Version getRequiredVersion() const
Get the Required Version for the model.
MappingConfiguration & operator=(const MappingConfiguration &other)
copy assignment operator
const Sources & getSources() const
Get the Sources.
bool isValid(ValidationLevel level=ValidationLevel::valid) const
Obtains if the validation level has reached at least the given level.
Targets & getTargets()
Get the Targets.
MappingConfiguration & operator=(MappingConfiguration &&other)
move assignment operator
datamodel::Header Header
header type
Definition mapping_configuration.h:111
MappingConfiguration(MappingConfiguration &&other)
move CTOR
const Functions & getFunctions() const
Get the Modules.
datamodel::MappingConfiguration::Targets Targets
Targets type.
Definition mapping_configuration.h:157
Mapping Version.
Definition mapping_version.h:32
Datamodel header class This class is observable.
Definition datamodel_configuration_items.h:41
ddl::utility::TypeAccessMap< Target, MappingConfiguration > Targets
Targets type.
Definition datamodel_configuration.h:146
ddl::utility::TypeAccessMap< Function, MappingConfiguration > Functions
Modeuls type.
Definition datamodel_configuration.h:164
ddl::utility::TypeAccessMap< Source, MappingConfiguration > Sources
Sources types.
Definition datamodel_configuration.h:127
definition of the mapping namespace
Definition ddl.h:50
std::vector< std::string > transformValidationProblemList(const std::vector< Problem > &problems)
transforms the validation protocol of problems to a simple vector of strings. Simple usage:
ValidationLevel
MappingConfiguration validation level.
Definition mapping_configuration_types.h:40
@ valid
every thing is well defined.
Definition mapping_configuration_types.h:56
definition of the ddl namespace
Definition codec.h:21