actor-framework
Public Types | Public Member Functions | Public Attributes | Related Functions | List of all members
caf::function_view< Actor > Class Template Reference

A function view for an actor hides any messaging from the caller. More...

#include <function_view.hpp>

Collaboration diagram for caf::function_view< Actor >:
Collaboration graph
[legend]

Public Types

using type = Actor
 

Public Member Functions

 function_view (timespan rel_timeout)
 
 function_view (type impl)
 
 function_view (type impl, timespan rel_timeout)
 
 function_view (function_view &&x)
 
function_viewoperator= (function_view &&x)
 
template<class... Ts>
auto operator() (Ts &&... xs)
 Sends a request message to the assigned actor and returns the result.
 
void assign (type x)
 
void reset ()
 
 operator bool () const
 Checks whether this function view has an actor assigned to it.
 
type handle () const
 Returns the associated actor handle.
 

Public Attributes

timespan timeout
 
scoped_actor self_
 

Related Functions

(Note that these are not member functions.)

template<class T >
bool operator== (const function_view< T > &x, std::nullptr_t)
 
template<class T >
bool operator== (std::nullptr_t x, const function_view< T > &y)
 
template<class T >
bool operator!= (const function_view< T > &x, std::nullptr_t y)
 
template<class T >
bool operator!= (std::nullptr_t x, const function_view< T > &y)
 
template<class T >
auto make_function_view (const T &x, timespan t=infinite)
 Creates a new function view for x. More...
 

Detailed Description

template<class Actor>
class caf::function_view< Actor >

A function view for an actor hides any messaging from the caller.

Internally, a function view uses a scoped_actor and uses blocking send and receive operations.

Friends And Related Function Documentation

◆ make_function_view()

template<class T >
auto make_function_view ( const T &  x,
timespan  t = infinite 
)
related

Creates a new function view for x.

◆ operator!=() [1/2]

template<class T >
bool operator!= ( const function_view< T > &  x,
std::nullptr_t  y 
)
related

◆ operator!=() [2/2]

template<class T >
bool operator!= ( std::nullptr_t  x,
const function_view< T > &  y 
)
related

◆ operator==() [1/2]

template<class T >
bool operator== ( const function_view< T > &  x,
std::nullptr_t   
)
related

◆ operator==() [2/2]

template<class T >
bool operator== ( std::nullptr_t  x,
const function_view< T > &  y 
)
related

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