ace::MultiRulesFilter Class Reference

Class declares interface of multirules filter. More...

#include <filter.h>

Inherits ace::Filter.

List of all members.

Public Types

typedef std::vector< multirule_trules_t
 The rules are stored within container.

Public Member Functions

void add_rule (multirule_t &rule)
 Adds given rule to filter.
const rules_tget_rules (void) const
bool match (const multirule_t &value, bool include_in_stats=true)
 Essencial filter method - checks, if given value matches the filter.
virtual bool is_on (void) const
bool read_rules (const char *rules_filename, size_t only_of_size=0)
 Reads rules from given file.

Private Attributes

rules_t _rules
 Rules container.


Detailed Description

Class declares interface of multirules filter.

Multirule is rule which may contain any number of parts (strings).


Member Typedef Documentation

The rules are stored within container.


Member Function Documentation

void ace::MultiRulesFilter::add_rule ( multirule_t rule  ) 

Adds given rule to filter.

Parameters:
rule Rule to add.

const rules_t& ace::MultiRulesFilter::get_rules ( void   )  const [inline]

Returns:
Reference to const instance of rules container.

bool ace::MultiRulesFilter::match ( const multirule_t value,
bool  include_in_stats = true 
)

Essencial filter method - checks, if given value matches the filter.

Parameters:
value Value to check.
include_in_stats Include this one in statistics?
Returns:
True, if given value pass the filter.

virtual bool ace::MultiRulesFilter::is_on ( void   )  const [inline, virtual]

Returns:
True, if there are any rules to match.

Implements ace::Filter.

bool ace::MultiRulesFilter::read_rules ( const char *  rules_filename,
size_t  only_of_size = 0 
)

Reads rules from given file.

Parameters:
rules_filename Pointer to C-string with filename.
only_of_size Store only rules of given size (0 stands for all sizes).
Returns:
True, if file was processed (it doesn't mean there are any rules to check!).


Member Data Documentation

Rules container.


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

Generated on Wed Aug 6 23:25:50 2008 for PACE by  doxygen 1.5.6