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

#include <mn_clone_ptr.hpp>

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

Public Types

using value_type = T
 
using element_type = T
 
using pointer = T *
 
using reference = T &
 
using self_type = basic_clone_ptr< value_type >
 
using cloner_type = TCloner
 
using deleter_type = TDeleter
 

Public Member Functions

 basic_clone_ptr () noexcept
 
 basic_clone_ptr (pointer p) noexcept
 
 basic_clone_ptr (const cloner_type &cloner)
 
 basic_clone_ptr (const deleter_type &deleter)
 
 basic_clone_ptr (const cloner_type &cloner, const deleter_type &deleter)
 
 basic_clone_ptr (const cloner_type &&cloner)
 
 basic_clone_ptr (const deleter_type &&deleter)
 
 basic_clone_ptr (const cloner_type &&cloner, const deleter_type &&deleter)
 
 basic_clone_ptr (const self_type &other)
 
 basic_clone_ptr (const self_type &&other)
 
 basic_clone_ptr (const value_type &value)
 
 basic_clone_ptr (const value_type &&value)
 
template<class... Args>
 basic_clone_ptr (Args &&... args)
 
template<class U , class... Args>
 basic_clone_ptr (mn::initializer_list< U > il, Args &&... args)
 
 basic_clone_ptr (const value_type &value, const cloner_type &cloner)
 
 basic_clone_ptr (const value_type &&value, const cloner_type &&cloner)
 
 basic_clone_ptr (const value_type &value, const cloner_type &cloner, const deleter_type &deleter)
 
 basic_clone_ptr (const value_type &&value, const cloner_type &&cloner, const deleter_type &&deleter)
 
 ~basic_clone_ptr ()
 
pointer get ()
 
cloner_typeget_cloner () noexcept
 
deleter_typeget_deleter () noexcept
 
value_type operator* ()
 
pointer operator-> ()
 
pointer release () noexcept
 
void reset (pointer p) noexcept
 
void reset (const value_type &v)
 
void reset (const value_type &&v)
 
void swap (self_type &other) noexcept
 

Private Attributes

pointer m_ptr
 

Additional Inherited Members

- Private Types inherited from mn::pointer::basic_default_clone< T >
using pointer = T *
 
using value_type = T
 
using reference = T &
 
using const_reference = const T &
 
- Private Types inherited from mn::memory::basic_deleter< Type, TAllocator >
using value_type = Type
 
using allocator = TAllocator
 
using pointer = TAllocator *
 
using reference = TAllocator &
 
- Private Member Functions inherited from mn::pointer::basic_default_clone< T >
 basic_default_clone ()=default
 
pointer operator() (const_reference x) const
 
pointer operator() (T &&x) const
 
template<class... Args>
pointer operator() (Args &&... args) const
 
template<class U , class... Args>
pointer operator() (mn::initializer_list< U > il, Args &&... args) const
 
- Private Member Functions inherited from mn::memory::basic_deleter< Type, TAllocator >
constexpr basic_deleter ()
 Construct a basic deleter. More...
 
constexpr basic_deleter (reference alloc, size_t) noexcept
 Construt a basic deleter. More...
 
template<typename U , typename = typename enable_if<is_convertible<U*,value_type*>::value>::type>
 basic_deleter (const basic_deleter< U, TAllocator > &other) noexcept
 Converting constructor. Allows conversion from a deleter for arrays of another type, U, only if U* is convertible to value_type*. More...
 
bool is_valid () const noexcept
 Is the deleter valid - have a allocator. More...
 
reference get_allocator ()
 Get a reference from the using allocator. More...
 
void set_allocator (reference alloc) noexcept
 Set the using allocator for delete. More...
 
void operator() (value_type *pP) noexcept
 Calls deallocate pArray. More...
 

Member Typedef Documentation

◆ cloner_type

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

◆ deleter_type

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

◆ element_type

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

◆ pointer

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
using mn::pointer::basic_clone_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_clone_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_clone_ptr< T, TCloner, TDeleter >::self_type = basic_clone_ptr<value_type >

◆ value_type

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

Constructor & Destructor Documentation

◆ basic_clone_ptr() [1/18]

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

◆ basic_clone_ptr() [2/18]

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

◆ basic_clone_ptr() [3/18]

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

◆ basic_clone_ptr() [4/18]

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

◆ basic_clone_ptr() [5/18]

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

◆ basic_clone_ptr() [6/18]

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

◆ basic_clone_ptr() [7/18]

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

◆ basic_clone_ptr() [8/18]

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

◆ basic_clone_ptr() [9/18]

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

◆ basic_clone_ptr() [10/18]

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

◆ basic_clone_ptr() [11/18]

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

◆ basic_clone_ptr() [12/18]

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

◆ basic_clone_ptr() [13/18]

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

◆ basic_clone_ptr() [14/18]

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

◆ basic_clone_ptr() [15/18]

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

◆ basic_clone_ptr() [16/18]

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

◆ basic_clone_ptr() [17/18]

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

◆ basic_clone_ptr() [18/18]

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

◆ ~basic_clone_ptr()

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

Member Function Documentation

◆ get()

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

◆ get_cloner()

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
cloner_type& mn::pointer::basic_clone_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_clone_ptr< T, TCloner, TDeleter >::get_deleter ( )
inlinenoexcept

◆ operator*()

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

◆ operator->()

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

◆ release()

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

◆ reset() [1/3]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
void mn::pointer::basic_clone_ptr< T, TCloner, TDeleter >::reset ( const value_type &&  v)
inline

◆ reset() [2/3]

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
void mn::pointer::basic_clone_ptr< T, TCloner, TDeleter >::reset ( const value_type v)
inline

◆ reset() [3/3]

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

◆ swap()

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

Member Data Documentation

◆ m_ptr

template<typename T , class TCloner = basic_default_clone<T>, class TDeleter = memory::default_delete<T>>
pointer mn::pointer::basic_clone_ptr< T, TCloner, TDeleter >::m_ptr
private

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