Siena C++ API Documentation
Author: Antonio Carzaniga

Siena C++ API documentation (v. 0.4.3)

- Main Page
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

# Filter Class Reference

`#include <Siena.h>`

List of all members.

## 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 ()

## Detailed Description

expression filtering notifications

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.

See also:
  AttributeConstraint

Examples:

  subscriber.cc.

## Constructor & Destructor Documentation

Filter::Filter | ( |  | ) |

default constructor

creates an empty filter (always false)

Filter::Filter | ( | const Filter & |  | ) |

copy constructor

## Member Function Documentation

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

Examples:
  subscriber.cc.

iterator Filter::add_constraint | ( | const string & | ,
|  | const AttributeConstraint & |  |
| ) |  |  |

adds a constraint to this filter

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

- Siena.h

Copyright © 2001 University of Colorado.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This documentation is authored and maintained by Antonio Carzaniga