00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_KERNEL_SELECTOR_H
00008 #define BALL_KERNEL_SELECTOR_H
00009
00010 #ifndef BALL_KERNEL_EXPRESSION_H
00011 # include <BALL/KERNEL/expression.h>
00012 #endif
00013
00014
00015 namespace BALL
00016 {
00017 class Atom;
00018
00022 class BALL_EXPORT Selector
00023 : public UnaryProcessor<Composite>
00024 {
00025
00026 public:
00027
00031
00032
00033
00036 Selector();
00037
00040 Selector(const Selector& selector);
00041
00045 Selector(const String& expression_string);
00046
00049 virtual ~Selector();
00050
00052
00055
00058 virtual void clear();
00059
00062 Selector& operator = (const Selector& selector);
00063
00065
00068
00071 bool operator == (const Selector& selector) const;
00072
00074
00077
00083 virtual Processor::Result operator () (Composite& composite);
00084
00089 virtual bool start();
00090
00092
00095
00098 Size getNumberOfSelectedAtoms() const;
00099
00102 std::list<Atom*>& getSelectedAtoms();
00103
00106 void setExpression(const Expression& expression);
00107
00110 const Expression& getExpression() const;
00111
00112
00114
00115 protected:
00116
00117 std::list<Atom*> selected_atoms_;
00118 Expression expression_;
00119 };
00120
00121 }
00122
00123 #endif // BALL_KERNEL_SELECTOR_H