ADTF
Loading...
Searching...
No Matches
datamodel_header.h
Go to the documentation of this file.
1
14
15#ifndef DD_DATA_MODEL_HEADER_H_INCLUDED
16#define DD_DATA_MODEL_HEADER_H_INCLUDED
17
23
24#include <string>
25#include <unordered_map>
26#include <vector>
27
28namespace ddl {
29
30namespace dd {
31
32namespace datamodel {
37class Header : public ModelSubject<Header>, public InfoMap {
38public:
42 Header() = delete;
48 Header(const Header& other);
54 Header& operator=(const Header& other);
58 Header(Header&&) = default;
62 Header& operator=(Header&&) = default;
66 virtual ~Header() = default;
67
78 friend ExtDeclarations;
80
92 Header(Version ddl_version,
93 std::string author = {},
94 std::string date_creation = {},
95 std::string date_change = {},
96 std::string description = {},
97 const std::vector<ExtDeclaration>& ext_declarations = {});
98
106 bool operator==(const Header& other) const;
114 bool operator!=(const Header& other) const;
115
128 void setLanguageVersion(const Version& ddl_version);
129
135 const std::string& getAuthor() const;
142 void setAuthor(const std::string& author);
143
149 const std::string& getDateCreation() const;
156 void setDateCreation(const std::string& date_creation);
157
163 const std::string& getDateChange() const;
170 void setDateChange(const std::string& date_change);
171
177 const std::string& getDescription() const;
184 void setDescription(const std::string& description);
185
198
199private:
200 bool validateContains(const ExtDeclarations::access_type& ext_declarations_name) const;
201 void notifyChangedMapContent(utility::TypeAccessMapEventCode code,
202 ExtDeclarations::access_type& ext_declaration,
203 const std::string& additional_info);
204
205 Version _ddl_version = {};
206 std::string _author;
207 std::string _date_creation;
208 std::string _date_change;
209 std::string _description;
210 ExtDeclarations _ext_declarations;
211};
212
213} // namespace datamodel
214} // namespace dd
215} // namespace ddl
216
217#endif // DD_DATA_MODEL_HEADER_H_INCLUDED
DDL Version.
Definition dd_common_types.h:203
bool operator!=(const Header &other) const
Non-Equality operator.
Version getLanguageVersion() const
Get the Language Version.
const std::string & getAuthor() const
Get the Author.
virtual ~Header()=default
Destroys the Header.
ExtDeclarations & getExtDeclarations()
Get the Ext Declarations object.
void setDateChange(const std::string &date_change)
Set the Date of last Change.
const std::string & getDescription() const
Get the Description.
Header(Version ddl_version, std::string author={}, std::string date_creation={}, std::string date_change={}, std::string description={}, const std::vector< ExtDeclaration > &ext_declarations={})
Construct a new Header object.
Header(const Header &other)
copy CTOR.
void setDateCreation(const std::string &date_creation)
Set the Date of Creation.
utility::TypeAccessMap< ExtDeclaration, Header > ExtDeclarations
map container for a set of ext declarations.
Definition datamodel_header.h:76
const std::string & getDateChange() const
Get the Date of last Change.
bool operator==(const Header &other) const
Equality operator.
void setLanguageVersion(const Version &ddl_version)
Set the Language Version.
void setAuthor(const std::string &author)
Set the Author.
Header & operator=(const Header &other)
copy assignment.
Header()=delete
no default CTOR.
const ExtDeclarations & getExtDeclarations() const
Get the Ext Declarations object.
Header(Header &&)=default
move CTOR.
const std::string & getDateCreation() const
Get the Date of Creation.
Header & operator=(Header &&)=default
move assignment.
void setDescription(const std::string &description)
Set the Description object.
KeyValuePair ExtDeclaration
Use of the key value pair to declare the ext declaration.
Definition datamodel_header.h:72
observable KeyValuePair
Definition datamodel_keyvalue.h:33
Utility class for observable named items where the order is NOT important.
Definition access_map.h:79
ExtDeclaration access_type
Definition access_map.h:82
definition of the datamodel namespace
Definition datamodel_base.h:28
utility::ModelSubjectUtility< TYPE, ModelEventCode > ModelSubject
Subject template class that is observable.
Definition datamodel_base.h:187
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 dd namespace
Definition datamodel_base.h:26
definition of the ddl namespace
Definition codec.h:21