Last change
on this file since cbc27f was cbc27f, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
Added a method that allows manipulation of selected atoms
|
-
Property mode
set to
100644
|
File size:
885 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * ManipulateAtomsProcess.cpp
|
---|
3 | *
|
---|
4 | * Created on: Feb 18, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "ManipulateAtomsProcess.hpp"
|
---|
9 |
|
---|
10 | #include <iostream>
|
---|
11 |
|
---|
12 | using namespace std;
|
---|
13 |
|
---|
14 | ManipulateAtomsProcess::ManipulateAtomsProcess(boost::function<void(atom*)> _operation, AtomDescriptor _descr,
|
---|
15 | std::string _name,bool _doRegister) :
|
---|
16 | operation(_operation),
|
---|
17 | descr(_descr),
|
---|
18 | Process(0,_name,_doRegister)
|
---|
19 | {}
|
---|
20 |
|
---|
21 | ManipulateAtomsProcess::~ManipulateAtomsProcess()
|
---|
22 | {}
|
---|
23 |
|
---|
24 | void ManipulateAtomsProcess::call(){
|
---|
25 | World* world = World::get();
|
---|
26 | setMaxSteps(world->numAtoms());
|
---|
27 | start();
|
---|
28 | World::AtomIterator iter;
|
---|
29 | for(iter=world->getAtomIter(descr);iter!=world->atomEnd();++iter){
|
---|
30 | setCurrStep(iter.getCount());
|
---|
31 | operation(*iter);
|
---|
32 | }
|
---|
33 | stop();
|
---|
34 | }
|
---|
35 |
|
---|
36 | void ManipulateAtomsProcess::undo(){
|
---|
37 |
|
---|
38 | }
|
---|
39 |
|
---|
40 | bool ManipulateAtomsProcess::canUndo(){
|
---|
41 | return false;
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.