Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ManipulateAtomsProcess.cpp

    r24a5e0 r5b0b98  
    99
    1010#include <iostream>
     11
     12#include "World.hpp"
     13#include "Helpers/Assert.hpp"
    1114
    1215using namespace std;
     
    2225{}
    2326
    24 void ManipulateAtomsProcess::call(){
    25   World::get()->doManipulate(this);
     27Action::state_ptr ManipulateAtomsProcess::performCall(){
     28  World::getInstance().doManipulate(this);
     29  return Action::success;
    2630}
    2731
    28 void ManipulateAtomsProcess::undo(){
     32Action::state_ptr ManipulateAtomsProcess::performUndo(Action::state_ptr){
     33  ASSERT(0,"Undo called for a ManipulateAtomsProcess");
     34  return Action::success;
     35}
    2936
     37Action::state_ptr ManipulateAtomsProcess::performRedo(Action::state_ptr){
     38  ASSERT(0,"Redo called for a ManipulateAtomsProcess");
     39  return Action::success;
    3040}
    3141
     
    3444}
    3545
     46bool ManipulateAtomsProcess::shouldUndo(){
     47  return true;
     48}
     49
    3650void ManipulateAtomsProcess::doManipulate(World *world){
    3751  setMaxSteps(world->numAtoms());
    3852  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){
    4154    setCurrStep(iter.getCount());
    4255    operation(*iter);
Note: See TracChangeset for help on using the changeset viewer.