Ignore:
Timestamp:
Mar 24, 2010, 4:26:21 PM (15 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/MethodAction.hpp

    r91379c r0012e6  
    2222  MethodAction(std::string _name,boost::function<void()> _executeMethod,bool _doRegister=true);
    2323  virtual ~MethodAction();
     24  virtual bool canUndo();
     25  virtual bool shouldUndo();
    2426
    25   virtual void call();
    26   virtual void undo();
    27   virtual bool canUndo();
     27private:
     28  virtual ActionState* performCall();
     29  virtual ActionState* performUndo(ActionState*);
     30  virtual ActionState* performRedo(ActionState*);
     31
    2832
    2933  boost::function<void()> executeMethod; //!< this stores the method to be called
    30 
    31 
    3234};
    3335
Note: See TracChangeset for help on using the changeset viewer.