YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::IntrusivePtr< T > Class Template Referencefinal

A intrusive pointer to objects with an embedded reference count. More...

#include <intrusive_ptr.hpp>

Inheritance diagram for yaclib::IntrusivePtr< T >:
[legend]

Public Member Functions

 IntrusivePtr () noexcept
 
 IntrusivePtr (T *other) noexcept
 
 IntrusivePtr (IntrusivePtr &&other) noexcept
 
 IntrusivePtr (const IntrusivePtr &other) noexcept
 
IntrusivePtroperator= (T *other) noexcept
 
IntrusivePtroperator= (IntrusivePtr &&other) noexcept
 
IntrusivePtroperator= (const IntrusivePtr &other) noexcept
 
template<typename U >
 IntrusivePtr (IntrusivePtr< U > &&other) noexcept
 
template<typename U >
 IntrusivePtr (const IntrusivePtr< U > &other) noexcept
 
template<typename U >
IntrusivePtroperator= (IntrusivePtr< U > &&other) noexcept
 
template<typename U >
IntrusivePtroperator= (const IntrusivePtr< U > &other) noexcept
 
 ~IntrusivePtr () noexcept
 
T * Get () const noexcept
 
T * Release () noexcept
 
 operator bool () const noexcept
 
T & operator* () const noexcept
 
T * operator-> () const noexcept
 
void Swap (IntrusivePtr &other) noexcept
 
 IntrusivePtr (NoRefTag, T *other) noexcept
 
void Reset (NoRefTag, T *other) noexcept
 
template<typename U >
IntrusivePtr< T > & operator= (IntrusivePtr< U > &&other) noexcept
 
template<typename U >
IntrusivePtr< T > & operator= (const IntrusivePtr< U > &other) noexcept
 

Friends

template<typename U >
class IntrusivePtr
 

Detailed Description

template<typename T>
class yaclib::IntrusivePtr< T >

A intrusive pointer to objects with an embedded reference count.

https://www.boost.org/doc/libs/1_77_0/libs/smart_ptr/doc/html/smart_ptr.html#intrusive_ptr

Definition at line 17 of file intrusive_ptr.hpp.

Constructor & Destructor Documentation

◆ IntrusivePtr() [1/7]

template<typename T >
yaclib::IntrusivePtr< T >::IntrusivePtr ( )
noexcept

Definition at line 8 of file intrusive_ptr_impl.hpp.

◆ IntrusivePtr() [2/7]

template<typename T >
yaclib::IntrusivePtr< T >::IntrusivePtr ( T *  other)
noexcept

Definition at line 12 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ IntrusivePtr() [3/7]

template<typename T >
yaclib::IntrusivePtr< T >::IntrusivePtr ( IntrusivePtr< T > &&  other)
noexcept

Definition at line 19 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ IntrusivePtr() [4/7]

template<typename T >
yaclib::IntrusivePtr< T >::IntrusivePtr ( const IntrusivePtr< T > &  other)
noexcept

Definition at line 24 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ IntrusivePtr() [5/7]

template<typename T >
template<typename U >
yaclib::IntrusivePtr< T >::IntrusivePtr ( IntrusivePtr< U > &&  other)
noexcept

Definition at line 48 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ IntrusivePtr() [6/7]

template<typename T >
template<typename U >
yaclib::IntrusivePtr< T >::IntrusivePtr ( const IntrusivePtr< U > &  other)
noexcept

Definition at line 54 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ ~IntrusivePtr()

template<typename T >
yaclib::IntrusivePtr< T >::~IntrusivePtr ( )
noexcept

Definition at line 71 of file intrusive_ptr_impl.hpp.

◆ IntrusivePtr() [7/7]

template<typename T >
yaclib::IntrusivePtr< T >::IntrusivePtr ( NoRefTag  ,
T *  other 
)
noexcept

Definition at line 114 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

Member Function Documentation

◆ Get()

template<typename T >
T * yaclib::IntrusivePtr< T >::Get ( ) const
noexcept

Definition at line 78 of file intrusive_ptr_impl.hpp.

Referenced by yaclib::operator==().

◆ operator bool()

template<typename T >
yaclib::IntrusivePtr< T >::operator bool ( ) const
explicitnoexcept

Definition at line 90 of file intrusive_ptr_impl.hpp.

◆ operator*()

template<typename T >
T & yaclib::IntrusivePtr< T >::operator* ( ) const
noexcept

Definition at line 95 of file intrusive_ptr_impl.hpp.

References YACLIB_ASSERT.

◆ operator->()

template<typename T >
T * yaclib::IntrusivePtr< T >::operator-> ( ) const
noexcept

Definition at line 101 of file intrusive_ptr_impl.hpp.

References YACLIB_ASSERT.

◆ operator=() [1/7]

template<typename T >
IntrusivePtr< T > & yaclib::IntrusivePtr< T >::operator= ( const IntrusivePtr< T > &  other)
noexcept

Definition at line 42 of file intrusive_ptr_impl.hpp.

◆ operator=() [2/7]

template<typename T >
template<typename U >
IntrusivePtr< T > & yaclib::IntrusivePtr< T >::operator= ( const IntrusivePtr< U > &  other)
noexcept

Definition at line 66 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ operator=() [3/7]

template<typename T >
template<typename U >
IntrusivePtr & yaclib::IntrusivePtr< T >::operator= ( const IntrusivePtr< U > &  other)
noexcept

◆ operator=() [4/7]

template<typename T >
IntrusivePtr< T > & yaclib::IntrusivePtr< T >::operator= ( IntrusivePtr< T > &&  other)
noexcept

Definition at line 36 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ operator=() [5/7]

template<typename T >
template<typename U >
IntrusivePtr< T > & yaclib::IntrusivePtr< T >::operator= ( IntrusivePtr< U > &&  other)
noexcept

◆ operator=() [6/7]

template<typename T >
template<typename U >
IntrusivePtr & yaclib::IntrusivePtr< T >::operator= ( IntrusivePtr< U > &&  other)
noexcept

◆ operator=() [7/7]

template<typename T >
IntrusivePtr< T > & yaclib::IntrusivePtr< T >::operator= ( T *  other)
noexcept

Definition at line 28 of file intrusive_ptr_impl.hpp.

◆ Release()

◆ Reset()

template<typename T >
void yaclib::IntrusivePtr< T >::Reset ( NoRefTag  ,
T *  other 
)
noexcept

Definition at line 118 of file intrusive_ptr_impl.hpp.

References yaclib::MakeContract().

◆ Swap()

Friends And Related Symbol Documentation

◆ IntrusivePtr

template<typename T >
template<typename U >
friend class IntrusivePtr
friend

Definition at line 58 of file intrusive_ptr.hpp.


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