ADTF
Loading...
Searching...
No Matches
map_source.h
Go to the documentation of this file.
1
13
14#ifndef HEADER_MAP_SOURCE_H
15#define HEADER_MAP_SOURCE_H
16
17#include <a_util/result.h>
18#include <a_util/xml.h>
19
20#include <set>
21#include <vector>
22
23namespace ddl {
24namespace mapping {
25
27
31class MapSource {
32public:
43 MapSource(MapConfiguration* config, std::string name, std::string type);
44
48 const std::string& getName() const;
49
57 a_util::result::Result setName(const std::string& new_name);
58
62 const std::string& getType() const;
63
72 a_util::result::Result setType(const std::string& type_name);
73
77 bool isValid() const;
78
79private:
86 a_util::result::Result loadFromDOM(const a_util::xml::DOMElement& source);
87
94 a_util::result::Result writeToDOM(a_util::xml::DOMElement& dom_element) const;
95
96private:
98 friend class MapConfiguration;
99 friend class MapTarget;
100 MapConfiguration* _config;
101 std::string _name;
102 std::string _type_name;
103 bool _is_valid;
105};
106
115inline bool operator==(const MapSource& a, const MapSource& b)
116{
117 return a.getName() == b.getName() && a.getType() == b.getType();
118}
119
128inline bool operator!=(const MapSource& a, const MapSource& b)
129{
130 return !(a == b);
131}
132
134typedef std::vector<MapSource> MapSourceList;
139typedef std::set<std::string> MapSourceNameList;
140
141} // namespace mapping
142} // namespace ddl
143
144#endif // HEADER_MAP_SOURCE_H
Definition result_type_decl.h:34
Representation for an element in the DOM.
Definition dom.h:47
Definition map_configuration.h:36
Definition map_source.h:31
const std::string & getType() const
MapSource(MapConfiguration *config, std::string name, std::string type)
MapSource(MapConfiguration *config)
const std::string & getName() const
a_util::result::Result setName(const std::string &new_name)
a_util::result::Result setType(const std::string &type_name)
Definition map_target.h:31
definition of the mapping namespace
Definition ddl.h:50
std::set< std::string > MapSourceNameList
defintion of MapSource name list
Definition map_source.h:139
bool operator==(const MapAssignment &a, const MapAssignment &b)
compares the Assignments
Definition map_assignment.h:184
std::vector< MapSource > MapSourceList
Public composite types used in the mapping::dd namespace.
Definition map_source.h:134
bool operator!=(const MapAssignment &a, const MapAssignment &b)
compares the Assignments
Definition map_assignment.h:199
definition of the ddl namespace
Definition codec.h:21