|
CppWAMP
C++11 client library for the WAMP protocol
|
Wrapper around an event 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 | |
| EventUnpacker (Slot slot) | |
| Constructor taking a callable target. | |
| void | operator() (Event event) const |
| Dispatches the stored event slot. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename... TArgs, typename TSlot > | |
| EventUnpacker< DecayedSlot< TSlot >, TArgs... > | unpackedEvent (TSlot &&slot) |
Wrapper around an event slot which automatically unpacks positional payload arguments.
The wamp::unpackedEvent convenience function should be used to construct instances of EventUnpacker.
| TSlot | Function type to be wrapped. |
| TArgs | List of static types the event slot expects following the Event parameter. |
| void wamp::EventUnpacker< S, A >::operator() | ( | Event | event | ) | const |
Dispatches the stored event slot.
The event.args() positional arguments will be unpacked and passed to the stored event slot as additional parameters.
|
related |
Converts an unpacked event slot into a regular slot than can be passed to Session::subscribe.
| TArgs | List of static types the event slot expects following the Event parameter. |
| TSlot | (deduced) Function type to be converted. |