std::auto_ptr analogue with ability to delete object by object's method. More...
#include <B2BITS_AutoPtr.h>
Public Types | |
| typedef ConstMethodResolver< T > ::MethodType | ReleaseMethod |
| Declares ReleaseMethod handler. | |
Public Member Functions | |
| AutoPtr () | |
| Default constructor. | |
| AutoPtr (T *ptr, ReleaseMethod releaseMethod) | |
| Constructor. | |
| AutoPtr (AutoPtr< T > &ptr) | |
| Copy constructor. | |
| T const * | get () const |
| Returns a pointer. | |
| T * | get () |
| Returns a pointer. | |
| T ** | operator& () |
| Overloaded operator&. | |
| T const & | operator* () const |
| Overloaded operator*. | |
| T & | operator* () |
| Overloaded operator*. | |
| T const * | operator-> () const |
| Overloaded operator->. | |
| T * | operator-> () |
| Overloaded operator->. | |
| AutoPtr & | operator= (AutoPtr< T > &ptr) |
| Copy operator. | |
| T * | release () |
| Release underlying pointer and return it. | |
| void | reset (T *ptr, ReleaseMethod releaseMethod) |
| Deletes object by underlying pointer and set it to new value. | |
| ~AutoPtr () | |
| Destructor. | |
std::auto_ptr analogue with ability to delete object by object's method.
Definition at line 73 of file B2BITS_AutoPtr.h.
| typedef ConstMethodResolver<T>::MethodType Utils::AutoPtr< T >::ReleaseMethod |
Declares ReleaseMethod handler.
Definition at line 77 of file B2BITS_AutoPtr.h.
| Utils::AutoPtr< T >::AutoPtr | ( | ) | [inline] |
Default constructor.
Definition at line 82 of file B2BITS_AutoPtr.h.
| Utils::AutoPtr< T >::AutoPtr | ( | T * | ptr, |
| ReleaseMethod | releaseMethod | ||
| ) | [inline] |
Constructor.
| ptr | Pointer to the object to be owned. |
| releaseMethod | Object's release method. |
Definition at line 92 of file B2BITS_AutoPtr.h.
| Utils::AutoPtr< T >::AutoPtr | ( | AutoPtr< T > & | ptr ) | [inline] |
Copy constructor.
Definition at line 100 of file B2BITS_AutoPtr.h.
References Utils::AutoPtr< T >::reset().
| Utils::AutoPtr< T >::~AutoPtr | ( | ) | [inline] |
Destructor.
Definition at line 126 of file B2BITS_AutoPtr.h.
| T const* Utils::AutoPtr< T >::get | ( | ) | const [inline] |
| T* Utils::AutoPtr< T >::get | ( | ) | [inline] |
| T** Utils::AutoPtr< T >::operator& | ( | ) | [inline] |
Overloaded operator&.
Definition at line 197 of file B2BITS_AutoPtr.h.
| T& Utils::AutoPtr< T >::operator* | ( | ) | [inline] |
Overloaded operator*.
Definition at line 181 of file B2BITS_AutoPtr.h.
| T const& Utils::AutoPtr< T >::operator* | ( | ) | const [inline] |
Overloaded operator*.
Definition at line 189 of file B2BITS_AutoPtr.h.
| T* Utils::AutoPtr< T >::operator-> | ( | ) | [inline] |
Overloaded operator->.
Definition at line 205 of file B2BITS_AutoPtr.h.
| T const* Utils::AutoPtr< T >::operator-> | ( | ) | const [inline] |
Overloaded operator->.
Definition at line 213 of file B2BITS_AutoPtr.h.
| AutoPtr& Utils::AutoPtr< T >::operator= | ( | AutoPtr< T > & | ptr ) | [inline] |
Copy operator.
Definition at line 113 of file B2BITS_AutoPtr.h.
References Utils::AutoPtr< T >::reset().
| T* Utils::AutoPtr< T >::release | ( | ) | [inline] |
Release underlying pointer and return it.
Definition at line 136 of file B2BITS_AutoPtr.h.
| void Utils::AutoPtr< T >::reset | ( | T * | ptr, |
| ReleaseMethod | releaseMethod | ||
| ) | [inline] |
Deletes object by underlying pointer and set it to new value.
| ptr | New value to set. |
| releaseMethod | Object's release method. |
Definition at line 151 of file B2BITS_AutoPtr.h.
Referenced by Utils::AutoPtr< T >::AutoPtr(), and Utils::AutoPtr< T >::operator=().
1.7.2