Fawkes API  Fawkes Development Version
fawkes::RWLockQueue Class Reference

Queue with a read/write lock. More...

#include <>>

Inheritance diagram for fawkes::RWLockQueue:

List of all members.

Public Member Functions

 RWLockQueue ()
 Constructor.
 RWLockQueue (const RWLockQueue< Type > &ll)
 Copy constructor.
virtual ~RWLockQueue ()
 Destructor.
void lock_for_read ()
 Lock queue for reading.
void lock_for_write ()
 Lock queue for writing.
bool try_lock_for_read ()
 Try to lock queue for reading.
bool try_lock_for_write ()
 Try to lock queue for writing.
void unlock ()
 Unlock list.
RefPtr< ReadWriteLockrwlock () const
 Get access to the internal rwlock.
void push_locked (const Type &x)
 Push element to queue with lock protection.
void pop_locked ()
 Pop element from queue with lock protection.
void clear ()
 Clear the queue.

Detailed Description

Queue with a read/write lock.

This class provides a queue that has an intrinsic lock. The lock can be applied with the regular locking methods.

See also:
ReadWriteLock
Author:
Tim Niemueller

Constructor & Destructor Documentation

fawkes::RWLockQueue::RWLockQueue ( )

Constructor.

Definition at line 75 of file rwlock_queue.h.

fawkes::RWLockQueue::RWLockQueue ( const RWLockQueue< Type > &  ll)

Copy constructor.

Parameters:
llRWLockQueue to copy

Definition at line 85 of file rwlock_queue.h.

fawkes::RWLockQueue::~RWLockQueue ( ) [virtual]

Destructor.

Definition at line 94 of file rwlock_queue.h.


Member Function Documentation

void fawkes::RWLockQueue::clear ( void  )

Clear the queue.

Definition at line 177 of file rwlock_queue.h.

void fawkes::RWLockQueue::lock_for_read ( )

Lock queue for reading.

Definition at line 103 of file rwlock_queue.h.

void fawkes::RWLockQueue::lock_for_write ( )

Lock queue for writing.

Definition at line 112 of file rwlock_queue.h.

void fawkes::RWLockQueue::pop_locked ( )

Pop element from queue with lock protection.

Definition at line 166 of file rwlock_queue.h.

void fawkes::RWLockQueue::push_locked ( const Type &  x)

Push element to queue with lock protection.

Parameters:
xelement to add

Definition at line 154 of file rwlock_queue.h.

ReadWriteLock * fawkes::RWLockQueue::rwlock ( ) const

Get access to the internal rwlock.

Can be used with RwlockLocker.

Returns:
internal rwlock

Definition at line 193 of file rwlock_queue.h.

bool fawkes::RWLockQueue::try_lock_for_read ( )

Try to lock queue for reading.

Returns:
true, if the lock has been aquired, false otherwise.

Definition at line 123 of file rwlock_queue.h.

bool fawkes::RWLockQueue::try_lock_for_write ( )

Try to lock queue for writing.

Returns:
true, if the lock has been aquired, false otherwise.

Definition at line 134 of file rwlock_queue.h.

void fawkes::RWLockQueue::unlock ( )

Unlock list.

Definition at line 143 of file rwlock_queue.h.


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