Dev Essential
Loading...
Searching...
No Matches
datamodel_configuration.h
Go to the documentation of this file.
1
20
21#ifndef MAPPING_CONFIGURATION_DATAMODEL_HEADER
22#define MAPPING_CONFIGURATION_DATAMODEL_HEADER
23
25
26namespace ddl {
27namespace mapping {
28namespace datamodel {
29
33class MappingConfiguration : public ModelSubject<Header>,
34 private ModelObserver<Header>,
35 public ModelSubject<Source>,
36 public ModelSubject<Target>,
37 public ModelSubject<Function>,
38 public InfoMap {
39public:
63
76
84 bool operator==(const MappingConfiguration& other) const;
92 bool operator!=(const MappingConfiguration& other) const;
93
99 std::shared_ptr<const Header> getHeader() const;
105 std::shared_ptr<Header> getHeader();
111 void setHeader(const Header& header);
112
122 void setVersion(const Version& version);
123
129 friend Sources;
131
136 const Sources& getSources() const;
142
148 friend Targets;
150
154 const Targets& getTargets() const;
160
166 friend Functions;
168
172 const Functions& getFunctions() const;
178
179private:
180 void modelChanged(ModelEventCode event_code,
181 Header& header,
182 const std::string& additional_info);
183 bool validateContains(const Sources::access_type& source) const;
184 void notifyChangedMapContent(ddl::utility::TypeAccessMapEventCode code,
185 Sources::access_type& source,
186 const std::string& additional_info);
187
188 bool validateContains(const Targets::access_type& target) const;
189 void notifyChangedMapContent(ddl::utility::TypeAccessMapEventCode code,
190 Targets::access_type& target,
191 const std::string& additional_info);
192
193 bool validateContains(const Functions::access_type& module_instance) const;
194 void notifyChangedMapContent(ddl::utility::TypeAccessMapEventCode code,
195 Functions::access_type& module_instance,
196 const std::string& additional_info);
197
198 class MappingConfigurationImpl;
199 std::unique_ptr<MappingConfigurationImpl> _impl;
200};
201} // namespace datamodel
202} // namespace mapping
203} // namespace ddl
204
205#endif // MAPPING_CONFIGURATION_DATAMODEL_HEADER
Utility class for observable named items where the order is NOT important.
Definition access_map.h:79
DDL_TYPE_TO_ACCESS access_type
local definition of the access type
Definition access_map.h:82
Mapping Version.
Definition mapping_version.h:32
Datamodel header class This class is observable.
Definition datamodel_configuration_items.h:41
void setVersion(const Version &version)
Set the Version.
Functions & getFunctions()
Get the Functions.
std::shared_ptr< Header > getHeader()
Get the Header object.
bool operator==(const MappingConfiguration &other) const
equality operator
MappingConfiguration(MappingConfiguration &&other)
move CTOR
std::shared_ptr< const Header > getHeader() const
Get the Header object.
const Functions & getFunctions() const
Get the Functions.
bool operator!=(const MappingConfiguration &other) const
inequality operator
Version getVersion() const
Get the Version.
ddl::utility::TypeAccessMap< Target, MappingConfiguration > Targets
Targets type.
Definition datamodel_configuration.h:146
MappingConfiguration(const MappingConfiguration &other)
copy CTOR
MappingConfiguration & operator=(const MappingConfiguration &other)
copy assignment operator
Sources & getSources()
Get the Sources.
MappingConfiguration(const Version &version)
CTOR.
Targets & getTargets()
Get the Targets.
const Targets & getTargets() const
Get the Targets.
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
void setHeader(const Header &header)
Set the Header object.
const Sources & getSources() const
Get the Sources.
MappingConfiguration & operator=(MappingConfiguration &&other)
move assignment operator
ddl::utility::ModelSubjectUtility< SubjectType, ModelEventCode > ModelSubject
Subject template class for observable objects.
Definition datamodel_base.h:190
ddl::utility::ModelObserverUtility< SubjectType, ModelEventCode > ModelObserver
Observer template class that observe the SubjectType.
Definition datamodel_base.h:198
ModelEventCode
Model event code for the data model observer.
Definition datamodel_base.h:37
TypeAccessMapEventCode
Internal event code to inform the parent DD Object about the change of an item within the list.
Definition access_map.h:37
definition of the mapping namespace
Definition ddl.h:50
definition of the ddl namespace
Definition codec.h:21