ifw-core  5.0.0-pre2
header.hpp
Go to the documentation of this file.
1 
6 #ifndef IFW_DIT_DID_HEADER_HPP_
7 #define IFW_DIT_DID_HEADER_HPP_
8 
9 #include <string>
10 
11 #include <core/dit/did/defines.hpp>
12 
13 namespace core::dit::did {
14 
16 class Header {
17 public:
18  Header();
19 
20  ~Header();
21 
23  void Clear();
24 
30  void Parse(const elt::configng::CiiConfigDocument& did);
31 
33  std::string GetName() const;
34 
36  std::string GetScope() const;
37 
39  std::string GetDescription() const;
40 
46  std::string ToString(const HdrField fields = HdrField::ALL,
47  const bool compact = false) const;
48 
49 private:
50  std::string m_name;
51  std::string m_scope;
52  std::string m_description;
53 };
54 
55 } // namespace core::dit::did
56 
57 #endif // !IFW_DIT_DID_HEADER_HPP_
Data Interface Dictionary header class.
Definition: header.hpp:16
Header()
Definition: header.cpp:12
~Header()
Definition: header.cpp:16
std::string ToString(const HdrField fields=HdrField::ALL, const bool compact=false) const
Get string copy of one or more header fields.
Definition: header.cpp:57
std::string GetScope() const
Return scope.
Definition: header.cpp:47
std::string GetName() const
Return (file)name, from where the dictionary was loaded.
Definition: header.cpp:42
std::string GetDescription() const
Return Description.
Definition: header.cpp:52
void Parse(const elt::configng::CiiConfigDocument &did)
Parse Parse/extract the fields of the DID header, contained in the string buffer.
Definition: header.cpp:27
void Clear()
Reset the object.
Definition: header.cpp:20
Definition: defines.cpp:11
@ ALL
Definition: did.hpp:25
HdrField
Dictionary header field types.
Definition: defines.hpp:32