Gaia
gaia2::filter::FilterWrapper Class Reference

The FilterWrapper class serves as an easy wrapper for a subset of all possible filters, but with a much more intuitive API that allows filters to be constructed programatically on the fly instead of being parsed from a string representation. More...

#include <filterwrapper.h>

Inheritance diagram for gaia2::filter::FilterWrapper:
gaia2::Filter

Public Member Functions

 FilterWrapper (const QString &varname, const QString &op, Real value)
 
 FilterWrapper (const QString &varname, const QString &op, const QList< Real > &values)
 
 FilterWrapper (const QString &varname, const QString &op, const QString &label)
 
 FilterWrapper (const QString &varname, const QString &op, const QList< QString > &labels)
 
 FilterWrapper (const std::string &varname, const std::string &op, Real value)
 
 FilterWrapper (const std::string &varname, const std::string &op, const std::vector< Real > &values)
 
 FilterWrapper (const std::string &varname, const std::string &op, const std::string &label)
 
 FilterWrapper (const std::string &varname, const std::string &op, const std::vector< std::string > &labels)
 
- Public Member Functions inherited from gaia2::Filter
 Filter (const Filter &filter)
 
void updateVariables ()
 Look in the predicate/value tree for all the variables it can find and put them inside their respective *VarList member variables. More...
 
bool needsBinding () const
 Returns whether this filter needs to be bound to a specific layout. More...
 
void bindToLayout (const PointLayout &layout)
 
void bindToPointAttributes ()
 
bool isTrue (const Point *p) const
 Returns whether the filter predicate is true for the given point.
 
bool isAlwaysTrue () const
 Returns whether the filter predicate is always true, regardless of the given point.
 
const parser::Predicatepred () const
 
QString toString () const
 

Additional Inherited Members

- Static Public Member Functions inherited from gaia2::Filter
static Filterparse (const QString &str)
 Parses a given string and returns the newly created Filter object.
 
static int opFromString (const QString &str)
 
static int opFromString (const std::string &str)
 
- Protected Member Functions inherited from gaia2::Filter
void clear ()
 
void clearVariables ()
 
void updateVariables (parser::Predicate *pred)
 
void updateVariables (parser::Value *value)
 
void updateVariables (parser::Label *label)
 
- Static Protected Member Functions inherited from gaia2::Filter
static FilterstealDataFrom (const Filter &other)
 
- Protected Attributes inherited from gaia2::Filter
parser::Predicate_pred
 
QList< parser::ValueVariable * > _valueVarList
 
QList< parser::LabelVariable * > _labelVarList
 
QList< parser::LabelPointID * > _pointVarList
 
QStringList _slist
 
QList< Real > _vlist
 
const Point_currentPoint
 

Detailed Description

The FilterWrapper class serves as an easy wrapper for a subset of all possible filters, but with a much more intuitive API that allows filters to be constructed programatically on the fly instead of being parsed from a string representation.


The documentation for this class was generated from the following files: