OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
StringPartition.hpp
Go to the documentation of this file.
1#ifndef __OPENTREP_BOM_STRINGPARTITION_HPP
2#define __OPENTREP_BOM_STRINGPARTITION_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <string>
9#include <list>
10// OpenTrep
14
15namespace OPENTREP {
16
36 // //////////////// Type definitions //////////////////
40 typedef std::list<StringSet> StringPartition_T;
41
42 public:
49 void push_back (const StringSet& iStringSet);
50
54 size_t size() const;
55
59 bool empty() const;
60
64 void clear();
65
70 const std::string& getInitialString() const {
71 return _initialString;
72 }
73
91
92
93 private:
102 void init (const std::string& iStringToBePartitioned);
103
104
105 public:
106 // /////////// Display support methods /////////
112 void toStream (std::ostream& ioOut) const;
113
119 void fromStream (std::istream& ioIn);
120
125 std::string describeKey() const;
126
130 std::string describe() const;
131
132
133 public:
134 // //////////////// Constructors and Destructors /////////////
140 StringPartition (const std::string& iStringToBePartitioned);
141
146
147
148 public:
149 // //////////////// Attributes ///////////////
153 std::string _initialString;
154
159 };
160
161
162 // //////////////// Type definitions //////////////////
166 typedef std::list<StringPartition> StringPartitionList_T;
167
168}
169#endif // __OPENTREP_BOM_STRINGPARTITION_HPP
std::list< StringPartition > StringPartitionList_T
std::string describe() const
void toStream(std::ostream &ioOut) const
void push_back(const StringSet &iStringSet)
StringSet calculateUniqueCombinations() const
std::list< StringSet > StringPartition_T
void fromStream(std::istream &ioIn)
StringPartition(const std::string &iStringToBePartitioned)
std::string describeKey() const
const std::string & getInitialString() const
Class holding a set of strings, e.g., {"rio", "de", "janeiro"}.
Definition StringSet.hpp:19