libcppa  Version 0.1
Public Member Functions
cppa::message_queue Class Reference

#include <message_queue.hpp>

Inheritance diagram for cppa::message_queue:
cppa::ref_counted

List of all members.

Public Member Functions

 message_queue ()
virtual void enqueue (actor *sender, const any_tuple &msg)=0
virtual const any_tupledequeue ()=0
virtual void dequeue (invoke_rules &rules)=0
virtual void dequeue (timed_invoke_rules &rules)=0
virtual bool try_dequeue (any_tuple &)=0
virtual bool try_dequeue (invoke_rules &)=0
bool trap_exit () const
void trap_exit (bool value)
any_tuplelast_dequeued ()
actor_ptrlast_sender ()

Detailed Description

A message queue with many-writers-single-reader semantics.


Constructor & Destructor Documentation

cppa::message_queue::message_queue ( )

Creates an instance with trap_exit() == false.


Member Function Documentation

virtual const any_tuple& cppa::message_queue::dequeue ( ) [pure virtual]

Dequeues the oldest message (FIFO order) from the message queue.

Returns:
The oldest message from the queue.
Warning:
Call only from the owner of the queue.
virtual void cppa::message_queue::dequeue ( invoke_rules rules) [pure virtual]

Removes the first element from the queue that is matched by rules and invokes the corresponding callback.

Parameters:
rules
Warning:
Call only from the owner of the queue.
virtual void cppa::message_queue::dequeue ( timed_invoke_rules rules) [pure virtual]
Parameters:
rules
Warning:
Call only from the owner of the queue.
virtual void cppa::message_queue::enqueue ( actor sender,
const any_tuple msg 
) [pure virtual]

Enqueues a new element to the message queue.

Parameters:
msgThe new message.
any_tuple & cppa::message_queue::last_dequeued ( )

Gets the last dequeued message.

Returns:
The last message object that was removed from the queue by a dequeue() or try_dequeue() member function call.
Warning:
Call only from the owner of the queue.
actor_ptr & cppa::message_queue::last_sender ( )

Gets the sender of the last dequeued message.

Returns:
An actor_ptr to the sender of the last dequeued message.
Warning:
Call only from the owner of the queue.
bool cppa::message_queue::trap_exit ( ) const
Warning:
Call only from the owner of the queue.
void cppa::message_queue::trap_exit ( bool  value)
Warning:
Call only from the owner of the queue.
virtual bool cppa::message_queue::try_dequeue ( any_tuple ) [pure virtual]
Warning:
Call only from the owner of the queue.
virtual bool cppa::message_queue::try_dequeue ( invoke_rules ) [pure virtual]
Warning:
Call only from the owner of the queue.

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