mn::pointer::basic_weak_ptr< T, TRefType > Class Template Reference

#include <mn_weak_ptr.hpp>

+ Collaboration diagram for mn::pointer::basic_weak_ptr< T, TRefType >:

Public Types

using value_type = T
 
using element_type = T
 
using reference = T &
 
using const_value_type = const value_type
 
using pointer = value_type *
 
using count_type = TRefType
 
using self_type = basic_weak_ptr< value_type, count_type >
 
using shared_type = basic_shared_ptr< value_type, count_type >
 

Public Member Functions

 basic_weak_ptr (value_type pValue=0)
 
 basic_weak_ptr (const self_type &r)
 
 basic_weak_ptr (shared_type &pShrd)
 
template<class U , typename YRefType = count_type>
 basic_weak_ptr (const basic_weak_ptr< U, YRefType > &r)
 
template<class U , typename YRefType = count_type>
 basic_weak_ptr (const basic_shared_ptr< U, YRefType > &pShrd)
 
shared_type lock ()
 
bool expired ()
 
void reset ()
 
count_type use_count ()
 
void swap (self_type &other)
 
template<class Y , typename YRefType = atomic_size_t>
bool owner_before (const basic_weak_ptr< Y, YRefType > &rhs)
 
template<class Y , typename YRefType = atomic_size_t>
bool owner_before (const basic_shared_ptr< Y, YRefType > &rhs)
 
pointer get () const
 
pointer operator-> () const
 
const_value_typeoperator* ()
 
 operator bool ()
 
self_typeoperator= (const self_type &r)
 

Private Attributes

pointer m_ptr
 
count_type m_ref
 

Member Typedef Documentation

◆ const_value_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::const_value_type = const value_type

◆ count_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::count_type = TRefType

◆ element_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::element_type = T

◆ pointer

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::pointer = value_type*

◆ reference

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::reference = T&

◆ self_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::self_type = basic_weak_ptr<value_type, count_type>

◆ shared_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::shared_type = basic_shared_ptr<value_type, count_type>

◆ value_type

template<typename T , typename TRefType = atomic_size_t>
using mn::pointer::basic_weak_ptr< T, TRefType >::value_type = T

Constructor & Destructor Documentation

◆ basic_weak_ptr() [1/5]

template<typename T , typename TRefType = atomic_size_t>
mn::pointer::basic_weak_ptr< T, TRefType >::basic_weak_ptr ( value_type  pValue = 0)
inlineexplicit

◆ basic_weak_ptr() [2/5]

template<typename T , typename TRefType = atomic_size_t>
mn::pointer::basic_weak_ptr< T, TRefType >::basic_weak_ptr ( const self_type r)
inline

◆ basic_weak_ptr() [3/5]

template<typename T , typename TRefType = atomic_size_t>
mn::pointer::basic_weak_ptr< T, TRefType >::basic_weak_ptr ( shared_type pShrd)
inline

◆ basic_weak_ptr() [4/5]

template<typename T , typename TRefType = atomic_size_t>
template<class U , typename YRefType = count_type>
mn::pointer::basic_weak_ptr< T, TRefType >::basic_weak_ptr ( const basic_weak_ptr< U, YRefType > &  r)
inline

◆ basic_weak_ptr() [5/5]

template<typename T , typename TRefType = atomic_size_t>
template<class U , typename YRefType = count_type>
mn::pointer::basic_weak_ptr< T, TRefType >::basic_weak_ptr ( const basic_shared_ptr< U, YRefType > &  pShrd)
inline

Member Function Documentation

◆ expired()

template<typename T , typename TRefType = atomic_size_t>
bool mn::pointer::basic_weak_ptr< T, TRefType >::expired ( )
inline

◆ get()

template<typename T , typename TRefType = atomic_size_t>
pointer mn::pointer::basic_weak_ptr< T, TRefType >::get ( void  ) const
inline

◆ lock()

template<typename T , typename TRefType = atomic_size_t>
shared_type mn::pointer::basic_weak_ptr< T, TRefType >::lock ( )
inline

◆ operator bool()

template<typename T , typename TRefType = atomic_size_t>
mn::pointer::basic_weak_ptr< T, TRefType >::operator bool ( )
inline

◆ operator*()

template<typename T , typename TRefType = atomic_size_t>
const_value_type& mn::pointer::basic_weak_ptr< T, TRefType >::operator* ( void  )
inline

◆ operator->()

template<typename T , typename TRefType = atomic_size_t>
pointer mn::pointer::basic_weak_ptr< T, TRefType >::operator-> ( ) const
inline

◆ operator=()

template<typename T , typename TRefType = atomic_size_t>
self_type& mn::pointer::basic_weak_ptr< T, TRefType >::operator= ( const self_type r)
inline

◆ owner_before() [1/2]

template<typename T , typename TRefType = atomic_size_t>
template<class Y , typename YRefType = atomic_size_t>
bool mn::pointer::basic_weak_ptr< T, TRefType >::owner_before ( const basic_shared_ptr< Y, YRefType > &  rhs)
inline

◆ owner_before() [2/2]

template<typename T , typename TRefType = atomic_size_t>
template<class Y , typename YRefType = atomic_size_t>
bool mn::pointer::basic_weak_ptr< T, TRefType >::owner_before ( const basic_weak_ptr< Y, YRefType > &  rhs)
inline

◆ reset()

template<typename T , typename TRefType = atomic_size_t>
void mn::pointer::basic_weak_ptr< T, TRefType >::reset ( )
inline

◆ swap()

template<typename T , typename TRefType = atomic_size_t>
void mn::pointer::basic_weak_ptr< T, TRefType >::swap ( self_type other)
inline

◆ use_count()

template<typename T , typename TRefType = atomic_size_t>
count_type mn::pointer::basic_weak_ptr< T, TRefType >::use_count ( )
inline

Member Data Documentation

◆ m_ptr

template<typename T , typename TRefType = atomic_size_t>
pointer mn::pointer::basic_weak_ptr< T, TRefType >::m_ptr
private

◆ m_ref

template<typename T , typename TRefType = atomic_size_t>
count_type mn::pointer::basic_weak_ptr< T, TRefType >::m_ref
private

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