23 #ifndef __ccxx_ScopedPtr_hxx 24 #define __ccxx_ScopedPtr_hxx 109 operator const void*()
const 110 {
return(_object ?
this : NULL); }
114 {
return(_object == NULL); }
119 T* tmp = other._object;
120 other._object = _object;
138 #endif // __ccxx_ScopedPtr_hxx ScopedPtr()
Construct a new, NULL ScopedPtr.
Definition: ScopedPtr.h++:43
bool operator!() const
Test if the pointer is NULL.
Definition: ScopedPtr.h++:105
T * release()
Release ownership of the object.
Definition: ScopedPtr.h++:97
T & operator*() const
Dereference operator.
Definition: ScopedPtr.h++:61
An exception indicating an attempt to dereference a null pointer.
Definition: NullPointerException.h++:37
void reset(T *object=NULL)
Reset the pointer.
Definition: ScopedPtr.h++:83
bool isNull() const
Test if the pointer is NULL.
Definition: ScopedPtr.h++:113
ScopedPtr(T *object)
Construct a new ScopedPtr for the given object pointer.
Definition: ScopedPtr.h++:48
void swap(ScopedPtr &other)
Swap this pointer with another.
Definition: ScopedPtr.h++:117
A non-copyable scoped pointer.
Definition: ScopedPtr.h++:38
~ScopedPtr()
Destructor.
Definition: ScopedPtr.h++:53
T * operator->() const
Pointer-to-member operator.
Definition: ScopedPtr.h++:74
Definition: AllocationMap.c++:25