fawkes::RWLockQueue< Type > Class Template Reference
[Fawkes Core Library]
Queue with a read/write lock.
More...
#include <core/utils/rwlock_queue.h>
Inheritance diagram for fawkes::RWLockQueue< Type >:

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< ReadWriteLock > | rwlock () 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
template<typename Type>
class fawkes::RWLockQueue< Type >
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
Definition at line 35 of file rwlock_queue.h.
Constructor & Destructor Documentation
template<typename Type >
| fawkes::RWLockQueue< Type >::RWLockQueue | ( | ) | [inline] |
template<typename Type >
| fawkes::RWLockQueue< Type >::RWLockQueue | ( | const RWLockQueue< Type > & | ll | ) | [inline] |
template<typename Type >
| fawkes::RWLockQueue< Type >::~RWLockQueue | ( | ) | [inline, virtual] |
Member Function Documentation
template<typename Type >
| void fawkes::RWLockQueue< Type >::clear | ( | void | ) | [inline] |
template<typename Type >
| void fawkes::RWLockQueue< Type >::lock_for_read | ( | ) | [inline] |
template<typename Type >
| void fawkes::RWLockQueue< Type >::lock_for_write | ( | ) | [inline] |
template<typename Type >
| void fawkes::RWLockQueue< Type >::pop_locked | ( | ) | [inline] |
template<typename Type >
| void fawkes::RWLockQueue< Type >::push_locked | ( | const Type & | x | ) | [inline] |
Push element to queue with lock protection.
- Parameters:
-
x element to add
Definition at line 154 of file rwlock_queue.h.
template<typename Type >
| ReadWriteLock * fawkes::RWLockQueue< Type >::rwlock | ( | ) | const [inline] |
Get access to the internal rwlock.
Can be used with RwlockLocker.
- Returns:
- internal rwlock
Definition at line 193 of file rwlock_queue.h.
template<typename Type >
| bool fawkes::RWLockQueue< Type >::try_lock_for_read | ( | ) | [inline] |
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.
template<typename Type >
| bool fawkes::RWLockQueue< Type >::try_lock_for_write | ( | ) | [inline] |
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.
template<typename Type >
| void fawkes::RWLockQueue< Type >::unlock | ( | ) | [inline] |
The documentation for this class was generated from the following file:
- src/libs/core/utils/rwlock_queue.h

