1 /*------------------------------------------------------------------------------
2 Name: Query.h
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 Comment: Holding a query std::string and a prepared query object.
6 ------------------------------------------------------------------------------*/
7
8 /**
9 * Little container which holds a <filter> query std::string.
10 * For better performance you can preparse the query std::string and
11 * store your query object here as well (see example in GnuRegexFilter).
12 * @see org.xmlBlaster.engine.mime.regex.GnuRegexFilter
13 */
14
15 #ifndef _UTIL_QOS_QUERY_H
16 #define _UTIL_QOS_QUERY_H
17
18 #include <util/xmlBlasterDef.h>
19 #include <string>
20
21
22
23 namespace org { namespace xmlBlaster { namespace util { namespace qos {
24
25 class Dll_Export Query
26 {
27 const std::string ME; // = "Query";
28 org::xmlBlaster::util::Global& global_;
29 std::string query_;
30 void* preparedQuery_; // = null;
31
32 public:
33 Query(org::xmlBlaster::util::Global& global, const std::string& query="");
34 Query(const Query& query);
35 Query& operator =(const Query& query);
36 std::string getQuery();
37 void setPreparedQuery(void* preparedQuery, size_t size);
38 void* getPreparedQuery();
39 std::string toString();
40 };
41
42 }}}} // namespace
43
44 #endif
syntax highlighted by Code2HTML, v. 0.9.1