Line | |
---|
1 | /*
|
---|
2 | * ManipulateAtomsProcess.hpp
|
---|
3 | *
|
---|
4 | * Created on: Feb 18, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef MANIPULATEATOMSPROCESS_HPP_
|
---|
9 | #define MANIPULATEATOMSPROCESS_HPP_
|
---|
10 |
|
---|
11 | #include "Actions/Process.hpp"
|
---|
12 |
|
---|
13 | #include<boost/function.hpp>
|
---|
14 |
|
---|
15 | #include "Descriptors/AtomDescriptor.hpp"
|
---|
16 |
|
---|
17 | class World;
|
---|
18 |
|
---|
19 | class ManipulateAtomsProcess : public Process
|
---|
20 | {
|
---|
21 | public:
|
---|
22 | ManipulateAtomsProcess(boost::function<void(atom*)> _operation, AtomDescriptor descr,std::string _name,bool _doRegister=true);
|
---|
23 | virtual ~ManipulateAtomsProcess();
|
---|
24 |
|
---|
25 | virtual bool canUndo();
|
---|
26 | virtual bool shouldUndo();
|
---|
27 |
|
---|
28 | virtual void doManipulate(World *);
|
---|
29 | private:
|
---|
30 |
|
---|
31 | virtual Action::state_ptr performCall();
|
---|
32 | virtual Action::state_ptr performUndo(Action::state_ptr);
|
---|
33 | virtual Action::state_ptr performRedo(Action::state_ptr);
|
---|
34 |
|
---|
35 | AtomDescriptor descr;
|
---|
36 | boost::function<void(atom*)> operation;
|
---|
37 | };
|
---|
38 |
|
---|
39 | #endif /* MANIPULATEATOMSPROCESS_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.