CAF  0.17.3
Public Member Functions | List of all members
caf::detail::invoke_result_visitor Class Referenceabstract

Inspects the result of message handlers and triggers type-depended actions such as generating result messages. More...

#include <invoke_result_visitor.hpp>

Inherited by caf::detail::default_invoke_result_visitor< Self >.

Public Member Functions

virtual void operator() ()=0
 Called whenever no result messages gets produced, e.g., when returning a response_promise.
 
virtual void operator() (error &)=0
 Called if the message handler returned an error.
 
virtual void operator() (message &)=0
 Called if the message handler returned any "ordinary" value.
 
virtual void operator() (const none_t &)=0
 Called if the message handler returns "nothing", for example a default-constructed optional<T>.
 
void operator() (const unit_t &)
 Called if the message handler returns void or unit_t.
 
template<class T >
void operator() (optional< T > &x)
 Unwraps an optional<T> by recursively calling the visitor with either none_t or T.
 
template<class T >
void operator() (expected< T > &x)
 Unwraps an expected<T> by recursively calling the visitor with either error or T.
 
template<class... Ts>
void operator() (Ts &... xs)
 Wraps arbitrary values into a message and calls the visitor recursively.
 
template<class... Ts>
void operator() (std::tuple< Ts... > &xs)
 Wraps the tuple into a message and calls the visitor recursively with its contents.
 
void operator() (none_t &x)
 Disambiguates the variadic operator<Ts...>().
 
void operator() (unit_t &x)
 Disambiguates the variadic operator<Ts...>().
 
void operator() (response_promise &)
 Calls (*this)().
 
template<class... Ts>
void operator() (typed_response_promise< Ts... > &)
 Calls (*this)().
 
template<class... Ts>
void operator() (delegated< Ts... > &)
 Calls (*this)().
 
template<class Out , class... Ts>
void operator() (outbound_stream_slot< Out, Ts... > &)
 Calls (*this)().
 
template<class In >
void operator() (inbound_stream_slot< In > &)
 Calls (*this)().
 
template<class In >
void operator() (make_sink_result< In > &)
 Calls (*this)().
 
template<class DownstreamManager , class... Ts>
void operator() (make_source_result< DownstreamManager, Ts... > &)
 Calls (*this)().
 
template<class In , class DownstreamManager , class... Ts>
void operator() (make_stage_result< In, DownstreamManager, Ts... > &)
 Calls (*this)().
 
template<class T >
bool visit (T &x)
 Delegates x to the appropriate handler and returns true.
 
bool visit (skip_t &)
 Returns false.
 
bool visit (const skip_t &)
 Returns false.
 
bool visit (optional< skip_t > &x)
 Returns false if x != none, otherwise calls the void handler and returns true. More...
 
template<class... Ts>
bool visit (result< Ts... > &x)
 Dispatches on the runtime-type of x.
 

Detailed Description

Inspects the result of message handlers and triggers type-depended actions such as generating result messages.

Member Function Documentation

◆ visit()

bool caf::detail::invoke_result_visitor::visit ( optional< skip_t > &  x)

Returns false if x != none, otherwise calls the void handler and returns true.


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