mn::pointer::basic_auto_ptr< T > Class Template Reference

AutoPtr is a "smart" pointer for classes implementing reference counting based garbage collection. More...

#include <mn_auto_ptr.hpp>

Public Types

using value_type = T
 
using element_type = T
 
using const_value_type = const value_type
 
using pointer = T *
 
using reference = T &
 
using self_type = basic_auto_ptr< T >
 

Public Member Functions

 basic_auto_ptr ()
 
 basic_auto_ptr (pointer ptr)
 
 basic_auto_ptr (pointer ptr, bool shared)
 
 basic_auto_ptr (const self_type &other)
 
 basic_auto_ptr (basic_auto_ptr &&other) noexcept
 
template<class TO >
 basic_auto_ptr (const basic_auto_ptr< TO > &other)
 
 ~basic_auto_ptr ()
 
template<class TO >
void reset (const basic_auto_ptr< TO > &p)
 
void reset ()
 
void reset (pointer ptr)
 
void reset (pointer ptr, bool shared)
 
void reset (const self_type &ptr)
 
void swap (self_type &ptr)
 
pointer get ()
 
bool isNull () const
 
pointer duplicate ()
 
 operator pointer ()
 
pointer operator-> ()
 
bool operator! () const
 
template<class TO >
self_typeoperator= (const basic_auto_ptr< TO > &ptr)
 
self_typeoperator= (pointer ptr)
 
self_typeoperator= (const self_type &ptr)
 
self_typeoperator= (self_type &&other) noexcept
 
bool operator== (const self_type &other) const
 
bool operator== (const pointer other) const
 
bool operator!= (const self_type &other) const
 
bool operator!= (const pointer other) const
 
bool operator<= (const self_type &other) const
 
bool operator<= (const pointer other) const
 
bool operator>= (const self_type &other) const
 
bool operator>= (const pointer other) const
 
bool operator< (const self_type &other) const
 
bool operator< (const pointer other) const
 
bool operator> (const self_type &other) const
 
bool operator> (const pointer other) const
 
template<class TO >
basic_auto_ptr< TO > dycast () const
 
template<class TO >
basic_auto_ptr< TO > scast () const
 

Private Member Functions

self_typeassign (pointer other)
 
self_typeassign (pointer other, bool shared)
 
self_typeassign (const self_type &other)
 
template<class TO >
self_typeassign (const basic_auto_ptr< TO > &other)
 

Private Attributes

pointer m_ptr
 

Detailed Description

template<typename T>
class mn::pointer::basic_auto_ptr< T >

AutoPtr is a "smart" pointer for classes implementing reference counting based garbage collection.

Member Typedef Documentation

◆ const_value_type

template<typename T >
using mn::pointer::basic_auto_ptr< T >::const_value_type = const value_type

◆ element_type

template<typename T >
using mn::pointer::basic_auto_ptr< T >::element_type = T

◆ pointer

template<typename T >
using mn::pointer::basic_auto_ptr< T >::pointer = T*

◆ reference

template<typename T >
using mn::pointer::basic_auto_ptr< T >::reference = T&

◆ self_type

template<typename T >
using mn::pointer::basic_auto_ptr< T >::self_type = basic_auto_ptr<T>

◆ value_type

template<typename T >
using mn::pointer::basic_auto_ptr< T >::value_type = T

Constructor & Destructor Documentation

◆ basic_auto_ptr() [1/6]

template<typename T >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( )
inline

◆ basic_auto_ptr() [2/6]

template<typename T >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( pointer  ptr)
inline

◆ basic_auto_ptr() [3/6]

template<typename T >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( pointer  ptr,
bool  shared 
)
inline

◆ basic_auto_ptr() [4/6]

template<typename T >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( const self_type other)
inline

◆ basic_auto_ptr() [5/6]

template<typename T >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( basic_auto_ptr< T > &&  other)
inlinenoexcept

◆ basic_auto_ptr() [6/6]

template<typename T >
template<class TO >
mn::pointer::basic_auto_ptr< T >::basic_auto_ptr ( const basic_auto_ptr< TO > &  other)
inline

