OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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
17namespace OPENTREP {
18
19 // Forward declarations
20 class OTransliterator;
21
47 struct QuerySlices : public StructAbstract {
48 public:
56 return _queryString;
57 }
58
63 return _slices;
64 }
65
72 void push_back (const StringPartition& iStringPartition);
73
77 size_t size() const;
78
82 bool empty() const;
83
87 void clear();
88
89
90 private:
99 void init (const OTransliterator&);
100
101
102 public:
103 // /////////// Display support methods /////////
109 void toStream (std::ostream& ioOut) const;
110
116 void fromStream (std::istream& ioIn);
117
122 std::string describeKey() const;
123
127 std::string describe() const;
128
129
130 public:
131 // //////////////// Constructors and Destructors /////////////
139 QuerySlices (const Xapian::Database&, const TravelQuery_T&,
140 const OTransliterator&);
141
145 ~QuerySlices();
146
147
148 public:
149 // //////////////// Attributes ///////////////
153 const Xapian::Database& _database;
154
159
164
168 std::string _itLeftWords;
169 };
170
171}
172#endif // __OPENTREP_BOM_QUERYSLICES_HPP
std::string TravelQuery_T
std::list< StringPartition > StringPartitionList_T
void push_back(const StringPartition &iStringPartition)
const TravelQuery_T & getQueryString() const
TravelQuery_T _queryString
const StringPartitionList_T & getStringPartitionList() const
void toStream(std::ostream &ioOut) const
QuerySlices(const Xapian::Database &, const TravelQuery_T &, const OTransliterator &)
const Xapian::Database & _database
StringPartitionList_T _slices
void fromStream(std::istream &ioIn)
std::string describe() const
std::string describeKey() const
size_t size() const