35#ifndef CONTROL_COMMAND_STORAGE_HOLDER_H
36#define CONTROL_COMMAND_STORAGE_HOLDER_H
70 template<
typename SIG,
typename MEM>
138 throw err::State{
"Lifecycle error: can't bind functor, "
139 "command arguments not yet provided"
140 ,
LERR_(UNBOUND_ARGUMENTS)};
147 operator string()
const override
149 return "Command-State{ arguments="
175 if (
oAh.arguments_->isValid())
Buffer to place and maintain an object instance privately within another object.
object-like record of data.
Visitor to support creating a CommandImpl clone.
void buildCloneContext(ARG const &origArgHolder)
to be executed from within the specifically typed context of a concrete command StorageHolder; alloca...
BuildFunType< void, ExtendedArgs >::Sig UndoOp_Sig
BuildFunType< MEM, Args >::Sig CaptureSig
BuildFunType< void, Args >::Sig OperateSig
This is "the" top level CmdClosure implementation.
void accept(CommandImplCloneBuilder &visitor) const override
assist with creating a clone copy; this results in invocation of the copy ctor
CommandSignature< SIG, MEM >::CaptureSig SIG_cap
ArgHolder::ArgTuple ArgTuple
OpClosure< SIG > ArgHolder
virtual bool isCaptured() const override
does this closure hold captured UNDO state?
StorageHolder(StorageHolder const &oAh)
copy construction allowed(but no assignment).
CommandSignature< SIG, MEM >::UndoOp_Sig SIG_undo
StorageHolder & operator=(StorageHolder const &)=delete
copy construction allowed(but no assignment)
virtual void unbindArguments() override
discard any argument data and return to empty state
MEM & memento()
direct "backdoor" access to stored memento value.
MementoTie< SIG, MEM > & getMementoWiring()
just re-access an existing memento storage wiring.
StorageHolder()
per default, all data within StorageHolder is set up in empty state.
bool canUndo() const
has undo state capturing been invoked?
virtual bool isValid() const override
does this closure hold a valid argument tuple?
virtual void bindArguments(Arguments &args) override
assign a new parameter tuple to this
CommandSignature< SIG, MEM >::OperateSig SIG_op
virtual void bindArguments(lib::diff::Rec const ¶mData) override
assign a new set of parameter values to this.
virtual void invoke(CmdFunctor const &func) override
invoke functor using the stored parameter values
void storeTuple(ArgTuple const &argTup)
store a new argument tuple within this StorageHolder, discarding any previously stored arguments
lib::meta::RebindTupleTypes< ArgTuple >::Seq Args
MementoTie< SIG, MEM > MemHolder
MementoTie< SIG, MEM > & tie(function< SIG_undo > const &undoFunc, function< SIG_cap > const &captureFunc)
create a new memento storage wiring, discarding existing memento state.
Helper for creating an implementation clone, based on the visitor pattern.
Implementation of the concrete (sub)-closure of a command, responsible for invoking the actual comman...
A special binding used by Steam-Layer commands for capturing UNDO state information.
LumieraError< LERR_(STATE)> State
Steam-Layer implementation namespace root.
Helper allowing type erasure while holding the actual object inline.
Abstract foundation for building custom allocation managers.