Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
local_shared_ptr< X, Y > Class Template Reference

This class provides non-reentrant interfaces for atomic_shared_ptr: operator->(), operator*() and so on.
Use this class in non-reentrant scopes instead of costly atomic_shared_ptr. More...

#include <atomic_smart_ptr.h>

Inheritance diagram for local_shared_ptr< X, Y >:
Inheritance graph
[legend]

Public Member Functions

template<typename Y >
 local_shared_ptr (Y *y)
 
template<typename Y , typename D >
 local_shared_ptr (Y *y, D deleter)
 
 local_shared_ptr (const atomic_shared_ptr< T > &t) noexcept
 
template<typename Y >
 local_shared_ptr (const atomic_shared_ptr< Y > &y)
 
 local_shared_ptr (const local_shared_ptr< T, reflocal_var_t > &t) noexcept
 
template<typename Y , typename Z >
 local_shared_ptr (const local_shared_ptr< Y, Z > &y) noexcept
 
 local_shared_ptr (local_shared_ptr< T, reflocal_var_t > &&t) noexcept
 
template<typename Y , typename Z >
 local_shared_ptr (local_shared_ptr< Y, Z > &&y) noexcept
 
local_shared_ptroperator= (const local_shared_ptr &t) noexcept
 
template<typename Y , typename Z >
local_shared_ptroperator= (const local_shared_ptr< Y, Z > &y) noexcept
 
local_shared_ptroperator= (local_shared_ptr &&t) noexcept
 
template<typename Y , typename Z >
local_shared_ptroperator= (local_shared_ptr< Y, Z > &&y) noexcept
 
local_shared_ptroperator= (const atomic_shared_ptr< T > &t) noexcept
 
template<typename Y >
local_shared_ptroperator= (const atomic_shared_ptr< Y > &y) noexcept
 
void swap (local_shared_ptr &x) noexcept
 
void swap (atomic_shared_ptr< T > &x) noexcept
 
void reset () noexcept
 The pointer held by this instance is reset to null pointer.
 
template<typename Y >
void reset (Y *y)
 The pointer held by this instance is reset with a pointer y.
 
template<typename Y , typename D >
void reset (Y *y, D deleter)
 
T * get () noexcept
 
const T * get () const noexcept
 
T & operator* () noexcept
 
const T & operator* () const noexcept
 
T * operator-> () noexcept
 
const T * operator-> () const noexcept
 
bool operator! () const noexcept
 
 operator bool () const noexcept
 
template<typename Y , typename Z >
bool operator== (const local_shared_ptr< Y, Z > &x) const noexcept
 
template<typename Y >
bool operator== (const atomic_shared_ptr< Y > &x) const noexcept
 
template<typename Y , typename Z >
bool operator!= (const local_shared_ptr< Y, Z > &x) const noexcept
 
template<typename Y >
bool operator!= (const atomic_shared_ptr< Y > &x) const noexcept
 
int use_count () const noexcept
 
bool unique () const noexcept
 
template<typename T , typename reflocal_var_t >
 local_shared_ptr (const local_shared_ptr &y) noexcept
 
template<typename Y , typename Z >
 local_shared_ptr (const local_shared_ptr< Y, Z > &y) noexcept
 

Protected Types

typedef atomic_shared_ptr_base
< T, uintptr_t, reflocal_var_t >
::Ref 
Ref
 
typedef atomic_shared_ptr_base
< T, uintptr_t, reflocal_var_t >
::Refcnt 
Refcnt
 
typedef uintptr_t RefLocal_
 

Protected Member Functions

Ref * pref_ () const noexcept
 A pointer to global reference struct.
 

Friends

template<typename Y , typename Z >
class local_shared_ptr
 
template<typename Y >
class atomic_shared_ptr
 

Additional Inherited Members

Detailed Description

template<typename X, typename Y>
class local_shared_ptr< X, Y >

This class provides non-reentrant interfaces for atomic_shared_ptr: operator->(), operator*() and so on.
Use this class in non-reentrant scopes instead of costly atomic_shared_ptr.

See Also
atomic_shared_ptr, atomic_unique_ptr, atomic_shared_ptr_test.cpp.

Definition at line 85 of file atomic_smart_ptr.h.

Member Function Documentation

template<typename X, typename Y>
local_shared_ptr& local_shared_ptr< X, Y >::operator= ( const atomic_shared_ptr< T > &  t)
inlinenoexcept
Parameters
[in]tThe pointer held by this instance is replaced with that of t.

Definition at line 201 of file atomic_smart_ptr.h.

template<typename X, typename Y>
template<typename Y >
local_shared_ptr& local_shared_ptr< X, Y >::operator= ( const atomic_shared_ptr< Y > &  y)
inlinenoexcept
Parameters
[in]yThe pointer held by this instance is replaced with that of y.

Definition at line 207 of file atomic_smart_ptr.h.

template<typename T , typename reflocal_var_t >
void local_shared_ptr< T, reflocal_var_t >::swap ( local_shared_ptr< X, Y > &  x)
inlinenoexcept
Parameters
[in,out]xThe pointer held by x is swapped with that of this instance.

Definition at line 563 of file atomic_smart_ptr.h.

template<typename T , typename reflocal_var_t >
void local_shared_ptr< T, reflocal_var_t >::swap ( atomic_shared_ptr< T > &  x)
noexcept
Parameters
[in,out]xThe pointer held by x is atomically swapped with that of this instance.

Definition at line 571 of file atomic_smart_ptr.h.


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

Generated for KAME4 by  doxygen 1.8.3