userver: concurrent::LockedPtr< Lock, Data > Class Template Reference
Loading...
Searching...
No Matches
concurrent::LockedPtr< Lock, Data > Class Template Referencefinal

#include <userver/concurrent/variable.hpp>

Detailed Description

template<typename Lock, typename Data>
class concurrent::LockedPtr< Lock, Data >

Proxy class for locked access to data protected with locking::SharedLock<T>

Definition at line 17 of file variable.hpp.

Public Types

using Mutex = typename Lock::mutex_type
 

Public Member Functions

 LockedPtr (Mutex &mutex, Data &data)
 
 LockedPtr (Lock &&lock, Data &data)
 
Data & operator* () &
 
const Data & operator* () const &
 
Data & operator* () &&
 Don't use *tmp for temporary value, store it to variable.
 
Data * operator-> () &
 
const Data * operator-> () const &
 
Data * operator-> () &&
 Don't use tmp-> for temporary value, store it to variable.
 
Lock & GetLock ()
 

Member Typedef Documentation

◆ Mutex

template<typename Lock , typename Data >
using concurrent::LockedPtr< Lock, Data >::Mutex = typename Lock::mutex_type

Definition at line 19 of file variable.hpp.

Constructor & Destructor Documentation

◆ LockedPtr() [1/2]

template<typename Lock , typename Data >
concurrent::LockedPtr< Lock, Data >::LockedPtr ( Mutex & mutex,
Data & data )
inline

Definition at line 21 of file variable.hpp.

◆ LockedPtr() [2/2]

template<typename Lock , typename Data >
concurrent::LockedPtr< Lock, Data >::LockedPtr ( Lock && lock,
Data & data )
inline

Definition at line 22 of file variable.hpp.

Member Function Documentation

◆ GetLock()

template<typename Lock , typename Data >
Lock & concurrent::LockedPtr< Lock, Data >::GetLock ( )
inline

Definition at line 36 of file variable.hpp.

◆ operator*() [1/3]

template<typename Lock , typename Data >
Data & concurrent::LockedPtr< Lock, Data >::operator* ( ) &
inline

Definition at line 24 of file variable.hpp.

◆ operator*() [2/3]

template<typename Lock , typename Data >
Data & concurrent::LockedPtr< Lock, Data >::operator* ( ) &&
inline

Don't use *tmp for temporary value, store it to variable.

Definition at line 28 of file variable.hpp.

◆ operator*() [3/3]

template<typename Lock , typename Data >
const Data & concurrent::LockedPtr< Lock, Data >::operator* ( ) const &
inline

Definition at line 25 of file variable.hpp.

◆ operator->() [1/3]

template<typename Lock , typename Data >
Data * concurrent::LockedPtr< Lock, Data >::operator-> ( ) &
inline

Definition at line 30 of file variable.hpp.

◆ operator->() [2/3]

template<typename Lock , typename Data >
Data * concurrent::LockedPtr< Lock, Data >::operator-> ( ) &&
inline

Don't use tmp-> for temporary value, store it to variable.

Definition at line 34 of file variable.hpp.

◆ operator->() [3/3]

template<typename Lock , typename Data >
const Data * concurrent::LockedPtr< Lock, Data >::operator-> ( ) const &
inline

Definition at line 31 of file variable.hpp.


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