Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
OpClosure< SIG > Class Template Reference

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

Description

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

closure to deal with the actual command operation.

This includes holding the invocation parameter tuple

Definition at line 127 of file command-op-closure.hpp.

Public Types

using ArgTuple = Tuple< Args >
 

Public Member Functions

 OpClosure ()
 
 OpClosure (ArgTuple const &args)
 
OpClosureoperator= (OpClosure const &)=delete
 we deliberately support immutable types as command arguments
 
OpClosureoperator= (OpClosure &&)=delete
 
 OpClosure (OpClosure const &)=default
 
 OpClosure (OpClosure &&)=default
 
bool isValid () const
 
void invoke (CmdFunctor const &unboundFunctor)
 Core operation: use the embedded argument tuple for invoking a functor.
 
 operator string () const
 

Private Types

using Args = _Fun< SIG >::Args
 
using Builder = BuildTupleAccessor< ParamAccessor, Args >
 
using ParamStorageTuple = Builder::Product
 

Private Attributes

ParamStorageTuple params_
 
bool activated_
 

Constructor & Destructor Documentation

◆ OpClosure() [1/4]

template<typename SIG >
OpClosure ( )
inline

Definition at line 141 of file command-op-closure.hpp.

◆ OpClosure() [2/4]

template<typename SIG >
OpClosure ( ArgTuple const args)
inlineexplicit

Definition at line 147 of file command-op-closure.hpp.

◆ OpClosure() [3/4]

template<typename SIG >
OpClosure ( OpClosure< SIG > const )
default

◆ OpClosure() [4/4]

template<typename SIG >
OpClosure ( OpClosure< SIG > &&  )
default

Member Typedef Documentation

◆ Args

template<typename SIG >
using Args = _Fun<SIG>::Args
private

Definition at line 129 of file command-op-closure.hpp.

◆ Builder

Definition at line 130 of file command-op-closure.hpp.

◆ ParamStorageTuple

Definition at line 132 of file command-op-closure.hpp.

◆ ArgTuple

Definition at line 138 of file command-op-closure.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<typename SIG >
OpClosure & operator= ( OpClosure< SIG > const )
delete

we deliberately support immutable types as command arguments

◆ operator=() [2/2]

template<typename SIG >
OpClosure & operator= ( OpClosure< SIG > &&  )
delete

◆ isValid()

template<typename SIG >
bool isValid ( ) const
inline

Definition at line 160 of file command-op-closure.hpp.

References OpClosure< SIG >::activated_.

◆ invoke()

template<typename SIG >
void invoke ( CmdFunctor const unboundFunctor)
inline

Core operation: use the embedded argument tuple for invoking a functor.

Parameters
unboundFunctoran function object, whose function arguments are required to match the types of the embedded ParamStorageTuple
Note
ASSERTION failure if the function signature doesn't match the argument types tuple.
the functor might actually modify the param values. Thus this function can't be const.

Definition at line 175 of file command-op-closure.hpp.

References OpClosure< SIG >::params_.

◆ operator string()

template<typename SIG >
operator string ( ) const
inline

Definition at line 183 of file command-op-closure.hpp.

References OpClosure< SIG >::params_.

Member Data Documentation

◆ params_

template<typename SIG >
ParamStorageTuple params_
private

◆ activated_

template<typename SIG >
bool activated_
private

Definition at line 135 of file command-op-closure.hpp.

Referenced by OpClosure< SIG >::isValid().

+ Collaboration diagram for OpClosure< SIG >:

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