List with a lock. More...
#include <>>
Public Member Functions | |
LockList () | |
Constructor. | |
LockList (const LockList< Type > &ll) | |
Copy constructor. | |
virtual | ~LockList () |
Destructor. | |
virtual void | lock () const |
Lock list. | |
virtual bool | try_lock () const |
Try to lock list. | |
virtual void | unlock () const |
Unlock list. | |
RefPtr< Mutex > | mutex () const |
Get access to the internal mutex. | |
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. | |
LockList< Type > & | operator= (const LockList< Type > &ll) |
Copy values from another LockList. | |
LockList< Type > & | operator= (const std::list< Type > &l) |
Copy values from a standard list. |
List with a lock.
This class provides a list that has an intrinsic lock. The lock can be applied with the regular locking methods.
Definition at line 35 of file lock_list.h.
fawkes::LockList< Type >::LockList | ( | ) |
Constructor.
Definition at line 71 of file lock_list.h.
fawkes::LockList< Type >::LockList | ( | const LockList< Type > & | ll | ) |
fawkes::LockList< Type >::~LockList | ( | ) | [virtual] |
Destructor.
Definition at line 87 of file lock_list.h.
void fawkes::LockList< Type >::lock | ( | ) | const [virtual] |
Lock list.
Definition at line 94 of file lock_list.h.
Referenced by firevision::FuseImageListWidget::add_fountain_service(), fawkes::WorldInfoTransceiver::add_handler(), fawkes::PluginManager::add_listener(), fawkes::WorldInfoDataContainer::check_timeout(), fawkes::ConfigNetworkHandler::client_disconnected(), fawkes::ConfigNetworkHandler::config_comment_changed(), fawkes::ConfigNetworkHandler::config_value_changed(), fawkes::ConfigNetworkHandler::config_value_erased(), fawkes::PluginManager::fam_event(), FawkesThreadManager::force_remove(), fawkes::WorldInfoDataContainer::get_timedout_hosts(), fawkes::NetworkLogger::handle_network_message(), fawkes::PluginNetworkHandler::loop(), fawkes::LockList< Type >::operator=(), fawkes::WorldInfoTransceiver::recv(), FvBaseThread::release_camctrl(), firevision::FuseImageListWidget::~FuseImageListWidget(), fawkes::PluginManager::~PluginManager(), and WorldModelObjPosAverageFuser::~WorldModelObjPosAverageFuser().
RefPtr< Mutex > fawkes::LockList< Type >::mutex | ( | ) | const |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 165 of file lock_list.h.
LockList< Type > & fawkes::LockList< Type >::operator= | ( | const std::list< Type > & | l | ) |
Copy values from a standard list.
Copies the values one by one. This instance is locked during the copying and cleared.
l | list to copy |
Definition at line 203 of file lock_list.h.
LockList< Type > & fawkes::LockList< Type >::operator= | ( | const LockList< Type > & | ll | ) |
Copy values from another LockList.
Copies the values one by one. Both instances are locked during the copying and this instance is cleared before copying.
ll | list to copy |
Definition at line 179 of file lock_list.h.
References fawkes::LockList< Type >::lock(), and fawkes::LockList< Type >::unlock().
void fawkes::LockList< Type >::push_back_locked | ( | const Type & | x | ) |
Push element to list at back with lock protection.
x | element to add |
Definition at line 125 of file lock_list.h.
Referenced by fawkes::FileAlterationMonitor::add_filter(), firevision::FuseImageListWidget::add_fountain_service(), fawkes::FileAlterationMonitor::add_listener(), fawkes::Thread::add_notification_listener(), fawkes::LuaContext::add_watcher(), and fawkes::ConfigNetworkHandler::loop().
void fawkes::LockList< Type >::push_front_locked | ( | const Type & | x | ) |
Push element to list at front with lock protection.
x | element to add |
Definition at line 138 of file lock_list.h.
void fawkes::LockList< Type >::remove_locked | ( | const Type & | x | ) |
Remove element from list with lock protection.
x | element to remove |
Definition at line 151 of file lock_list.h.
Referenced by fawkes::NetworkLogger::client_disconnected(), fawkes::PluginNetworkHandler::loop(), fawkes::WorldInfoTransceiver::rem_handler(), fawkes::FileAlterationMonitor::remove_listener(), fawkes::PluginManager::remove_listener(), fawkes::Thread::remove_notification_listener(), and fawkes::LuaContext::remove_watcher().
bool fawkes::LockList< Type >::try_lock | ( | ) | const [virtual] |
Try to lock list.
Definition at line 105 of file lock_list.h.
void fawkes::LockList< Type >::unlock | ( | ) | const [virtual] |
Unlock list.
Definition at line 114 of file lock_list.h.
Referenced by firevision::FuseImageListWidget::add_fountain_service(), fawkes::WorldInfoTransceiver::add_handler(), fawkes::PluginManager::add_listener(), fawkes::WorldInfoDataContainer::check_timeout(), fawkes::ConfigNetworkHandler::client_disconnected(), fawkes::ConfigNetworkHandler::config_comment_changed(), fawkes::ConfigNetworkHandler::config_value_changed(), fawkes::ConfigNetworkHandler::config_value_erased(), fawkes::PluginManager::fam_event(), FawkesThreadManager::force_remove(), fawkes::WorldInfoDataContainer::get_timedout_hosts(), fawkes::NetworkLogger::handle_network_message(), fawkes::PluginNetworkHandler::loop(), fawkes::LockList< Type >::operator=(), fawkes::WorldInfoTransceiver::recv(), FvBaseThread::release_camctrl(), firevision::FuseImageListWidget::~FuseImageListWidget(), fawkes::PluginManager::~PluginManager(), and WorldModelObjPosAverageFuser::~WorldModelObjPosAverageFuser().