CARLA
Public Member Functions | Private Attributes | List of all members
carla::AtomicSharedPtr< T > Class Template Reference

A very simple atomic shared ptr with release-acquire memory order. More...

#include <AtomicSharedPtr.h>

+ Inheritance diagram for carla::AtomicSharedPtr< T >:
+ Collaboration diagram for carla::AtomicSharedPtr< T >:

Public Member Functions

template<typename... Args>
 AtomicSharedPtr (Args &&... args)
 
 AtomicSharedPtr (const AtomicSharedPtr &rhs)
 
 AtomicSharedPtr (AtomicSharedPtr &&)=delete
 
bool compare_exchange (std::shared_ptr< T > *expected, std::shared_ptr< T > desired) noexcept
 
std::shared_ptr< T > load () const noexcept
 
AtomicSharedPtroperator= (std::shared_ptr< T > ptr) noexcept
 
AtomicSharedPtroperator= (const AtomicSharedPtr &rhs) noexcept
 
AtomicSharedPtroperator= (AtomicSharedPtr &&)=delete
 
void reset (std::shared_ptr< T > ptr=nullptr) noexcept
 
void store (std::shared_ptr< T > ptr) noexcept
 

Private Attributes

std::shared_ptr< T > _ptr
 

Detailed Description

template<typename T>
class carla::AtomicSharedPtr< T >

A very simple atomic shared ptr with release-acquire memory order.

Definition at line 15 of file AtomicSharedPtr.h.

Constructor & Destructor Documentation

◆ AtomicSharedPtr() [1/3]

template<typename T>
template<typename... Args>
carla::AtomicSharedPtr< T >::AtomicSharedPtr ( Args &&...  args)
inlineexplicit

Definition at line 19 of file AtomicSharedPtr.h.

Referenced by carla::AtomicSharedPtr< const ListT >::AtomicSharedPtr().

+ Here is the caller graph for this function:

◆ AtomicSharedPtr() [2/3]

template<typename T>
carla::AtomicSharedPtr< T >::AtomicSharedPtr ( const AtomicSharedPtr< T > &  rhs)
inline

Definition at line 22 of file AtomicSharedPtr.h.

◆ AtomicSharedPtr() [3/3]

template<typename T>
carla::AtomicSharedPtr< T >::AtomicSharedPtr ( AtomicSharedPtr< T > &&  )
delete

Member Function Documentation

◆ compare_exchange()

template<typename T>
bool carla::AtomicSharedPtr< T >::compare_exchange ( std::shared_ptr< T > *  expected,
std::shared_ptr< T >  desired 
)
inlinenoexcept

Definition at line 39 of file AtomicSharedPtr.h.

◆ load()

template<typename T>
std::shared_ptr<T> carla::AtomicSharedPtr< T >::load ( ) const
inlinenoexcept

Definition at line 35 of file AtomicSharedPtr.h.

Referenced by carla::client::detail::Load(), and carla::client::detail::AtomicList< carla::client::detail::CallbackList::Item >::Load().

+ Here is the caller graph for this function:

◆ operator=() [1/3]

template<typename T>
AtomicSharedPtr& carla::AtomicSharedPtr< T >::operator= ( std::shared_ptr< T >  ptr)
inlinenoexcept

Definition at line 48 of file AtomicSharedPtr.h.

Referenced by carla::AtomicSharedPtr< const ListT >::operator=().

+ Here is the caller graph for this function:

◆ operator=() [2/3]

template<typename T>
AtomicSharedPtr& carla::AtomicSharedPtr< T >::operator= ( const AtomicSharedPtr< T > &  rhs)
inlinenoexcept

Definition at line 53 of file AtomicSharedPtr.h.

◆ operator=() [3/3]

template<typename T>
AtomicSharedPtr& carla::AtomicSharedPtr< T >::operator= ( AtomicSharedPtr< T > &&  )
delete

◆ reset()

template<typename T>
void carla::AtomicSharedPtr< T >::reset ( std::shared_ptr< T >  ptr = nullptr)
inlinenoexcept

Definition at line 31 of file AtomicSharedPtr.h.

◆ store()

template<typename T>
void carla::AtomicSharedPtr< T >::store ( std::shared_ptr< T >  ptr)
inlinenoexcept

Definition at line 27 of file AtomicSharedPtr.h.

Referenced by carla::AtomicSharedPtr< const ListT >::operator=(), and carla::AtomicSharedPtr< const ListT >::reset().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _ptr

template<typename T>
std::shared_ptr<T> carla::AtomicSharedPtr< T >::_ptr
private

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