BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
selector.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: selector.h,v 1.29 2005/10/23 12:02:20 oliver Exp $
5 //
6 
7 #ifndef BALL_KERNEL_SELECTOR_H
8 #define BALL_KERNEL_SELECTOR_H
9 
10 #ifndef BALL_KERNEL_EXPRESSION_H
11 # include <BALL/KERNEL/expression.h>
12 #endif
13 
14 
15 namespace BALL
16 {
17  class Atom;
18 
23  : public UnaryProcessor<Composite>
24  {
25 
26  public:
27 
31 
32  // BALL_CREATE(Selector)
33 
36  Selector();
37 
40  Selector(const Selector& selector);
41 
45  Selector(const String& expression_string);
46 
49  virtual ~Selector();
50 
52 
55 
58  virtual void clear();
59 
62  Selector& operator = (const Selector& selector);
63 
65 
68 
71  bool operator == (const Selector& selector) const;
72 
74 
77 
83  virtual Processor::Result operator () (Composite& composite);
84 
89  virtual bool start();
90 
92 
95 
98  Size getNumberOfSelectedAtoms() const;
99 
102  std::list<Atom*>& getSelectedAtoms();
103 
106  void setExpression(const Expression& expression);
107 
110  const Expression& getExpression() const;
111 
112 
114 
115  protected:
116 
117  std::list<Atom*> selected_atoms_;
119  };
120 
121 } // namespace BALL
122 
123 #endif // BALL_KERNEL_SELECTOR_H