SPH
Public Member Functions | Friends | List of all members
AutoPtr< T > Class Template Reference

Wrapper of pointer that deletes the resource from destructor. More...

#include <AutoPtr.h>

Inheritance diagram for AutoPtr< T >:
SafePtr< T >

Public Member Functions

INLINE AutoPtr ()
 
INLINE AutoPtr (std::nullptr_t)
 
INLINE AutoPtr (T *ptr)
 
INLINE AutoPtr (const AutoPtr &other)=delete
 
template<typename T2 >
INLINE AutoPtr (AutoPtr< T2 > &&other)
 
 ~AutoPtr ()
 
INLINE AutoPtroperator= (const AutoPtr &other)=delete
 
template<typename T2 >
INLINE AutoPtroperator= (AutoPtr< T2 > &&other)
 
INLINE AutoPtroperator= (std::nullptr_t)
 
INLINE T & operator* () const
 
INLINE T * operator-> () const
 
INLINE RawPtr< T > get () const
 
INLINE operator bool () const
 
INLINE bool operator! () const
 
template<typename... TArgs>
decltype(auto) INLINE operator() (TArgs &&... args) const
 
INLINE void reset ()
 
INLINE T * release ()
 
INLINE void swap (AutoPtr &other)
 

Friends

template<typename >
class AutoPtr
 

Detailed Description

template<typename T>
class AutoPtr< T >

Wrapper of pointer that deletes the resource from destructor.

Definition at line 15 of file AutoPtr.h.

Constructor & Destructor Documentation

◆ AutoPtr() [1/5]

template<typename T >
INLINE AutoPtr< T >::AutoPtr ( )
inline

Definition at line 23 of file AutoPtr.h.

◆ AutoPtr() [2/5]

template<typename T >
INLINE AutoPtr< T >::AutoPtr ( std::nullptr_t  )
inline

Definition at line 26 of file AutoPtr.h.

◆ AutoPtr() [3/5]

template<typename T >
INLINE AutoPtr< T >::AutoPtr ( T *  ptr)
inlineexplicit

Definition at line 29 of file AutoPtr.h.

◆ AutoPtr() [4/5]

template<typename T >
INLINE AutoPtr< T >::AutoPtr ( const AutoPtr< T > &  other)
delete

◆ AutoPtr() [5/5]

template<typename T >
template<typename T2 >
INLINE AutoPtr< T >::AutoPtr ( AutoPtr< T2 > &&  other)
inline

Definition at line 35 of file AutoPtr.h.

◆ ~AutoPtr()

template<typename T >
AutoPtr< T >::~AutoPtr ( )
inline

Definition at line 40 of file AutoPtr.h.

Member Function Documentation

◆ get()

template<typename T >
INLINE RawPtr<T> AutoPtr< T >::get ( ) const
inline

Definition at line 69 of file AutoPtr.h.

◆ operator bool()

template<typename T >
INLINE AutoPtr< T >::operator bool ( ) const
inlineexplicit

Definition at line 73 of file AutoPtr.h.

◆ operator!()

template<typename T >
INLINE bool AutoPtr< T >::operator! ( ) const
inline

Definition at line 77 of file AutoPtr.h.

◆ operator()()

template<typename T >
template<typename... TArgs>
decltype(auto) INLINE AutoPtr< T >::operator() ( TArgs &&...  args) const
inline

Definition at line 82 of file AutoPtr.h.

◆ operator*()

template<typename T >
INLINE T& AutoPtr< T >::operator* ( ) const
inline

Definition at line 59 of file AutoPtr.h.

◆ operator->()

template<typename T >
INLINE T* AutoPtr< T >::operator-> ( ) const
inline

Definition at line 64 of file AutoPtr.h.

◆ operator=() [1/3]

template<typename T >
template<typename T2 >
INLINE AutoPtr& AutoPtr< T >::operator= ( AutoPtr< T2 > &&  other)
inline

Definition at line 47 of file AutoPtr.h.

◆ operator=() [2/3]

template<typename T >
INLINE AutoPtr& AutoPtr< T >::operator= ( const AutoPtr< T > &  other)
delete

◆ operator=() [3/3]

template<typename T >
INLINE AutoPtr& AutoPtr< T >::operator= ( std::nullptr_t  )
inline

Definition at line 54 of file AutoPtr.h.

◆ release()

template<typename T >
INLINE T* AutoPtr< T >::release ( )
inline

Definition at line 92 of file AutoPtr.h.

◆ reset()

template<typename T >
INLINE void AutoPtr< T >::reset ( )
inline

Definition at line 87 of file AutoPtr.h.

◆ swap()

template<typename T >
INLINE void AutoPtr< T >::swap ( AutoPtr< T > &  other)
inline

Definition at line 98 of file AutoPtr.h.

Friends And Related Function Documentation

◆ AutoPtr

template<typename T >
template<typename >
friend class AutoPtr
friend

Definition at line 17 of file AutoPtr.h.


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