◆ ~basic_auto_ptr()

template<typename T >
mn::pointer::basic_auto_ptr< T >::~basic_auto_ptr ( )
inline

Member Function Documentation

◆ assign() [1/4]

template<typename T >
template<class TO >
self_type& mn::pointer::basic_auto_ptr< T >::assign ( const basic_auto_ptr< TO > &  other)
inlineprivate

◆ assign() [2/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::assign ( const self_type other)
inlineprivate

◆ assign() [3/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::assign ( pointer  other)
inlineprivate

◆ assign() [4/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::assign ( pointer  other,
bool  shared 
)
inlineprivate

◆ duplicate()

template<typename T >
pointer mn::pointer::basic_auto_ptr< T >::duplicate ( )
inline

◆ dycast()

template<typename T >
template<class TO >
basic_auto_ptr<TO> mn::pointer::basic_auto_ptr< T >::dycast ( ) const
inline

◆ get()

template<typename T >
pointer mn::pointer::basic_auto_ptr< T >::get ( void  )
inline

◆ isNull()

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::isNull ( ) const
inline

◆ operator pointer()

template<typename T >
mn::pointer::basic_auto_ptr< T >::operator pointer ( )
inline

◆ operator!()

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator! ( ) const
inline

◆ operator!=() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator!= ( const pointer  other) const
inline

◆ operator!=() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator!= ( const self_type other) const
inline

◆ operator->()

template<typename T >
pointer mn::pointer::basic_auto_ptr< T >::operator-> ( )
inline

◆ operator<() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator< ( const pointer  other) const
inline

◆ operator<() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator< ( const self_type other) const
inline

◆ operator<=() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator<= ( const pointer  other) const
inline

◆ operator<=() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator<= ( const self_type other) const
inline

◆ operator=() [1/4]

template<typename T >
template<class TO >
self_type& mn::pointer::basic_auto_ptr< T >::operator= ( const basic_auto_ptr< TO > &  ptr)
inline

◆ operator=() [2/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::operator= ( const self_type ptr)
inline

◆ operator=() [3/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::operator= ( pointer  ptr)
inline

◆ operator=() [4/4]

template<typename T >
self_type& mn::pointer::basic_auto_ptr< T >::operator= ( self_type &&  other)
inlinenoexcept

◆ operator==() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator== ( const pointer  other) const
inline

◆ operator==() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator== ( const self_type other) const
inline

◆ operator>() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator> ( const pointer  other) const
inline

◆ operator>() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator> ( const self_type other) const
inline

◆ operator>=() [1/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator>= ( const pointer  other) const
inline

◆ operator>=() [2/2]

template<typename T >
bool mn::pointer::basic_auto_ptr< T >::operator>= ( const self_type other) const
inline

◆ reset() [1/5]

template<typename T >
void mn::pointer::basic_auto_ptr< T >::reset ( )
inline

◆ reset() [2/5]

template<typename T >
template<class TO >
void mn::pointer::basic_auto_ptr< T >::reset ( const basic_auto_ptr< TO > &  p)
inline

◆ reset() [3/5]

template<typename T >
void mn::pointer::basic_auto_ptr< T >::reset ( const self_type ptr)
inline

◆ reset() [4/5]

template<typename T >
void mn::pointer::basic_auto_ptr< T >::reset ( pointer  ptr)
inline

◆ reset() [5/5]

template<typename T >
void mn::pointer::basic_auto_ptr< T >::reset ( pointer  ptr,
bool  shared 
)
inline

◆ scast()

template<typename T >
template<class TO >
basic_auto_ptr<TO> mn::pointer::basic_auto_ptr< T >::scast ( ) const
inline

◆ swap()

template<typename T >
void mn::pointer::basic_auto_ptr< T >::swap ( self_type ptr)
inline

Member Data Documentation

◆ m_ptr

template<typename T >
pointer mn::pointer::basic_auto_ptr< T >::m_ptr
private

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