Lumiera  0.pre.03
»edit your freedom«
CommandImplCloneBuilder Class Reference

#include "steam/control/command-impl-clone-builder.hpp"

Description

Visitor to support creating a CommandImpl clone.

Created and managed by CommandRegistry, on clone creation an instance of this builder object is passed down to re-gain a fully typed context, necessary for re-wiring the undo functors and the memento storage within the cloned parts.

Definition at line 123 of file command-impl-clone-builder.hpp.

Public Member Functions

 CommandImplCloneBuilder (TypedAllocationManager &allo)
 
template<typename ARG >
void buildCloneContext (ARG const &origArgHolder)
 to be executed from within the specifically typed context of a concrete command StorageHolder; allocate a clone copy and then prepare a new UNDO-Functor, which is correctly wired with the memento holder within this new clone closure. More...
 
PClo const & clonedClosuere ()
 after visitation: provide cloned StorageHolder, but already stripped down to the generic usage type
 
UndoMutation const & clonedUndoMutation ()
 after visitation: use pre-built bits to provide a cloned UndoFunctor
 

Private Types

typedef InPlaceBuffer< impl::CloneContext, sizeof(impl::ClonedContext)> ContextHolder
 

Private Attributes

TypedAllocationManagerallocator_
 
ContextHolder newContext_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ buildCloneContext()

void buildCloneContext ( ARG const &  origArgHolder)
inline

to be executed from within the specifically typed context of a concrete command StorageHolder; allocate a clone copy and then prepare a new UNDO-Functor, which is correctly wired with the memento holder within this new clone closure.

After that point, these prepared parts can be retrieved through the public accessor functions; they will be used by the command registry to put together a complete clone copy of the original CommandImpl.

Definition at line 148 of file command-impl-clone-builder.hpp.

Referenced by StorageHolder< SIG, MEM >::accept().

+ Here is the caller graph for this function:
+ Inheritance diagram for CommandImplCloneBuilder:
+ Collaboration diagram for CommandImplCloneBuilder:

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