siplasplas
A library for C++ reflection and introspection
|
Implements a direct connection to the destination function. More...
#include <siplasplas/signals/syncsink.hpp>
Public Member Functions | |
template<typename Caller , typename Function > | |
SyncSink (Caller &caller, Function function) | |
Creates a synchronous sink given a caller and a destination function. More... | |
template<typename Caller , typename Callee , typename Function > | |
SyncSink (Caller &caller, Callee &callee, Function function) | |
Creates a synchronous sink given a caller, a callee, and a destination function. More... | |
bool | pull () override |
Does nothing. More... | |
Public Member Functions inherited from cpp::SignalSink | |
template<typename Caller , typename Callee > | |
SignalSink (Caller &caller, Callee &callee) | |
Constructs a sink given the connection caller and the callee. More... | |
template<typename Caller > | |
SignalSink (Caller &caller) | |
Constructs a sink given the connection caller object. More... | |
template<typename... Args> | |
void | operator() (Args &&...args) |
Invokes the sink with the given arguments. More... | |
SignalEmitter * | callee () const |
Gives the callee of the connection. More... | |
SignalEmitter * | caller () const |
Gives the caller of the connection. More... | |
Protected Member Functions | |
void | invoke (const std::vector< cpp::dynamic_reflection::Object > &args) override |
bool | invokeWithoutCallee () const override |
Implements a direct connection to the destination function.
Synchronous sinks have no special policy for function invocation but just invoke the function directly when a signal arrives. See SignalEmitter::connect().
|
inline |
Creates a synchronous sink given a caller and a destination function.
See SignalEmitter::connect_async()
caller | Caller object. |
function | Function to be invoked when the signal is handled. |
|
inline |
Creates a synchronous sink given a caller, a callee, and a destination function.
See SignalEmitter::connect_async()
caller | Caller object. |
callee | Callee object. |
function | Function to be invoked when the signal is handled. |
|
overridevirtual |
Does nothing.
Synchronous sinks directly invoke the destination function when SignalSink::operator() and SyncSink::invoke() are invoked, so pull() has no work to do.
Implements cpp::SignalSink.