BALL::Selector Class Reference
[Kernel Predicates]

Atom Selection from BALL Expression. More...

#include <selector.h>

Inheritance diagram for BALL::Selector:
Inheritance graph
[legend]

List of all members.


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_

Detailed Description

Atom Selection from BALL Expression.

Constructor & Destructor Documentation

BALL::Selector::Selector ( const String & expression_string )

Construct a Selector with a string.

The selector's expression is set to expression_string.


Member Function Documentation

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


Generated on Thu Aug 6 18:30:32 2009 for BALL by doxygen 1.5.8