ADTF  3.18.2
map_header.h
Go to the documentation of this file.
1 
14 #ifndef HEADER_MAP_HEADER_H
15 #define HEADER_MAP_HEADER_H
16 
17 #include <a_util/result.h>
18 #include <a_util/xml.h>
19 
20 #include <string>
21 #include <vector>
22 
23 namespace ddl {
24 namespace mapping {
25 
26 typedef std::vector<std::string> MapErrorList;
27 
31 class MapHeader {
32 public:
37 
42  const std::string& getDescription() const;
43 
48  const std::string& getDllPaths() const;
49 
54  const std::string& getLanguageVersion() const;
55 
60  const std::string& getAuthor() const;
61 
66  const std::string& getCreationDate() const;
67 
72  const std::string& getModificationDate() const;
73 
74 private:
78  void reset();
79 
88 
96 
102  a_util::result::Result setDescription(const std::string& description);
103 
109  a_util::result::Result setDdlPaths(const std::string& ddl_paths);
110 
119  a_util::result::Result parseVersion(const std::string& version, MapErrorList& lstErrors);
120 
121 private:
123  friend class MapConfiguration;
124  std::string _lang_version;
125  std::string _author;
126  std::string _desc;
127  std::string _ddl;
128  std::string _creation_date;
129  std::string _mod_date;
131 };
132 
133 } // namespace mapping
134 } // namespace ddl
135 
136 #endif // HEADER_MAP_HEADER_H
A common result class usable as return value throughout.
MapConfiguration is the central class of the mapping::dd namespace.
MapHeader contains all information from the header-Tag of a mapping configuration.
Definition: map_header.h:31
const std::string & getModificationDate() const
Returns the date from the date_change-header tag or an empty string.
const std::string & getDescription() const
Returns the description from the header tag or an empty string.
const std::string & getAuthor() const
Returns the author from the author-header tag or an empty string.
const std::string & getLanguageVersion() const
Returns the version from the language_version-header tag or an empty string.
a_util::result::Result setDdlPaths(const std::string &ddl_paths)
Set ddl paths.
a_util::result::Result loadFromDOM(const a_util::xml::DOMElement &header, MapErrorList &errors)
Initializes the header from a header-dom element.
a_util::result::Result parseVersion(const std::string &version, MapErrorList &lstErrors)
Parses the language version string.
a_util::result::Result setDescription(const std::string &description)
Set description.
const std::string & getDllPaths() const
Returns the list of dll paths from the "ddl" header tag or an empty string.
a_util::result::Result writeToDOM(a_util::xml::DOMElement dom_element)
Export header to a XML dom element.
void reset()
Resets the instance to its initial state.
const std::string & getCreationDate() const
Returns the date from the date_creation-header tag or an empty string.
std::vector< std::string > MapErrorList
container type for mapping errors
Common include for component a_util::result.
Common include for component a_util::xml.