#include <Siena.h>
Public Member Functions | |
Filter () | |
Filter (const Filter &) | |
Filter & | operator= (const string &) |
bool | operator== (const Filter &) const |
iterator | add_constraint (const string &, SXOperator, const AttributeValue &) |
iterator | add_constraint (const string &, const AttributeConstraint &) |
Filter & | reduce () |
A Filter
represents a boolean expression to be evaluated against an Notification
. It consists of a set of constraints. Each constraint poses a condition on an attribute of the Notification
. A Filter
can pose multiple constraints on the same attribute.
A Filter
is implemented by means of a multimap<string, AttributeConstraint>
, therefore a Filter
can be manipulated using all the methods of a standard multimap
. Two additional utility methods are provided to add constraints.
Filter::Filter | ( | ) |
default constructor
creates an empty filter (always false)
Filter::Filter | ( | const Filter & | ) |
copy constructor
Filter& Filter::operator= | ( | const string & | ) |
fills in the constraints of this notification from a string representation of a filter
Filter f;
f = "{ dest = \"MXP\" price < 850 }";
bool Filter::operator== | ( | const Filter & | ) | const |
equality operator
iterator Filter::add_constraint | ( | const string & | , | |
SXOperator | , | |||
const AttributeValue & | ||||
) |
adds a constraint to this filter
iterator Filter::add_constraint | ( | const string & | , | |
const AttributeConstraint & | ||||
) |
adds a constraint to this filter