Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/control/command-impl.hpp"
Steam-Layer Command implementation.
Data record holding together the parts necessary for command execution
StorageHolder<SIG_OPER,Mem>
Definition at line 68 of file command-impl.hpp.
Public Types | |
typedef HandlingPattern::ID | PattID |
Public Member Functions | |
template<typename ARG > | |
CommandImpl (shared_ptr< ARG > pStorageHolder, _TY(Func_op) const &operFunctor, _TY(Func_cap) const &captFunctor, _TY(Func_undo) const &undoFunctor) | |
build a new implementation frame, and do the initial wiring. More... | |
CommandImpl (CommandImpl const &orig, UndoMutation const &newUndo, shared_ptr< CmdClosure > const &newClosure) | |
bool | canExec () const |
< state check: sufficiently defined to be invoked | |
bool | canUndo () const |
< state check: has undo state been captured? | |
void | discardArguments () |
PattID | getDefaultHandlingPattern () const |
void | invokeCapture () |
void | invokeOperation () |
void | invokeUndo () |
bool | isValid () const |
< validity self-check: is basically usable. | |
operator bool () const | |
operator string () const | |
void | prepareClone (CommandImplCloneBuilder &visitor) const |
assist with building a clone copy of this CommandImpl. More... | |
void | setArguments (Arguments &args) |
void | setArguments (lib::diff::Rec const ¶mData) |
PattID | setHandlingPattern (PattID newID) |
define a handling pattern to be used by default More... | |
Public Attributes | |
Symbol | cmdID |
human-readable marker for diagnostics, will be (re)assigned when activating this CommandImpl | |
Classes | |
struct | _Type |
Private Attributes | |
HandlingPattern::ID | defaultPatt_ |
Mutation | do_ |
shared_ptr< CmdClosure > | pClo_ |
UndoMutation | undo_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
struct steam::control::CommandImpl::_Type |
|
inline |
build a new implementation frame, and do the initial wiring.
On the interface the specific type is discarded afterwards. This information is still kept though, as encoded into the vtable of the embedded FunErasure objects holding the command operation and undo functors, and the vtable of the embedded CmdClosure
Definition at line 99 of file command-impl.hpp.
|
inline |
cloning service for the CommandRegistry: effectively this is a copy ctor, but as we rely on a argument holder (without knowing the exact type), we need to delegate the cloning of the arguments down to where the exact type info is still available; thus, a CommandImplCloneBuilder is first passed as a visitor down and then calls back to perform the copy, providing an new (clone) closure and UNDO functor already correctly wired to collaborate.
Definition at line 126 of file command-impl.hpp.
References CommandImpl::cmdID, and CommandImpl::isValid().
|
inline |
assist with building a clone copy of this CommandImpl.
By accepting the clone builder as a visitor and dispatching this visitation down into the concrete closure, the builder can re-gain the fully typed context available on creation of the ComandImpl. Within this context, for the clone to be created, the UndoMutation has to be re-wired, otherwise it would continue to cooperate with original closure.
Definition at line 155 of file command-impl.hpp.
Referenced by CommandRegistry::createCloneImpl().
|
inline |
define a handling pattern to be used by default
Definition at line 199 of file command-impl.hpp.
References steam::mobject::session::test::anonymous_namespace{defs-manager-impl-test.cpp}::newID().