casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::TBFilterRuleSequence Class Reference

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...
 
TBFilterRuleat (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...
 

Detailed Description

A sequence of TBFilterRules that can be used to filter rows.

Synopsis

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.

Constructor & Destructor Documentation

casa::TBFilterRuleSequence::TBFilterRuleSequence ( )

Default Constructor.

casa::TBFilterRuleSequence::~TBFilterRuleSequence ( )

Member Function Documentation

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.

Member Data Documentation

std::vector<TBFilterRule*> casa::TBFilterRuleSequence::rules
private

Rule sequence.

Definition at line 165 of file TBFilterRules.qo.h.


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