- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ManipulateAtomsProcess.cpp
r24a5e0 r5b0b98 9 9 10 10 #include <iostream> 11 12 #include "World.hpp" 13 #include "Helpers/Assert.hpp" 11 14 12 15 using namespace std; … … 22 25 {} 23 26 24 void ManipulateAtomsProcess::call(){ 25 World::get()->doManipulate(this); 27 Action::state_ptr ManipulateAtomsProcess::performCall(){ 28 World::getInstance().doManipulate(this); 29 return Action::success; 26 30 } 27 31 28 void ManipulateAtomsProcess::undo(){ 32 Action::state_ptr ManipulateAtomsProcess::performUndo(Action::state_ptr){ 33 ASSERT(0,"Undo called for a ManipulateAtomsProcess"); 34 return Action::success; 35 } 29 36 37 Action::state_ptr ManipulateAtomsProcess::performRedo(Action::state_ptr){ 38 ASSERT(0,"Redo called for a ManipulateAtomsProcess"); 39 return Action::success; 30 40 } 31 41 … … 34 44 } 35 45 46 bool ManipulateAtomsProcess::shouldUndo(){ 47 return true; 48 } 49 36 50 void ManipulateAtomsProcess::doManipulate(World *world){ 37 51 setMaxSteps(world->numAtoms()); 38 52 start(); 39 World::AtomIterator iter; 40 for(iter=world->getAtomIter(descr);iter!=world->atomEnd();++iter){ 53 for(World::AtomIterator iter=world->getAtomIter(descr);iter!=world->atomEnd();++iter){ 41 54 setCurrStep(iter.getCount()); 42 55 operation(*iter);
Note:
See TracChangeset
for help on using the changeset viewer.