#include <selector.h>

Public Member Functions |
|
|
Constructors and Destructors
|
|
| Selector () | |
| Default constructor. |
|
| Selector (const Selector &selector) | |
| Copy constructor. |
|
| Selector (const String &expression_string) | |
| Construct a Selector with a
string. |
|
| virtual | ~Selector () |
| Destructor. |
|
|
Assignment
|
|
| virtual void | clear () |
| Clear method. |
|
| Selector & | operator= (const Selector &selector) |
| Assignment operator. |
|
|
Predicates
|
|
| bool | operator== (const Selector &selector) const |
| Equality. |
|
|
Processor related methods
|
|
| virtual Processor::Result | operator() (Composite &composite) |
| Access operator. |
|
| virtual bool | start () |
| Processor
start method. |
|
|
Accessors
|
|
| Size | getNumberOfSelectedAtoms () const |
| Return the number of atoms selected
during the last application. |
|
| List< Atom * > & | getSelectedAtoms () |
| Return a list containing pointers to
all selected Atoms. |
|
| void | setExpression (const Expression &expression) |
| Define the expression. |
|
| const Expression & | getExpression () const |
| Return the expression. |
|
Protected Attributes |
|
| List< Atom * > | selected_atoms_ |
| Expression | expression_ |
| BALL::Selector::Selector | ( | const String & | expression_string | ) |
Construct a Selector with a string.
The selector's expression is set to
expression_string.
| virtual Processor::Result BALL::Selector::operator() | ( | Composite & | composite | ) | [virtual] |
Access operator.
If the given Composite is an Atom and the current expression_ is fulfilled for that atom, select it by calling Composite::select .
Reimplemented from BALL::UnaryProcessor< Composite >.
| virtual bool BALL::Selector::start | ( | ) | [virtual] |
Processor start method.
This method is needed to reset the internal counter for the number of selected atoms.
Reimplemented from BALL::UnaryProcessor< Composite >.
1.5.8