DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
cptr_proxy< T, M > Class Template Reference

#include <cptr.hpp>

Public Member Functions

 cptr_proxy (cptr< T, M > const &cp)
T * operator-> ()
 ~cptr_proxy ()

Private Attributes

T * that
std::shared_ptr< M > llock_ptr

Detailed Description

template<typename T, typename M>
class cptr_proxy< T, M >

This is a proxy class of the concurrent pointer, the object is returned only by the arrow operator of class cptr. This results in a temporary object, which once destroyed release the mutex locked in cptr class by the arrow operator.

This class is not supposed to be used directly.

Definition at line 104 of file cptr.hpp.

Constructor & Destructor Documentation

◆ cptr_proxy()

template<typename T, typename M>
cptr_proxy< T, M >::cptr_proxy ( cptr< T, M > const & cp)
inline

Definition at line 112 of file cptr.hpp.

113 : that(cp.base)
114 , llock_ptr(cp.llock)
115 {
116 }
T * that
Definition cptr.hpp:107
std::shared_ptr< M > llock_ptr
Definition cptr.hpp:109

◆ ~cptr_proxy()

template<typename T, typename M>
cptr_proxy< T, M >::~cptr_proxy ( )
inline

Definition at line 120 of file cptr.hpp.

120{ llock_ptr->unlock(); }

Member Function Documentation

◆ operator->()

template<typename T, typename M>
T * cptr_proxy< T, M >::operator-> ( )
inline

Definition at line 118 of file cptr.hpp.

118{ return that; }

Member Data Documentation

◆ llock_ptr

template<typename T, typename M>
std::shared_ptr<M> cptr_proxy< T, M >::llock_ptr
private

Definition at line 109 of file cptr.hpp.

◆ that

template<typename T, typename M>
T* cptr_proxy< T, M >::that
private

Definition at line 107 of file cptr.hpp.


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