Public Member Functions | Private Attributes | List of all members
boost::threadpool::detail::locking_ptr< T, Mutex > Class Template Reference

Smart pointer with a scoped locking mechanism. More...

#include <locking_ptr.hpp>

Inheritance diagram for boost::threadpool::detail::locking_ptr< T, Mutex >:
Inheritance graph
[legend]

Public Member Functions

 locking_ptr (volatile T &obj, const volatile Mutex &mtx)
 Constructor. More...
 
T & operator* () const
 
T * operator-> () const
 
 ~locking_ptr ()
 Destructor. More...
 

Private Attributes

Mutex & m_mutex
 Mutex is used for scoped locking. More...
 
T * m_obj
 The instance pointer. More...
 

Detailed Description

template<typename T, typename Mutex>
class boost::threadpool::detail::locking_ptr< T, Mutex >

Smart pointer with a scoped locking mechanism.

This class is a wrapper for a volatile pointer. It enables synchronized access to the internal pointer by locking the passed mutex.

Definition at line 37 of file locking_ptr.hpp.

Constructor & Destructor Documentation

template<typename T, typename Mutex>
boost::threadpool::detail::locking_ptr< T, Mutex >::locking_ptr ( volatile T &  obj,
const volatile Mutex &  mtx 
)
inline

Constructor.

Definition at line 45 of file locking_ptr.hpp.

template<typename T, typename Mutex>
boost::threadpool::detail::locking_ptr< T, Mutex >::~locking_ptr ( )
inline

Destructor.

Definition at line 55 of file locking_ptr.hpp.

Member Function Documentation

template<typename T, typename Mutex>
T& boost::threadpool::detail::locking_ptr< T, Mutex >::operator* ( ) const
inline

Returns a reference to the stored instance.

Returns
The instance's reference.

Definition at line 65 of file locking_ptr.hpp.

template<typename T, typename Mutex>
T* boost::threadpool::detail::locking_ptr< T, Mutex >::operator-> ( ) const
inline

Returns a pointer to the stored instance.

Returns
The instance's pointer.

Definition at line 74 of file locking_ptr.hpp.

Member Data Documentation

template<typename T, typename Mutex>
Mutex& boost::threadpool::detail::locking_ptr< T, Mutex >::m_mutex
private

Mutex is used for scoped locking.

Definition at line 41 of file locking_ptr.hpp.

template<typename T, typename Mutex>
T* boost::threadpool::detail::locking_ptr< T, Mutex >::m_obj
private

The instance pointer.

Definition at line 40 of file locking_ptr.hpp.


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


asr_descriptor_surface_based_recognition
Author(s): Allgeyer Tobias, Hutmacher Robin, Mei├čner Pascal
autogenerated on Mon Dec 16 2019 03:31:16