20 #ifndef GAIA_PARSER_FILTER_H 21 #define GAIA_PARSER_FILTER_H 24 #include "parsertypes.h" 33 # ifdef INCLUDED_FROM_LEMON 35 static void yy_reduce(
yyParser*,
int);
50 return (b && (b->value() ==
true));
59 return (b && (b->value() ==
false));
78 QList<parser::ValueVariable*> _valueVarList;
79 QList<parser::LabelVariable*> _labelVarList;
80 QList<parser::LabelPointID*> _pointVarList;
89 mutable const Point* _currentPoint;
95 friend void parser::yy_reduce(parser::yyParser*,
int);
97 template <
typename SearchPo
intType,
typename DataSetType>
101 void clearVariables();
119 static Filter* parse(
const QString& str);
127 void updateVariables();
134 bool needsBinding()
const;
137 void bindToPointAttributes();
144 bool isTrue(
const Point* p)
const;
153 static int opFromString(
const QString& str);
155 static int opFromString(
const std::string& str) {
156 return opFromString(QString::fromUtf8(str.c_str(), str.size()));
159 QString toString()
const;
178 static Filter* parse(
const QString& str);
184 static QMutex _parserMutex;
186 mutable void* _lemonParser;
190 Filter* parseFilter(
const QString& str)
const;
198 #endif // GAIA_PARSER_FILTER_H Definition: parsertypes.h:59
Definition: parsertypes.h:40
The QueryOptimizer class tries to optimize a query by reducing the SearchSpace on which it is suppose...
Definition: parsertypes.h:30
The FilterParser class is used to parse filter queries given as strings and create the corresponding ...
Definition: filter.h:170
Definition: grammar.c:269
This class describes the layout of a point.
Definition: pointlayout.h:60
The Filter class allows to check whether a predicate is true for a given Point.
Definition: filter.h:73
Main Gaia namespace, which contains all the library functions.
Definition: addfield.cpp:22
bool isAlwaysFalse(parser::Predicate *pred)
Returns true if the given predicate is always false (ie: it is a boolean constant which value is Fals...
Definition: filter.h:57
bool isAlwaysTrue(parser::Predicate *pred)
Returns true if the given predicate is always true (ie: it is a boolean constant which value is True)...
Definition: filter.h:48
Definition: parsertypes.h:50
Definition: parsertypes.h:281