Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
VerbHolder< REC, RET(ARGS...)> Struct Template Reference

#include "lib/verb-visitor.hpp"

Description

template<class REC, class RET, typename... ARGS>
struct lib::VerbHolder< REC, RET(ARGS...)>

Building block: actual storage for a "verb" (function pointer), together with the pre-bound invocation arguments for this specific operation.

Definition at line 128 of file verb-visitor.hpp.

Public Types

using Verb = VerbToken< REC, RET(ARGS...)>
 
using Args = std::tuple< ARGS... >
 
using SequenceIterator = meta::BuildIdxIter< ARGS... >::Ascending
 meta-sequence to pick argument values from the storage tuple
 
- Public Types inherited from VerbToken< REC, RET(ARGS...)>
typedef RET(REC::* Handler) (ARGS...)
 

Public Attributes

Args args_
 Storage for the argument tuple.
 

Public Member Functions

template<typename... PARS>
 VerbHolder (Verb::Handler handlerRef, Literal verbID, PARS &&... args)
 
Literal getID () const override
 
RET applyTo (REC &receiver) override
 
- Public Member Functions inherited from VerbInvoker< REC, RET >
virtual ~VerbInvoker ()
 
bool operator== (VerbInvoker const &o) const
 
bool operator!= (VerbInvoker const &o) const
 
- Public Member Functions inherited from CloneValueSupport< polyvalue::EmptyBase >
virtual ~CloneValueSupport ()
 
virtual void cloneInto (void *targetBuffer) const=0
 
- Public Member Functions inherited from VerbToken< REC, RET(ARGS...)>
RET applyTo (REC &receiver, ARGS &&...args)
 
 VerbToken (Handler handlerFunction, Literal token)
 
 VerbToken ()
 
 operator string () const
 
Literal const & getID () const
 
bool operator== (VerbToken const &o) const
 equality of VerbToken, based on equality of the token_ Literal
 
bool operator!= (VerbToken const &o) const
 

Private Member Functions

template<size_t... idx>
RET invokeVerb (REC &receiver, meta::IndexSeq< idx... >)
 

Additional Inherited Members

- Protected Attributes inherited from VerbToken< REC, RET(ARGS...)>
Handler handler_
 
Literal token_
 

Constructor & Destructor Documentation

◆ VerbHolder()

template<class REC , class RET , typename... ARGS>
template<typename... PARS>
VerbHolder ( Verb::Handler  handlerRef,
Literal  verbID,
PARS &&...  args 
)
inline

Definition at line 142 of file verb-visitor.hpp.

Member Typedef Documentation

◆ Verb

template<class REC , class RET , typename... ARGS>
using Verb = VerbToken<REC,RET(ARGS...)>

Definition at line 132 of file verb-visitor.hpp.

◆ Args

template<class REC , class RET , typename... ARGS>
using Args = std::tuple<ARGS...>

Definition at line 133 of file verb-visitor.hpp.

◆ SequenceIterator

template<class REC , class RET , typename... ARGS>
using SequenceIterator = meta::BuildIdxIter<ARGS...>::Ascending

meta-sequence to pick argument values from the storage tuple

Definition at line 136 of file verb-visitor.hpp.

Member Function Documentation

◆ getID()

template<class REC , class RET , typename... ARGS>
Literal getID ( ) const
inlineoverridevirtual

Implements VerbInvoker< REC, RET >.

Definition at line 148 of file verb-visitor.hpp.

◆ applyTo()

template<class REC , class RET , typename... ARGS>
RET applyTo ( REC &  receiver)
inlineoverridevirtual

Implements VerbInvoker< REC, RET >.

Definition at line 154 of file verb-visitor.hpp.

◆ invokeVerb()

template<class REC , class RET , typename... ARGS>
template<size_t... idx>
RET invokeVerb ( REC &  receiver,
meta::IndexSeq< idx... >   
)
inlineprivate

actual function invocation, thereby unpacking the argument tuple

Definition at line 163 of file verb-visitor.hpp.

Member Data Documentation

◆ args_

template<class REC , class RET , typename... ARGS>
Args args_

Storage for the argument tuple.

Definition at line 139 of file verb-visitor.hpp.

+ Inheritance diagram for VerbHolder< REC, RET(ARGS...)>:
+ Collaboration diagram for VerbHolder< REC, RET(ARGS...)>:

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