OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StringSet.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_BOM_STRINGSET_HPP
2 #define __OPENTREP_BOM_STRINGSET_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 #include <list>
10 // OpenTrep
13 
14 namespace OPENTREP {
15 
19  struct StringSet : public StructAbstract {
20  public:
21  // //////////////// Type definitions //////////////////
25  typedef std::list<std::string> StringSet_T;
26 
27  public:
34  void push_back (const std::string&);
35 
39  void push_back (const StringSet&);
40 
44  size_t size() const;
45 
49  bool empty() const;
50 
54  void clear();
55 
59  std::string getFirstString() const;
60 
61 
62  public:
63  // /////////// Display support methods /////////
69  void toStream (std::ostream&) const;
70 
76  void fromStream (std::istream&);
77 
82  std::string describeKey() const;
83 
87  std::string describe() const;
88 
89 
90  public:
91  // //////////////// Constructors and Destructors /////////////
95  StringSet();
96 
100  StringSet (const StringSet&);
101 
105  StringSet (const std::string&);
106 
110  ~StringSet();
111 
112 
113  public:
114  // //////////////// Attributes ///////////////
119  };
120 
121 }
122 #endif // __OPENTREP_BOM_STRINGSET_HPP
StringSet_T _set
Definition: StringSet.hpp:118
void toStream(std::ostream &) const
Definition: StringSet.cpp:117
bool empty() const
Definition: StringSet.cpp:39
Base class for the light structures.
std::string describe() const
Definition: StringSet.cpp:88
size_t size() const
Definition: StringSet.cpp:34
std::string getFirstString() const
Definition: StringSet.cpp:64
std::string describeKey() const
Definition: StringSet.cpp:81
void fromStream(std::istream &)
Definition: StringSet.cpp:122
Class holding a set of strings, e.g., {"rio", "de", "janeiro"}.
Definition: StringSet.hpp:19
void push_back(const std::string &)
Definition: StringSet.cpp:49
std::list< std::string > StringSet_T
Definition: StringSet.hpp:25