BALL
1.4.2
|
#include <BALL/KERNEL/selector.h>
Public Member Functions | |
Constructors and Destructors | |
Selector () | |
Selector (const Selector &selector) | |
Selector (const String &expression_string) | |
virtual | ~Selector () |
Assignment | |
virtual void | clear () |
Selector & | operator= (const Selector &selector) |
Predicates | |
bool | operator== (const Selector &selector) const |
Processor related methods | |
virtual Processor::Result | operator() (Composite &composite) |
virtual bool | start () |
Accessors | |
Size | getNumberOfSelectedAtoms () const |
std::list< Atom * > & | getSelectedAtoms () |
void | setExpression (const Expression &expression) |
const Expression & | getExpression () const |
Public Member Functions inherited from BALL::UnaryProcessor< Composite > | |
UnaryProcessor () | |
UnaryProcessor (const UnaryProcessor &) | |
virtual | ~UnaryProcessor () |
virtual bool | finish () |
Protected Attributes | |
std::list< Atom * > | selected_atoms_ |
Expression | expression_ |
Additional Inherited Members | |
Public Types inherited from BALL::UnaryFunctor< Composite, Processor::Result > | |
typedef Processor::Result | result_type |
typedef Composite | argument_type |
typedef Composite & | argument_reference |
typedef const Composite & | const_argument_reference |
typedef Composite * | argument_pointer |
typedef const Composite * | const_argument_pointer |
Atom Selection from BALL Expression.
Definition at line 30 of file selector.h.
BALL::Selector::Selector | ( | ) |
Default constructor.
BALL::Selector::Selector | ( | const Selector & | selector | ) |
Copy constructor.
BALL::Selector::Selector | ( | const String & | expression_string | ) |
Construct a Selector with a string. The selector's expression is set to expression_string
.
|
virtual |
Destructor.
|
virtual |
Clear method.
const Expression& BALL::Selector::getExpression | ( | ) | const |
Return the expression.
Size BALL::Selector::getNumberOfSelectedAtoms | ( | ) | const |
Return the number of atoms selected during the last application.
std::list<Atom*>& BALL::Selector::getSelectedAtoms | ( | ) |
Return a list containing pointers to all selected Atoms
|
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 >.
void BALL::Selector::setExpression | ( | const Expression & | expression | ) |
Define the expression.
|
virtual |
Processor start method. This method is needed to reset the internal counter for the number of selected atoms.
Reimplemented from BALL::UnaryProcessor< Composite >.
|
protected |
Definition at line 126 of file selector.h.
|
protected |
Definition at line 125 of file selector.h.