casa
$Rev:20696$
|
A sequence of TBFilterRules that can be used to filter rows. More...
#include <TBFilterRules.qo.h>
Public Member Functions | |
TBFilterRuleSequence () | |
Default Constructor. | |
~TBFilterRuleSequence () | |
unsigned int | size () |
Returns the number of rules in this sequence. | |
TBFilterRule * | at (unsigned int i) |
Returns the rule at index i in this sequence. | |
vector< TBFilterRule * > * | getRules () |
Returns the rules in this sequence. | |
int | rowPasses (TBTable *table, int row) |
Checks the given row in the given table. | |
void | addRule (TBFilterRule *rule) |
Adds the given rule to the end of the sequence. | |
void | removeRule (int i) |
Removes the rule at index i from this sequence. | |
Private Attributes | |
vector< TBFilterRule * > | rules |
Rule sequence. |
A sequence of TBFilterRules that can be used to filter rows.
A TBFilterRuleSequence is basically just a list of TBFilterRules. In the future, more complex sequences can be implemented such as logical clauses. In order for a row to pass a rule sequence, it must pass ALL rules in the sequence.
Definition at line 136 of file TBFilterRules.qo.h.
Default Constructor.
void casa::TBFilterRuleSequence::addRule | ( | TBFilterRule * | rule | ) |
Adds the given rule to the end of the sequence.
TBFilterRule* casa::TBFilterRuleSequence::at | ( | unsigned int | i | ) |
Returns the rule at index i in this sequence.
vector<TBFilterRule*>* casa::TBFilterRuleSequence::getRules | ( | ) |
Returns the rules in this sequence.
void casa::TBFilterRuleSequence::removeRule | ( | int | i | ) |
Removes the rule at index i from this sequence.
int casa::TBFilterRuleSequence::rowPasses | ( | TBTable * | table, |
int | row | ||
) |
Checks the given row in the given table.
If the row passes ALL of the rules in this sequence, the index of the first field that passed is returned. If the row fails at least one rule in the sequence, -1 is returned. See TBFilterRule::rowPasses().
unsigned int casa::TBFilterRuleSequence::size | ( | ) |
Returns the number of rules in this sequence.
vector<TBFilterRule*> casa::TBFilterRuleSequence::rules [private] |
Rule sequence.
Definition at line 168 of file TBFilterRules.qo.h.