Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
UndoMutation Class Reference

#include "steam/control/command-mutation.hpp"

Description

Specialised version of the command Mutation functor, used to implement the UNDO functionality.

The operation executed when invoking this functor is the UNDO operation of the respective command; additionally we need another functor to capture the state to be restored on UNDO. Both functors are wired up internally to cooperate and store the state (memento), which is implemented by the specifically typed MementoTie object passed in on construction. All these specific details are concealed (erased) on the interface

Definition at line 99 of file command-mutation.hpp.

Public Member Functions

template<typename SIG , typename MEM >
 UndoMutation (MementoTie< SIG, MEM > &mementoHolder)
 
MutationcaptureState (CmdClosure &clo)
 
- Public Member Functions inherited from Mutation
template<typename SIG >
 Mutation (function< SIG > const &func)
 
void operator() (CmdClosure &clo)
 

Private Attributes

Mutation captureMemento_
 

Constructor & Destructor Documentation

◆ UndoMutation()

template<typename SIG , typename MEM >
UndoMutation ( MementoTie< SIG, MEM > &  mementoHolder)
inline

Definition at line 106 of file command-mutation.hpp.

Member Function Documentation

◆ captureState()

Mutation & captureState ( CmdClosure clo)
inline

Definition at line 113 of file command-mutation.hpp.

References UndoMutation::captureMemento_, and LERR_.

Referenced by CommandImpl::invokeCapture().

+ Here is the caller graph for this function:

Member Data Documentation

◆ captureMemento_

Mutation captureMemento_
private

Definition at line 102 of file command-mutation.hpp.

Referenced by UndoMutation::captureState().

+ Inheritance diagram for UndoMutation:
+ Collaboration diagram for UndoMutation:

The documentation for this class was generated from the following file: