C++ Actor Framework 0.18
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
caf::message_handler Class Reference

A partial function implementation used to process a message. More...

#include <message_handler.hpp>

Public Types

using impl_ptr = intrusive_ptr< detail::behavior_impl >
 A pointer to the underlying implementation.
 

Public Member Functions

 message_handler (message_handler &&)=default
 
 message_handler (const message_handler &)=default
 
message_handleroperator= (message_handler &&)=default
 
message_handleroperator= (const message_handler &)=default
 
const impl_ptras_behavior_impl () const
 Returns a pointer to the implementation.
 
 message_handler (impl_ptr ptr)
 Creates a message handler from ptr.
 
 operator bool () const
 Checks whether the message handler is not empty.
 
template<class T , class... Ts>
 message_handler (const T &v, Ts &&... xs)
 Create a message handler a list of match expressions, functors, or other message handlers.
 
template<class... Ts>
void assign (Ts... xs)
 Assigns new message handlers.
 
void assign (message_handler what)
 Equal to *this = other.
 
optional< messageoperator() (message &arg)
 Runs this handler and returns its (optional) result.
 
bool operator() (detail::invoke_result_visitor &f, message &xs)
 Runs this handler with callback.
 
template<class... Ts>
std::conditional< detail::disjunction< may_have_timeout< typenamestd::decay< Ts >::type >::value... >::value, behavior, message_handler >::type or_else (Ts &&... xs) const
 Returns a new handler that concatenates this handler with a new handler from xs....
 

Friends

class behavior
 

Detailed Description

A partial function implementation used to process a message.


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