CppWAMP
C++11 client library for the WAMP protocol
wamp::InvocationUnpacker< TSlot, TArgs > Class Template Reference

Wrapper around a call slot which automatically unpacks positional payload arguments. More...

#include <cppwamp/unpacker.hpp>

Public Types

using Slot = TSlot
 The function type to be wrapped.
 

Public Member Functions

 InvocationUnpacker (Slot slot)
 Constructor taking a callable target.
 
Outcome operator() (Invocation inv) const
 Dispatches the stored call slot. More...
 

Related Functions

(Note that these are not member functions.)

template<typename... TArgs, typename TSlot >
InvocationUnpacker< DecayedSlot< TSlot >, TArgs... > unpackedRpc (TSlot &&slot)
 

Detailed Description

template<typename TSlot, typename... TArgs>
class wamp::InvocationUnpacker< TSlot, TArgs >

Wrapper around a call slot which automatically unpacks positional payload arguments.

The wamp::unpackedRpc convenience function should be used to construct instances of InvocationUnpacker.

See also
wamp::unpackedRpc
Unpacked Call Slots
Template Parameters
TSlotFunction type to be wrapped.
TArgsList of static types the call slot expects following the Invocation parameter.

Member Function Documentation

◆ operator()()

template<typename S , typename... A>
Outcome wamp::InvocationUnpacker< S, A >::operator() ( Invocation  inv) const

Dispatches the stored call slot.

The inv.args() positional arguments will be unpacked and passed to the stored call slot as additional parameters.

Friends And Related Function Documentation

◆ unpackedRpc()

template<typename... TArgs, typename TSlot >
InvocationUnpacker< DecayedSlot< TSlot >, TArgs... > unpackedRpc ( TSlot &&  slot)
related

Converts an unpacked call slot into a regular slot than can be passed to Session::enroll.

See also
Unpacked Call Slots
Returns
An InvocationUnpacker that wraps the the given slot.
Template Parameters
TArgsList of static types the call slot expects following the Invocation parameter.
TSlot(deduced) Function type to be converted.

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