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 115 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 128 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::register_for_raw_camera(), FvBaseThread::release_camctrl(), fawkes::LockList< ClientData >::remove_locked(), fawkes::ThreadManager::set_inifin(), 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(), fawkes::LockList< ClientData >::~LockList(), fawkes::PluginManager::~PluginManager(), and fawkes::PluginNetworkHandler::~PluginNetworkHandler().
RefPtr< Mutex > fawkes::LockList< Type >::mutex | ( | ) | const |
Get access to the internal mutex.
Can be used with MutexLocker.
Definition at line 182 of file lock_list.h.
Referenced by LaserPointCloudThread::bb_interface_reader_removed(), fawkes::BlackBoardInterfaceListMaintainer::BlackBoardInterfaceListMaintainer(), NavGraphClustersThread::blocked_edges_centroids(), LaserPointCloudThread::loop(), NavGraphClustersThread::loop(), fawkes::OpenPRSServerProxy::transmit_command(), fawkes::OpenPRSServerProxy::transmit_command_f(), fawkes::OpenPRSServerProxy::transmit_command_v(), fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer(), and fawkes::LockList< ClientData >::~LockList().
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 190 of file lock_list.h.
Referenced by fawkes::ThreadList::operator=(), and fawkes::LockList< ClientData >::~LockList().
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 208 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 152 of file lock_list.h.
Referenced by fawkes::FileAlterationMonitor::add_filter(), fawkes::ConfigNetworkHandler::loop(), NavGraphClustersThread::loop(), fawkes::AvahiThread::resolve_address(), fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer(), and fawkes::LockList< ClientData >::~LockList().
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 162 of file lock_list.h.
Referenced by fawkes::LockList< ClientData >::~LockList().
void fawkes::LockList< Type >::remove_locked | ( | const Type & | x | ) |
Remove element from list with lock protection.
x | element to remove |
Definition at line 172 of file lock_list.h.
Referenced by fawkes::PluginNetworkHandler::client_disconnected(), fawkes::NetworkLogger::client_disconnected(), fawkes::PluginNetworkHandler::loop(), fawkes::AvahiThread::resolve_address(), and fawkes::LockList< ClientData >::~LockList().
|
virtual |
Try to lock list.
Definition at line 136 of file lock_list.h.
Referenced by fawkes::LockList< ClientData >::try_lock(), and fawkes::LockList< ClientData >::~LockList().
|
virtual |
Unlock list.
Definition at line 144 of file lock_list.h.
Referenced by LaserPointCloudThread::bb_interface_reader_removed(), 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(), NavGraphClustersThread::loop(), fawkes::PluginNetworkHandler::loop(), FvBaseThread::register_for_raw_camera(), FvBaseThread::release_camctrl(), fawkes::ThreadManager::set_inifin(), 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(), fawkes::BlackBoardInterfaceListMaintainer::~BlackBoardInterfaceListMaintainer(), fawkes::LockList< ClientData >::~LockList(), fawkes::PluginManager::~PluginManager(), and fawkes::PluginNetworkHandler::~PluginNetworkHandler().