fawkes::RWLockList< Type > Class Template Reference
[Fawkes Core Library]
List with a read/write lock.
More...
#include <core/utils/rwlock_list.h>

Public Member Functions | |
| RWLockList () | |
| Constructor. | |
| RWLockList (const RWLockList< Type > &ll) | |
| Copy constructor. | |
| virtual | ~RWLockList () |
| Destructor. | |
| virtual void | lock_for_read () |
| Lock list for reading. | |
| virtual void | lock_for_write () |
| Lock list for writing. | |
| virtual bool | try_lock_for_read () |
| Try to lock list for reading. | |
| virtual bool | try_lock_for_write () |
| Try to lock list for writing. | |
| virtual void | unlock () |
| Unlock list. | |
| RefPtr< ReadWriteLock > | rwlock () const |
| Get access to the internal read/write lock. | |
| void | push_back_locked (const Type &x) |
| Push element to list at back with lock protection. | |
| void | push_front_locked (const Type &x) |
| Push element to list at front with lock protection. | |
| void | remove_locked (const Type &x) |
| Remove element from list with lock protection. | |
| RWLockList< Type > & | operator= (const RWLockList< Type > &ll) |
| Copy values from another RWLockList. | |
| RWLockList< Type > & | operator= (const std::list< Type > &l) |
| Copy values from a standard list. | |
Detailed Description
template<typename Type>
class fawkes::RWLockList< Type >
List with a read/write lock.
This class provides a list 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_list.h.
Constructor & Destructor Documentation
| fawkes::RWLockList< Type >::RWLockList | ( | ) | [inline] |
| fawkes::RWLockList< Type >::RWLockList | ( | const RWLockList< Type > & | ll | ) | [inline] |
| fawkes::RWLockList< Type >::~RWLockList | ( | ) | [inline, virtual] |
Member Function Documentation
| void fawkes::RWLockList< Type >::lock_for_read | ( | ) | [inline, virtual] |
Lock list for reading.
Definition at line 96 of file rwlock_list.h.
Referenced by fawkes::RWLockList< Type >::operator=().
| void fawkes::RWLockList< Type >::lock_for_write | ( | ) | [inline, virtual] |
| RWLockList< Type > & fawkes::RWLockList< Type >::operator= | ( | const std::list< Type > & | l | ) | [inline] |
Copy values from a standard list.
Copies the values one by one. This instance is locked during the copying and cleared.
- Parameters:
-
l list to copy
- Returns:
- reference to this instance
Definition at line 224 of file rwlock_list.h.
| RWLockList< Type > & fawkes::RWLockList< Type >::operator= | ( | const RWLockList< Type > & | ll | ) | [inline] |
Copy values from another RWLockList.
Copies the values one by one. Both instances are locked during the copying and this instance is cleared before copying.
- Parameters:
-
ll list to copy
- Returns:
- reference to this instance
Definition at line 200 of file rwlock_list.h.
References fawkes::RWLockList< Type >::lock_for_read(), and fawkes::RWLockList< Type >::unlock().
| void fawkes::RWLockList< Type >::push_back_locked | ( | const Type & | x | ) | [inline] |
Push element to list at back with lock protection.
- Parameters:
-
x element to add
Definition at line 147 of file rwlock_list.h.
| void fawkes::RWLockList< Type >::push_front_locked | ( | const Type & | x | ) | [inline] |
Push element to list at front with lock protection.
- Parameters:
-
x element to add
Definition at line 160 of file rwlock_list.h.
| void fawkes::RWLockList< Type >::remove_locked | ( | const Type & | x | ) | [inline] |
Remove element from list with lock protection.
- Parameters:
-
x element to remove
Definition at line 173 of file rwlock_list.h.
| RefPtr< ReadWriteLock > fawkes::RWLockList< Type >::rwlock | ( | ) | const [inline] |
Get access to the internal read/write lock.
- Returns:
- internal rwlock
Definition at line 186 of file rwlock_list.h.
| bool fawkes::RWLockList< Type >::try_lock_for_read | ( | ) | [inline, virtual] |
Try to lock list for reading.
- Returns:
- true, if the lock has been aquired, false otherwise.
Definition at line 116 of file rwlock_list.h.
| bool fawkes::RWLockList< Type >::try_lock_for_write | ( | ) | [inline, virtual] |
Try to lock list for writing.
- Returns:
- true, if the lock has been aquired, false otherwise.
Definition at line 127 of file rwlock_list.h.
| void fawkes::RWLockList< Type >::unlock | ( | ) | [inline, virtual] |
Unlock list.
Definition at line 136 of file rwlock_list.h.
Referenced by fawkes::RWLockList< Type >::operator=().
The documentation for this class was generated from the following file:
- src/libs/core/utils/rwlock_list.h

