31#ifndef CONTROL_MEMENTO_TIE_H
32#define CONTROL_MEMENTO_TIE_H
76 template<
typename SIG,
typename MEM>
138 return bindLast(
undo_
164 throw err::State{
"need to invoke memento state capturing beforehand"
165 ,
LERR_(MISSING_MEMENTO)};
187 operator std::string()
const;
192 template<
typename SIG,
typename MEM>
199 return "<mem:missing>";
Universal value/ref wrapper accessible similar to a pointer.
BuildFunType< void, ExtendedArgs >::Sig UndoOp_Sig
BuildFunType< MEM, Args >::Sig CaptureSig
Binding together state capturing and execution of the undo operation.
CommandSignature< SIG, MEM >::CaptureSig SIG_cap
ItemWrapper< MEM > memento_
storage holding the captured state for undo
function< SIG > tieUndoFunc()
bind the undo function to the internal memento store within this object.
MementoTie(function< SIG_undo > const &undoFunc, function< SIG_cap > const &captureFunc)
creates an execution context tying together the provided functions.
MEM & getState()
access the currently captured memento state value
void capture(MEM const &mementoVal)
to be chained behind the capture function
CommandSignature< SIG, MEM >::UndoOp_Sig SIG_undo
function< SIG_undo > undo_
void clear()
reverses the effect of capturing state and returns this memento holder into pristine state
function< SIG_cap > capture_
function< SIG > tieCaptureFunc()
bind the capturing function to the internal memento store within this object.
Metaprogramming helpers for deriving the precise function signatures necessary to implement a given c...
Partial function application and building a complete function closure.
Adapter to store and hold an element of arbitrary type in local storage.
helpers for fail-safe invocation of comparison operations from generic code.
LumieraError< LERR_(STATE)> State
Steam-Layer implementation namespace root.
std::string toString(TY const &val) noexcept
get some string representation of any object, reliably.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...