std::auto_ptr analogue with ability to delete object by object's method.
More...
#include <B2BITS_AutoPtr.h>
|
| AutoPtr () throw () |
| Default constructor.
|
|
| AutoPtr (AutoPtr< T > &ptr) throw () |
| Copy constructor.
|
|
| AutoPtr (T *ptr, ReleaseMethod releaseMethod) throw () |
| Constructor.
|
|
T * | get () throw () |
| Returns a pointer.
|
|
T const * | get () const throw () |
| Returns a pointer.
|
|
T ** | operator& () |
| Overloaded operator&.
|
|
T & | operator* () throw () |
| Overloaded operator*.
|
|
T const & | operator* () const throw () |
| Overloaded operator*.
|
|
T * | operator-> () throw () |
| Overloaded operator->.
|
|
T const * | operator-> () const throw () |
| Overloaded operator->.
|
|
AutoPtr & | operator= (AutoPtr< T > &ptr) throw () |
| Copy operator.
|
|
T * | release () throw () |
| Release underlying pointer and return it.
|
|
void | reset (T *ptr, ReleaseMethod releaseMethod) throw () |
| Deletes object by underlying pointer and set it to new value.
|
|
| ~AutoPtr () throw () |
| Destructor.
|
|
template<typename T>
class Utils::AutoPtr< T >
std::auto_ptr analogue with ability to delete object by object's method.
- Deprecated
- This class is not safe. Please use Utils::AutoPtr2 instead.
◆ ReleaseMethod
Declares ReleaseMethod handler.
◆ AutoPtr() [1/3]
◆ AutoPtr() [2/3]
Constructor.
- Parameters
-
ptr | Pointer to the object to be owned. |
releaseMethod | Object's release method. |
◆ AutoPtr() [3/3]
◆ ~AutoPtr()
◆ get() [1/2]
Returns a pointer.
- Returns
- Pointer.
◆ get() [2/2]
Returns a pointer.
- Returns
- Pointer.
◆ operator&()
◆ operator*() [1/2]
◆ operator*() [2/2]
◆ operator->() [1/2]
◆ operator->() [2/2]
◆ operator=()
◆ release()
Release underlying pointer and return it.
- Returns
- underlying pointer.
◆ reset()
Deletes object by underlying pointer and set it to new value.
- Parameters
-
ptr | New value to set. |
releaseMethod | Object's release method. |