mn::pointer::basic_value_ptr< T, TCloner, TDeleter > Class Template Reference

#include <mn_value_ptr.hpp>

+ Collaboration diagram for mn::pointer::basic_value_ptr< T, TCloner, TDeleter >:

Public Types

using value_type = T
 
using const_type = const T
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = const T *
 
using cloner_type = TCloner
 
using deleter_type = TDeleter
 
using self_type = basic_value_ptr< value_type, cloner_type, deleter_type >
 

Public Member Functions

 basic_value_ptr () noexcept
 
 basic_value_ptr (mn::nullptr_t) noexcept
 
 basic_value_ptr (pointer p) noexcept
 
 basic_value_ptr (const cloner_type &cloner)
 
 basic_value_ptr (const deleter_type &deleter)
 
 basic_value_ptr (const cloner_type &cloner, const deleter_type &deleter)
 
 basic_value_ptr (const cloner_type &&cloner)
 
 basic_value_ptr (const deleter_type &&deleter)
 
 basic_value_ptr (const cloner_type &&cloner, const deleter_type &&deleter)
 
 basic_value_ptr (const self_type &other)
 
 basic_value_ptr (const_reference value)
 
 basic_value_ptr (const self_type &&other)
 
 basic_value_ptr (const value_type &&value)
 
template<class... Args>
 basic_value_ptr (Args &&... args)
 
template<typename U , class... Args>
 basic_value_ptr (mn::initializer_list< U > il, Args &&... args)
 
template<typename V , class VClonerTDeleter >
 basic_value_ptr (const V &value, const VClonerTDeleter &obj)
 
template<typename V , class VCloner , class VDeleter >
 basic_value_ptr (const V &value, const VCloner &cloner, const VDeleter &deleter)
 
 ~basic_value_ptr ()=default
 
pointer get () const noexcept
 
cloner_typeget_cloner () noexcept
 
deleter_typeget_deleter () noexcept
 
bool has_value () const noexcept
 
const_reference value () const
 
reference value ()
 
pointer release () noexcept
 
void reset (pointer p=pointer()) noexcept
 
void swap (basic_value_ptr &other) noexcept
 
template<class U >
value_type value_or (U &&v)
 
template<class... Args>
void emplace (Args &&... args)
 
template<class U , class... Args>
void emplace (mn::initializer_list< U > il, Args &&... args)
 
reference operator* () const
 
pointer operator-> () const noexcept
 
 operator bool () const noexcept
 
self_typeoperator= (mn::nullptr_t) noexcept
 
self_typeoperator= (const_type value) noexcept
 
self_typeoperator= (const self_type &rhs)
 
self_typeoperator= (self_type &&rhs) noexcept
 
template<class U , typename = typename mn::enable_if<mn::is_same< typename mn::decay<U>::type, T>::value >::type>
self_typeoperator= (U &&value)
 

Private Attributes

mn::pointer::clone_ptr< value_type, cloner_type, deleter_typem_ptr
 

Member Typedef Documentation

◆ cloner_type

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::cloner_type = TCloner

◆ const_pointer

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::const_pointer = const T*

◆ const_reference

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::const_reference = const T&

◆ const_type

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::const_type = const T

◆ deleter_type

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::deleter_type = TDeleter

◆ pointer

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::pointer = T*

◆ reference

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::reference = T&

◆ self_type

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::self_type = basic_value_ptr<value_type, cloner_type, deleter_type>

◆ value_type

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::value_type = T

Constructor & Destructor Documentation

◆ basic_value_ptr() [1/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( )
inlinenoexcept

◆ basic_value_ptr() [2/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( mn::nullptr_t  )
inlinenoexcept

◆ basic_value_ptr() [3/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( pointer  p)
inlinenoexcept

◆ basic_value_ptr() [4/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const cloner_type cloner)
inline

◆ basic_value_ptr() [5/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const deleter_type deleter)
inline

◆ basic_value_ptr() [6/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const cloner_type cloner,
const deleter_type deleter 
)
inline

◆ basic_value_ptr() [7/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const cloner_type &&  cloner)
inline

◆ basic_value_ptr() [8/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const deleter_type &&  deleter)
inline

◆ basic_value_ptr() [9/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const cloner_type &&  cloner,
const deleter_type &&  deleter 
)
inline

◆ basic_value_ptr() [10/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const self_type other)
inline

◆ basic_value_ptr() [11/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const_reference  value)
inline

◆ basic_value_ptr() [12/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const self_type &&  other)
inline

◆ basic_value_ptr() [13/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const value_type &&  value)
inline

◆ basic_value_ptr() [14/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<class... Args>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( Args &&...  args)
inline

◆ basic_value_ptr() [15/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<typename U , class... Args>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( mn::initializer_list< U >  il,
Args &&...  args 
)
inline

◆ basic_value_ptr() [16/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<typename V , class VClonerTDeleter >
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const V &  value,
const VClonerTDeleter &  obj 
)
inline

◆ basic_value_ptr() [17/17]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<typename V , class VCloner , class VDeleter >
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::basic_value_ptr ( const V &  value,
const VCloner &  cloner,
const VDeleter &  deleter 
)
inline

◆ ~basic_value_ptr()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::~basic_value_ptr ( )
default

Member Function Documentation

◆ emplace() [1/2]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<class... Args>
void mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::emplace ( Args &&...  args)
inline

◆ emplace() [2/2]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<class U , class... Args>
void mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::emplace ( mn::initializer_list< U >  il,
Args &&...  args 
)
inline

◆ get()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
pointer mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::get ( void  ) const
inlinenoexcept

◆ get_cloner()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
cloner_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::get_cloner ( )
inlinenoexcept

◆ get_deleter()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
deleter_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::get_deleter ( )
inlinenoexcept

◆ has_value()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
bool mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::has_value ( ) const
inlinenoexcept

◆ operator bool()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator bool ( ) const
inlineexplicitnoexcept

◆ operator*()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
reference mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator* ( void  ) const
inline

◆ operator->()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
pointer mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator-> ( ) const
inlinenoexcept

◆ operator=() [1/5]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
self_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator= ( const self_type rhs)
inline

◆ operator=() [2/5]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
self_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator= ( const_type  value)
inlinenoexcept

◆ operator=() [3/5]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
self_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator= ( mn::nullptr_t  )
inlinenoexcept

◆ operator=() [4/5]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
self_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator= ( self_type &&  rhs)
inlinenoexcept

◆ operator=() [5/5]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<class U , typename = typename mn::enable_if<mn::is_same< typename mn::decay<U>::type, T>::value >::type>
self_type& mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::operator= ( U &&  value)
inline

◆ release()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
pointer mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::release ( )
inlinenoexcept

◆ reset()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
void mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::reset ( pointer  p = pointer())
inlinenoexcept

◆ swap()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
void mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::swap ( basic_value_ptr< T, TCloner, TDeleter > &  other)
inlinenoexcept

◆ value() [1/2]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
reference mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::value ( )
inline

◆ value() [2/2]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
const_reference mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::value ( ) const
inline

◆ value_or()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
template<class U >
value_type mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::value_or ( U &&  v)
inline

Member Data Documentation

◆ m_ptr

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
mn::pointer::clone_ptr<value_type, cloner_type, deleter_type> mn::pointer::basic_value_ptr< T, TCloner, TDeleter >::m_ptr
private

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