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 106 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 114 of file cptr.hpp.

115 : that ( cp.base ),
116 llock_ptr ( cp.llock )
117 {
118 }
T * that
Definition cptr.hpp:109
std::shared_ptr< M > llock_ptr
Definition cptr.hpp:111
std::shared_ptr< M > llock
Definition cptr.hpp:52
T * base
Definition cptr.hpp:54

◆ ~cptr_proxy()

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

Definition at line 125 of file cptr.hpp.

126 {
127 llock_ptr->unlock();
128 }

Member Function Documentation

◆ operator->()

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

Definition at line 120 of file cptr.hpp.

121 {
122 return that;
123 }

Member Data Documentation

◆ llock_ptr

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

Definition at line 111 of file cptr.hpp.

◆ that

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

Definition at line 109 of file cptr.hpp.


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