![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "steam/control/command-storage-holder.hpp"
This is "the" top level CmdClosure implementation.
It is a specifically typed CmdClosure, which serves for actually allocating storage to hold the command arguments and the UNDO state (memento) for Steam-Layer commands. Both the contained components within StorageHolder can be in empty state; there are no distinct lifecycle limitations. StorageHolder is part of Steam-Layer command's implementation and should not be used standalone.
Definition at line 71 of file command-storage-holder.hpp.
Public Types | |
| using | SIG_op = CommandSignature< SIG, MEM >::OperateSig |
| using | SIG_cap = CommandSignature< SIG, MEM >::CaptureSig |
| using | SIG_undo = CommandSignature< SIG, MEM >::UndoOp_Sig |
Public Member Functions | |
| virtual bool | isValid () const override |
| does this closure hold a valid argument tuple? | |
| virtual bool | isCaptured () const override |
| does this closure hold captured UNDO state? | |
| virtual void | bindArguments (Arguments &args) override |
| assign a new parameter tuple to this | |
| virtual void | bindArguments (lib::diff::Rec const ¶mData) override |
| assign a new set of parameter values to this. | |
| virtual void | unbindArguments () override |
| discard any argument data and return to empty state | |
| virtual void | invoke (CmdFunctor const &func) override |
| invoke functor using the stored parameter values | |
| virtual | operator string () const override |
| StorageHolder () | |
| per default, all data within StorageHolder is set up in empty state. | |
| StorageHolder (StorageHolder const &oAh) | |
| copy construction allowed(but no assignment). | |
| StorageHolder & | operator= (StorageHolder const &)=delete |
| copy construction allowed(but no assignment) | |
| void | accept (CommandImplCloneBuilder &visitor) const override |
| assist with creating a clone copy; this results in invocation of the copy ctor | |
| bool | canUndo () const |
| has undo state capturing been invoked? | |
| bool | empty () const |
| void | storeTuple (ArgTuple const &argTup) |
| store a new argument tuple within this StorageHolder, discarding any previously stored arguments | |
| void | clearStorage () |
| MementoTie< SIG, MEM > & | tie (function< SIG_undo > const &undoFunc, function< SIG_cap > const &captureFunc) |
| create a new memento storage wiring, discarding existing memento state. | |
| MementoTie< SIG, MEM > & | getMementoWiring () |
| just re-access an existing memento storage wiring. | |
| MEM & | memento () |
| direct "backdoor" access to stored memento value. | |
Public Member Functions inherited from CmdClosure | |
| virtual | ~CmdClosure () |
| operator bool () const | |
Private Types | |
| using | ArgHolder = OpClosure< SIG > |
| using | MemHolder = MementoTie< SIG, MEM > |
| using | ArgumentBuff = InPlaceBuffer< ArgHolder > |
| using | MementoBuff = InPlaceBuffer< MemHolder > |
| using | ArgTuple = ArgHolder::ArgTuple |
| using | Args = lib::meta::RebindTupleTypes< ArgTuple >::Seq |
Private Attributes | |
| ArgumentBuff | arguments_ |
| MementoBuff | memento_ |
|
inline |
per default, all data within StorageHolder is set up in empty state.
Later on, the command arguments are to be provided by #bind , whereas the undo functions will be wired by tie
Definition at line 162 of file command-storage-holder.hpp.
|
inline |
copy construction allowed(but no assignment).
Definition at line 171 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_, and StorageHolder< SIG, MEM >::memento_.
Definition at line 74 of file command-storage-holder.hpp.
Definition at line 75 of file command-storage-holder.hpp.
|
private |
Definition at line 77 of file command-storage-holder.hpp.
|
private |
Definition at line 78 of file command-storage-holder.hpp.
Definition at line 80 of file command-storage-holder.hpp.
|
private |
Definition at line 81 of file command-storage-holder.hpp.
Definition at line 218 of file command-storage-holder.hpp.
Definition at line 219 of file command-storage-holder.hpp.
Definition at line 220 of file command-storage-holder.hpp.
does this closure hold a valid argument tuple?
Implements CmdClosure.
Definition at line 95 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_.
Referenced by StorageHolder< SIG, MEM >::invoke().
Here is the caller graph for this function:does this closure hold captured UNDO state?
Implements CmdClosure.
Definition at line 101 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::memento_.
assign a new parameter tuple to this
Implements CmdClosure.
Definition at line 110 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::storeTuple().
Here is the call graph for this function:
|
inlineoverridevirtual |
assign a new set of parameter values to this.
Implements CmdClosure.
Definition at line 121 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::storeTuple().
Here is the call graph for this function:discard any argument data and return to empty state
Implements CmdClosure.
Definition at line 128 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::clearStorage().
Here is the call graph for this function:
|
inlineoverridevirtual |
invoke functor using the stored parameter values
Implements CmdClosure.
Definition at line 135 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_, StorageHolder< SIG, MEM >::isValid(), and LERR_.
Here is the call graph for this function:Implements CmdClosure.
Definition at line 147 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_, and StorageHolder< SIG, MEM >::memento_.
|
delete |
copy construction allowed(but no assignment)
|
inlineoverridevirtual |
assist with creating a clone copy; this results in invocation of the copy ctor
Implements CmdClosure.
Definition at line 191 of file command-storage-holder.hpp.
References CommandImplCloneBuilder::buildCloneContext().
Here is the call graph for this function:has undo state capturing been invoked?
Definition at line 198 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::memento_.
Definition at line 199 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_.
store a new argument tuple within this StorageHolder, discarding any previously stored arguments
Definition at line 205 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_.
Referenced by StorageHolder< SIG, MEM >::bindArguments(), and StorageHolder< SIG, MEM >::bindArguments().
Here is the caller graph for this function:Definition at line 211 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::arguments_, and StorageHolder< SIG, MEM >::memento_.
Referenced by StorageHolder< SIG, MEM >::unbindArguments().
Here is the caller graph for this function:
|
inline |
create a new memento storage wiring, discarding existing memento state.
Definition at line 226 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::memento_.
just re-access an existing memento storage wiring.
Used when cloning the closure
Definition at line 235 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::memento_.
direct "backdoor" access to stored memento value.
| LUMIERA_ERROR_MISSING_MEMENTO | when invoked prior to tie(..) and capturing any state |
Definition at line 246 of file command-storage-holder.hpp.
References StorageHolder< SIG, MEM >::memento_.
|
private |
Definition at line 86 of file command-storage-holder.hpp.
Referenced by StorageHolder< SIG, MEM >::StorageHolder(), StorageHolder< SIG, MEM >::clearStorage(), StorageHolder< SIG, MEM >::empty(), StorageHolder< SIG, MEM >::invoke(), StorageHolder< SIG, MEM >::isValid(), StorageHolder< SIG, MEM >::operator string(), and StorageHolder< SIG, MEM >::storeTuple().
|
private |
Definition at line 87 of file command-storage-holder.hpp.
Referenced by StorageHolder< SIG, MEM >::StorageHolder(), StorageHolder< SIG, MEM >::canUndo(), StorageHolder< SIG, MEM >::clearStorage(), StorageHolder< SIG, MEM >::getMementoWiring(), StorageHolder< SIG, MEM >::isCaptured(), StorageHolder< SIG, MEM >::memento(), StorageHolder< SIG, MEM >::operator string(), and StorageHolder< SIG, MEM >::tie().
Inheritance diagram for StorageHolder< SIG, MEM >:
Collaboration diagram for StorageHolder< SIG, MEM >: