Fawkes API  Fawkes Development Version
fawkes::LockList< Type > Class Template Reference

List with a lock. More...

#include <>>

Inheritance diagram for fawkes::LockList< Type >:

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< Mutexmutex () 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...
 

Detailed Description

template<typename Type>
class fawkes::LockList< Type >

List with a lock.

This class provides a list that has an intrinsic lock. The lock can be applied with the regular locking methods.

See also
Mutex
Author
Tim Niemueller

Definition at line 40 of file thread.h.

Constructor & Destructor Documentation

◆ LockList() [1/2]

template<typename Type >
fawkes::LockList< Type >::LockList ( )

Constructor.

Definition at line 115 of file lock_list.h.

◆ LockList() [2/2]

template<typename Type>
fawkes::LockList< Type >::LockList ( const LockList< Type > &  ll)

Copy constructor.

Parameters
llLockList to copy

Definition at line 121 of file lock_list.h.

◆ ~LockList()

template<typename Type>
virtual fawkes::LockList< Type >::~LockList ( )
inlinevirtual

Destructor.

Definition at line 56 of file lock_list.h.

Member Function Documentation

◆ lock()

template<typename Type >
void fawkes::LockList< Type >::lock ( ) const
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().

◆ mutex()

◆ operator=() [1/2]

template<typename Type>
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.

Parameters
lllist to copy
Returns
reference to this instance

Definition at line 190 of file lock_list.h.

Referenced by fawkes::ThreadList::operator=(), and fawkes::LockList< ClientData >::~LockList().

◆ operator=() [2/2]

template<typename Type>
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.

Parameters
llist to copy
Returns
reference to this instance

Definition at line 208 of file lock_list.h.

◆ push_back_locked()

template<typename Type>
void fawkes::LockList< Type >::push_back_locked ( const Type &  x)

◆ push_front_locked()

template<typename Type>
void fawkes::LockList< Type >::push_front_locked ( const Type &  x)

Push element to list at front with lock protection.

Parameters
xelement to add

Definition at line 162 of file lock_list.h.

Referenced by fawkes::LockList< ClientData >::~LockList().

◆ remove_locked()

template<typename Type>
void fawkes::LockList< Type >::remove_locked ( const Type &  x)

◆ try_lock()

template<typename Type >
bool fawkes::LockList< Type >::try_lock ( ) const
virtual

Try to lock list.

Returns
true, if the lock has been aquired, false otherwise.

Definition at line 136 of file lock_list.h.

Referenced by fawkes::LockList< ClientData >::try_lock(), and fawkes::LockList< ClientData >::~LockList().

◆ unlock()

template<typename Type >
void fawkes::LockList< Type >::unlock ( ) const
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().


The documentation for this class was generated from the following files: