FbxAutoPtr< Type, Policy > Class Template Reference
#include <fbxalloc.h>
template<class Type, class Policy = FbxDeletionPolicyDefault<Type>>
class FbxAutoPtr< Type, Policy >
FbxAutoPtr mimics the auto_ptr
class template implementation available in the C++ Standard Library.
The auto_ptr
template class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which it points gets destroyed automatically when control leaves a scope.
Definition at line 190 of file fbxalloc.h.
Construct from a pointer.
Definition at line 194 of file fbxalloc.h.
Destructor.
Definition at line 197 of file fbxalloc.h.
197 { Policy::DeleteIt(&mPtr); }
Retrieve the pointer it holds.
Definition at line 200 of file fbxalloc.h.
Type* operator-> |
( |
| ) |
const |
|
inline |
Member access operator.
Definition at line 203 of file fbxalloc.h.
operator Type * |
( |
| ) |
const |
|
inline |
Convert to a Type pointer.
Definition at line 206 of file fbxalloc.h.
Type& operator* |
( |
| ) |
const |
|
inline |
Logical not operator.
Definition at line 212 of file fbxalloc.h.
212 {
return mPtr == 0; }
Convert to boolean value.
Definition at line 215 of file fbxalloc.h.
215 {
return mPtr != 0; }
void Reset |
( |
Type * |
pPtr = 0 | ) |
|
|
inline |
Reset the scoped pointer by swapping with another pointer.
Definition at line 218 of file fbxalloc.h.
220 FBX_ASSERT(pPtr == 0 || pPtr != mPtr);
FbxAutoPtr mimics the auto_ptr class template implementation available in the C++ Standard Library...
void Swap(FbxAutoPtr &pOther)
Swap with another pointer.
Swap with another pointer.
Definition at line 225 of file fbxalloc.h.
227 Type* TmpPtr = pOther.mPtr;
Release the pointer, so that it won't perform deletion in its destruction.
Definition at line 233 of file fbxalloc.h.
The documentation for this class was generated from the following file: