libqi-api  release-2.5.3-2016-11-18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qi::Actor Class Reference

#include <actor.hpp>

Public Member Functions

 Actor ()=default
 
 Actor (const Actor &)=delete
 
 Actor (qi::ExecutionContext &ec)
 
virtual ~Actor ()=default
 
qi::Strandstrand () const
 
template<class... Args>
auto stranded (Args &&...args) const -> decltype(_strand.schedulerFor(std::forward< Args >(args)...))
 
template<class... Args>
auto async (Args &&...args) const -> decltype(_strand.async(std::forward< Args >(args)...))
 
template<class... Args>
auto asyncDelay (Args &&...args) const -> decltype(_strand.asyncDelay(std::forward< Args >(args)...))
 
template<class... Args>
auto asyncAt (Args &&...args) const -> decltype(_strand.asyncAt(std::forward< Args >(args)...))
 
void joinTasks ()
 

Detailed Description

Class that represents an actor.

Inherit from this class if you want your class to be an actor (as in the actor model). This means that your class will receive "messages" and not be called. In other words, there will never be to calls to your object in parallel, they will be queued.

Definition at line 26 of file actor.hpp.

Constructor & Destructor Documentation

qi::Actor::Actor ( )
default
qi::Actor::Actor ( const Actor )
delete
qi::Actor::Actor ( qi::ExecutionContext ec)
inlineexplicit

Definition at line 34 of file actor.hpp.

virtual qi::Actor::~Actor ( )
virtualdefault

Member Function Documentation

template<class... Args>
auto qi::Actor::async ( Args &&...  args) const -> decltype(_strand.async(std::forward<Args>(args)...))
inline

Definition at line 53 of file actor.hpp.

template<class... Args>
auto qi::Actor::asyncAt ( Args &&...  args) const -> decltype(_strand.asyncAt(std::forward<Args>(args)...))
inline

Definition at line 67 of file actor.hpp.

template<class... Args>
auto qi::Actor::asyncDelay ( Args &&...  args) const -> decltype(_strand.asyncDelay(std::forward<Args>(args)...))
inline

Definition at line 60 of file actor.hpp.

void qi::Actor::joinTasks ( )
inline

Definition at line 73 of file actor.hpp.

qi::Strand* qi::Actor::strand ( ) const
inline

Definition at line 40 of file actor.hpp.

template<class... Args>
auto qi::Actor::stranded ( Args &&...  args) const -> decltype(_strand.schedulerFor(std::forward<Args>(args)...))
inline

Definition at line 46 of file actor.hpp.


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