Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MethodAction.cpp

    rcc04b7 r5b0b98  
    1010#include <string>
    1111
    12 #include "MethodAction.hpp"
     12#include "Actions/MethodAction.hpp"
     13#include "Helpers/Assert.hpp"
    1314
    1415using namespace std;
     
    2122
    2223MethodAction::~MethodAction()
    23 {
    24   // TODO Auto-generated destructor stub
     24{}
     25
     26
     27Action::state_ptr MethodAction::performCall() {
     28  executeMethod();
     29  // we don't have a state to save so we return Action::success
     30  return Action::success;
    2531}
    2632
     33Action::state_ptr MethodAction::performUndo(Action::state_ptr) {
     34  ASSERT(0,"Cannot undo a MethodAction");
     35  return Action::success;
     36}
    2737
    28 void MethodAction::call() {
    29   executeMethod();
    30 }
    31 void MethodAction::undo() {
    32 
     38Action::state_ptr MethodAction::performRedo(Action::state_ptr){
     39  ASSERT(0,"Cannot redo a MethodAction");
     40  return Action::success;
    3341}
    3442
     
    3644  return false;
    3745}
     46
     47bool MethodAction::shouldUndo(){
     48  return true;
     49}
Note: See TracChangeset for help on using the changeset viewer.