Lumiera  0.pre.03
»edit your freedom«
query-text.cpp
Go to the documentation of this file.
1 /*
2  QueryText - syntactical standard representation for queries
3 
4  Copyright (C) Lumiera.org
5  2012, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
29 #include "lib/query-text.hpp"
30 
31 #include <boost/functional/hash.hpp>
32 #include <string>
33 
34 using std::string;
35 
36 
37 namespace lib {
38 
39 
45  string
46  QueryText::normalise (string const& rawDefinition)
47  {
48  return rawDefinition;
49  }
50 
51 
60  HashVal
62  {
63  return boost::hash_value (entry.definition_);
64  }
65 
66 
67 } // namespace lib
AnyPair entry(Query< TY > const &query, typename WrapReturn< TY >::Wrapper &obj)
helper to simplify creating mock table entries, wrapped correctly
string normalise(string const &rawDefinition)
Parse, verify and normalise the raw query definition.
Definition: query-text.cpp:46
A generic syntactical representation for all kinds of queries.
friend HashVal hash_value(QueryText const &entry)
support using queries in hashtables.
Definition: query-text.cpp:61
Implementation namespace for support and library code.
HashVal hash_value(QueryText const &entry)
support using queries in hashtables.
Definition: query-text.cpp:61
size_t HashVal
a STL compatible hash value
Definition: hash-value.h:56
Syntactical query representation.
Definition: query-text.hpp:70