#include <filter.h>
Inheritance diagram for rfc822::filter::conditional::
Public Methods | |
conditional () | |
creates the rfilter object. More... | |
conditional (const string &condition, bool fAllSlots=false) | |
creates the rfilter object. More... | |
~conditional () | |
d'tor. More... | |
conditional & | set (const string &condition, bool fAllSlots=false) |
sets a condition. More... | |
operator bool () const | |
returns true if the conditional is ready to work. More... | |
void | onMsg (const rfc822::msg &msg) |
handles incoming messages. More... |
filter objects of this class are able to filter messages according a more or less complex condition.
Conditions are set as strings, and must be formed according the following syntax:
condition: <condition> <and> <condition> | <condition> <or> <condition> | ( <condition> ) | ! <condition> | ID <op> STRING ; and: "&&" | /AND/i ; or: "||" | /OR/i ; op: "==" | /IS/i | /EQUALS/i // equality | "!=" | /IS +NOT/i // inequality | "=~" | /MATCH(ES)?/i // regex match | "!~" | /(DOES +)?NOT +MATCH(ES)?/i // regex no match | "=#" | /CONTAIN(S)?/i // containment | "!#" | /(DOES +)?NOT +CONTAIN(S)?/i // uncontainment ; id: [A-Za-z][A-Za-z0-9_\-]*(\.[A-Za-z0-9_\-])* string: (\"|\/)([^$1]|(\\$1))*$1
|
creates the rfilter object.
|
|
creates the rfilter object.
|
|
d'tor.
|
|
handles incoming messages.
|
|
returns true if the conditional is ready to work.
|
|
sets a condition.
|