Fawkes API
Fawkes Development Version
|
List with a lock. More...
#include <>>
Public Member Functions | |
LockList () | |
Constructor. More... | |
LockList (const LockList< Type > &ll) | |
Copy constructor. More... | |
virtual | ~LockList () |
Destructor. More... | |
virtual void | lock () const |
Lock list. More... | |
virtual bool | try_lock () const |
Try to lock list. More... | |
virtual void | unlock () const |
Unlock list. More... | |
RefPtr< Mutex > | mutex () const |
Get access to the internal mutex. More... | |
void | push_back_locked (const Type &x) |
Push element to list at back with lock protection. More... | |
void | push_front_locked (const Type &x) |
Push element to list at front with lock protection. More... | |
void | remove_locked (const Type &x) |
Remove element from list with lock protection. More... | |
LockList< Type > & | operator= (const LockList< Type > &ll) |
Copy values from another LockList. More... | |
LockList< Type > & | operator= (const std::list< Type > &l) |
Copy values from a standard list. More... | |
List with a lock.
This class provides a list that has an intrinsic lock. The lock can be applied with the regular locking methods.
fawkes::LockList< Type >::LockList | ( | ) |
Constructor.
Definition at line 113 of file lock_list.h.
fawkes::LockList< Type >::LockList | ( | const LockList< Type > & | ll | ) |
|
inlinevirtual |
Destructor.
Definition at line 56 of file lock_list.h.
|
virtual |
Lock list.
Definition at line 124 of file lock_list.h.
Referenced by fawkes::ConfigNetworkHandler::client_disconnected(), fawkes::ConfigNetworkHandler::config_value_changed(), fawkes::PluginManager::config_value_changed(), fawkes::ConfigNetworkHandler::config_value_erased(), fawkes::PluginManager::config_value_erased(), fawkes::PluginManager::fam_event(), FvBaseThread::finalize(), fawkes::ThreadManager::force_remove(), fawkes::NetworkLogger::handle_network_message(), fawkes::PluginManager::init_pinfo_cache(), fawkes::LockList< ClientData >::lock(), fawkes::BlackBoardInterfaceListMaintainer::lock_and_get_list(), fawkes::NetworkLogger::log_debug(), fawkes::NetworkLogger::log_error(), fawkes::NetworkLogger::log_info(), fawkes::NetworkLogger::log_warn(), fawkes::PluginNetworkHandler::loop(), fawkes::LockList< ClientData >::operator=(), fawkes::LockList< ClientData >::push_back_locked(), fawkes::LockList< ClientData >::push_front_locked(), FvBaseThread::release_camctrl(), fawkes::LockList< ClientData >::remove_locked(), fawkes::NetworkLogger::tlog_debug(), fawkes::NetworkLogger::tlog_error(), fawkes::NetworkLogger::tlog_info(), fawkes::NetworkLogger::tlog_warn(), fawkes::NetworkLogger::vlog_debug(), fawkes::NetworkLogger::vlog_error(), fawkes::NetworkLogger::vlog_info(), fawkes::NetworkLogger::vlog_warn(), fawkes::NetworkLogger::vtlog_debug(), fawkes::NetworkLogger::vtlog_error(), fawkes::NetworkLogger::vtlog_info(), fawkes::NetworkLogger::vtlog_warn(), and fawkes::PluginManager::~PluginManager().
RefPtr< Mutex > fawkes::LockList< Type >::mutex | ( | ) | const |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 172 of file lock_list.h.
Referenced by fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), NavGraphClustersThread::blocked_edges_centroids(), LaserPointCloudThread::loop(), fawkes::OpenPRSServerProxy::transmit_command(), fawkes::OpenPRSServerProxy::transmit_command_f(), fawkes::OpenPRSServerProxy::transmit_command_v(), and fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer().
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.
Referenced by fawkes::ThreadList::operator=().
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 196 of file lock_list.h.
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 145 of file lock_list.h.
Referenced by fawkes::FileAlterationMonitor::add_filter(), 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 154 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 163 of file lock_list.h.
Referenced by fawkes::PluginNetworkHandler::client_disconnected(), fawkes::NetworkLogger::client_disconnected(), and fawkes::PluginNetworkHandler::loop().
|
virtual |
Try to lock list.
Definition at line 131 of file lock_list.h.
Referenced by fawkes::LockList< ClientData >::try_lock().
|
virtual |
Unlock list.
Definition at line 138 of file lock_list.h.
Referenced by fawkes::ConfigNetworkHandler::client_disconnected(), fawkes::ConfigNetworkHandler::config_value_changed(), fawkes::PluginManager::config_value_changed(), fawkes::ConfigNetworkHandler::config_value_erased(), fawkes::PluginManager::config_value_erased(), fawkes::PluginManager::fam_event(), FvBaseThread::finalize(), fawkes::ThreadManager::force_remove(), fawkes::NetworkLogger::handle_network_message(), fawkes::PluginManager::init_pinfo_cache(), fawkes::NetworkLogger::log_debug(), fawkes::NetworkLogger::log_error(), fawkes::NetworkLogger::log_info(), fawkes::NetworkLogger::log_warn(), fawkes::PluginNetworkHandler::loop(), FvBaseThread::release_camctrl(), fawkes::NetworkLogger::tlog_debug(), fawkes::NetworkLogger::tlog_error(), fawkes::NetworkLogger::tlog_info(), fawkes::NetworkLogger::tlog_warn(), fawkes::LockList< ClientData >::unlock(), fawkes::BlackBoardInterfaceListMaintainer::unlock_list(), fawkes::NetworkLogger::vlog_debug(), fawkes::NetworkLogger::vlog_error(), fawkes::NetworkLogger::vlog_info(), fawkes::NetworkLogger::vlog_warn(), fawkes::NetworkLogger::vtlog_debug(), fawkes::NetworkLogger::vtlog_error(), fawkes::NetworkLogger::vtlog_info(), fawkes::NetworkLogger::vtlog_warn(), and fawkes::PluginManager::~PluginManager().