OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
16 namespace OPENTREP {
17 
22  struct NameMatrix : public OPENTREP_Abstract {
23  public:
24  // //// Constructors / Destructors ///////
28  NameMatrix();
32  NameMatrix (const NameMatrix&);
36  ~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
bool getNameList(const LanguageCode_T &, NameList_T &) const
Definition: NameMatrix.cpp:67
void addName(const LanguageCode_T &, const std::string &iName)
Definition: NameMatrix.cpp:82
void toStream(std::ostream &) const
Definition: NameMatrix.cpp:51
const NameMatrix_T & getNameMatrix() const
Definition: NameMatrix.hpp:44
void fromStream(std::istream &)
Definition: NameMatrix.cpp:56
std::string describeKey() const
Definition: NameMatrix.cpp:27
std::list< std::string > NameList_T
Definition: Names.hpp:20
std::string toString() const
Definition: NameMatrix.cpp:60
std::map< LanguageCode_T, Names > NameMatrix_T
Definition: Names.hpp:149
std::string describe() const
Definition: NameMatrix.cpp:33