OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QuerySlices.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_BOM_QUERYSLICES_HPP
2 #define __OPENTREP_BOM_QUERYSLICES_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 #include <list>
10 // Xapian
11 #include <xapian.h>
12 // OpenTrep
16 
17 namespace OPENTREP {
18 
44  struct QuerySlices : public StructAbstract {
45  public:
50  return _slices;
51  }
52 
59  void push_back (const StringPartition& iStringPartition);
60 
64  size_t size() const;
65 
69  bool empty() const;
70 
74  void clear();
75 
76 
77  private:
84  void init();
85 
86 
87  public:
88  // /////////// Display support methods /////////
94  void toStream (std::ostream& ioOut) const;
95 
101  void fromStream (std::istream& ioIn);
102 
107  std::string describeKey() const;
108 
112  std::string describe() const;
113 
114 
115  public:
116  // //////////////// Constructors and Destructors /////////////
123  QuerySlices (const Xapian::Database&, const TravelQuery_T&);
124 
128  ~QuerySlices();
129 
130 
131  public:
132  // //////////////// Attributes ///////////////
136  const Xapian::Database& _database;
137 
142 
147 
151  std::string _itLeftWords;
152  };
153 
154 }
155 #endif // __OPENTREP_BOM_QUERYSLICES_HPP
TravelQuery_T _queryString
std::string _itLeftWords
void push_back(const StringPartition &iStringPartition)
Definition: QuerySlices.cpp:30
size_t size() const
Definition: QuerySlices.cpp:37
std::string describeKey() const
Definition: QuerySlices.cpp:52
std::list< StringPartition > StringPartitionList_T
Base class for the light structures.
bool empty() const
Definition: QuerySlices.cpp:42
std::string describe() const
Definition: QuerySlices.cpp:59
StringPartitionList_T _slices
const Xapian::Database & _database
QuerySlices(const Xapian::Database &, const TravelQuery_T &)
Definition: QuerySlices.cpp:19
std::string TravelQuery_T
void fromStream(std::istream &ioIn)
Definition: QuerySlices.cpp:93
const StringPartitionList_T & getStringPartitionList() const
Definition: QuerySlices.hpp:49
void toStream(std::ostream &ioOut) const
Definition: QuerySlices.cpp:88