Lumiera  0.pre.03
»edit your freedom«
SimpleClosure< SIG > Class Template Reference

#include "steam/control/command-simple-closure.hpp"

Description

template<typename SIG>
class steam::control::SimpleClosure< SIG >

Dummy / proof-of-concept implementation of CmdClosure.

It is a specifically typed subclass, which serves to hold storage for the concrete invocation arguments within an inline buffer.

Note
for demonstration and unit testing
See also
StorageHolder real world implementation

Definition at line 77 of file command-simple-closure.hpp.

Public Member Functions

 SimpleClosure ()
 per default, all data within StorageHolder is set up in empty state. More...
 
 SimpleClosure (ArgTuple const &args)
 
 SimpleClosure (SimpleClosure const &oAh)
 
void accept (CommandImplCloneBuilder &) const override
 assist with creating clone closure without disclosing concrete type
 
virtual void bindArguments (Arguments &args) override
 assign a new parameter tuple to this
 
virtual void bindArguments (lib::diff::Rec const &paramData) override
 assign a new set of parameter values to this. More...
 
bool canUndo () const
 has undo state capturing been invoked?
 
void clearStorage ()
 
bool empty () const
 
virtual void invoke (CmdFunctor const &func) override
 invoke functor using the stored parameter values
 
virtual bool isCaptured () const override
 does this closure hold captured UNDO state?
 
virtual bool isValid () const override
 does this closure hold a valid argument tuple?
 
virtual operator string () const override
 
void storeTuple (ArgTuple const &argTup)
 store a new argument tuple within this StorageHolder, discarding any previously stored arguments
 
virtual void unbindArguments () override
 discard any argument data and return to empty state
 
- Public Member Functions inherited from CmdClosure
 operator bool () const
 

Private Types

using ArgHolder = OpClosure< SIG >
 
using Args = typename lib::meta::RebindTupleTypes< ArgTuple >::Seq
 
using ArgTuple = typename ArgHolder::ArgTuple
 
using ArgumentBuff = InPlaceBuffer< ArgHolder >
 

Private Attributes

ArgumentBuff arguments_
 

Constructor & Destructor Documentation

◆ SimpleClosure()

SimpleClosure ( )
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 164 of file command-simple-closure.hpp.

References SimpleClosure< SIG >::storeTuple().

+ Here is the call graph for this function:

Member Function Documentation

◆ bindArguments()

virtual void bindArguments ( lib::diff::Rec const &  paramData)
inlineoverridevirtual

assign a new set of parameter values to this.

Note
the values are passed packaged into a sequence of GenNode elements. This is the usual way arguments are passed from the UI-Bus

Implements CmdClosure.

Definition at line 123 of file command-simple-closure.hpp.

References SimpleClosure< SIG >::storeTuple().

+ Here is the call graph for this function:
+ Inheritance diagram for SimpleClosure< SIG >:
+ Collaboration diagram for SimpleClosure< SIG >:

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