Ignore:
Timestamp:
Mar 24, 2010, 4:26:21 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
521e29
Parents:
91379c
Message:

Added methods that allow bookkeeping of actions for undo/redo methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/Actions/Calculation_impl.hpp

    r91379c r0012e6  
    2929
    3030template<typename T>
    31 void Calculation<T>::call(){
     31ActionState* Calculation<T>::performCall(){
    3232  reset();
    3333  (*this)();
     34  return Action::success;
    3435}
    3536
    3637template<typename T>
    37 void Calculation<T>::undo(){}
     38ActionState* Calculation<T>::performUndo(ActionState*){
     39  ASSERT(0,"Cannot undo a calculation");
     40  return Action::success;
     41}
     42template<typename T>
     43ActionState* Calculation<T>::performRedo(ActionState*){
     44  ASSERT(0,"Cannot redo a calculation");
     45  return Action::success;
     46}
    3847
    3948template<typename T>
    4049bool Calculation<T>::canUndo()
     50{
     51  return false;
     52}
     53
     54template<typename T>
     55bool Calculation<T>::shouldUndo()
    4156{
    4257  return false;
Note: See TracChangeset for help on using the changeset viewer.