acedia::AbstractActor Class Reference

Describes all possible operations on an actor. A concrete actor may be one of Actor or ActorProxy. More...

#include <abstractactor.hpp>

Inheritance diagram for acedia::AbstractActor:
acedia::ReferenceCounted acedia::Actor acedia::ActorProxy

List of all members.

Public Member Functions

bool isFarRef ()
 Test if this actor runs on a remote node.
virtual void enqueue (const Message &msg)=0
 Enqueues msg to the actors mailbox.
virtual void linkTo (const ActorRef &who)=0
 Link who to this actor.
virtual bool backlinkTo (ActorRef &who)=0
 Link who to this actor and return true on success.
boost::int32_t exitReason () const throw ()
boost::uint32_t id () const throw ()
 Get the unique actor id needed to serialize it.

Protected Member Functions

ActorRefself ()
 Get an ActorRef pointing to this actor.
void forward (const Message &what, ActorRef &whom)
 Forward the message what to whom.
void send (ActorRef &receiver, const Any &v1)
 Send a message to receiver.
template<class C >
boost::function0< void > method (void(C::*m)())
 Creates a callback to a member method.

Detailed Description

Describes all possible operations on an actor. A concrete actor may be one of Actor or ActorProxy.

Definition at line 99 of file abstractactor.hpp.


Member Function Documentation

virtual bool acedia::AbstractActor::backlinkTo ( ActorRef who  )  [pure virtual]

Link who to this actor and return true on success.

If you call backlinkTo on an exited actor that actor will return true but calls linkExited on who.

Parameters:
who the actor which asks for a backlink

Implemented in acedia::Actor, and acedia::ActorProxy.

boost::int32_t acedia::AbstractActor::exitReason (  )  const throw () [inline]
Returns:
the exit reason of an actor or -1 (exit_reasons::NOT_EXITED) if the actor has not exited yet

Definition at line 156 of file abstractactor.hpp.

void acedia::AbstractActor::forward ( const Message what,
ActorRef whom 
) [protected]

Forward the message what to whom.

Note:
Forwarding does not change sender() / receiver() of what.

Definition at line 94 of file abstractactor.cpp.

boost::uint32_t acedia::AbstractActor::id (  )  const throw () [inline]

Get the unique actor id needed to serialize it.

Returns:
the unique actor id

Definition at line 165 of file abstractactor.hpp.

bool acedia::AbstractActor::isFarRef (  )  [inline]

Test if this actor runs on a remote node.

Returns:
true if this actor runs on a remote node in the network; otherwise false;

Definition at line 128 of file abstractactor.hpp.


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

Generated by  doxygen 1.6.2