OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
NameMatrix.hpp
Go to the documentation of this file.
1#ifndef __OPENTREP_NAMEMATRIX_HPP
2#define __OPENTREP_NAMEMATRIX_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <iosfwd>
9#include <string>
10#include <list>
11#include <map>
12// OpenTrep
14#include <opentrep/Names.hpp>
15
16namespace OPENTREP {
17
22 struct NameMatrix : public OPENTREP_Abstract {
23 public:
24 // //// Constructors / Destructors ///////
28 NameMatrix();
32 NameMatrix (const NameMatrix&);
37
38
39 public:
40 // /////////// Getters ///////////////
44 const NameMatrix_T& getNameMatrix() const {
45 return _nameMatrix;
46 }
47
57 bool getNameList (const LanguageCode_T&, NameList_T&) const;
58
59
60 public:
61 // /////////// Setters ///////////////
68 void addName (const LanguageCode_T&, const std::string& iName);
69
73 void reset();
74
75
76 public:
77 // /////////// Display support methods /////////
83 void toStream (std::ostream&) const;
84
90 void fromStream (std::istream&);
91
95 std::string toString() const;
96
102 std::string describeKey() const;
103
109 std::string describe() const;
110
111
112 private:
113 // //////////// Attributes //////////////
117 NameMatrix_T _nameMatrix;
118 };
119
120}
121#endif // __OPENTREP_BOM_NAMEMATRIX_HPP
std::map< LanguageCode_T, Names > NameMatrix_T
Definition Names.hpp:149
std::list< std::string > NameList_T
Definition Names.hpp:20
void toStream(std::ostream &) const
void fromStream(std::istream &)
std::string describeKey() const
std::string describe() const
std::string toString() const
const NameMatrix_T & getNameMatrix() const
bool getNameList(const LanguageCode_T &, NameList_T &) const
void addName(const LanguageCode_T &, const std::string &iName)