casa
5.7.0-16
|
A sequence of TBFilterRules that can be used to filter rows. More...
#include <TBFilterRules.qo.h>
Public Member Functions | |
TBFilterRuleSequence () | |
Default Constructor. More... | |
~TBFilterRuleSequence () | |
unsigned int | size () |
Returns the number of rules in this sequence. More... | |
TBFilterRule * | at (unsigned int i) |
Returns the rule at index i in this sequence. More... | |
std::vector< TBFilterRule * > * | getRules () |
Returns the rules in this sequence. More... | |
int | rowPasses (TBTable *table, int row) |
Checks the given row in the given table. More... | |
void | addRule (TBFilterRule *rule) |
Adds the given rule to the end of the sequence. More... | |
void | removeRule (int i) |
Removes the rule at index i from this sequence. More... | |
Private Attributes | |
std::vector< TBFilterRule * > | rules |
Rule sequence. More... | |
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 133 of file TBFilterRules.qo.h.
casa::TBFilterRuleSequence::TBFilterRuleSequence | ( | ) |
Default Constructor.
casa::TBFilterRuleSequence::~TBFilterRuleSequence | ( | ) |
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.
std::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.
|
private |
Rule sequence.
Definition at line 165 of file TBFilterRules.qo.h.