GL Studio C++ Runtime API
|
#include <scoped_ptr.h>
Public Member Functions | |
ScopedPtr (T *p=NULL) | |
ScopedPtr (ScopedPtr &&that) | |
ScopedPtr & | operator= (ScopedPtr &&that) |
T & | operator* () const |
T * | operator-> () const |
void | Reset (T *p=NULL) |
bool | IsNull () const |
T * | Get () const |
The ScopedPtr class template stores a pointer to a dynamically allocated object. The object pointed to is guaranteed to be deleted, either on destruction of the ScopedPtr or via an explicit Reset.
|
inlineexplicit |
Constructor
p | The pointer to wrap with this object. |
|
inline |
|
inline |
|
inline |
Address operator
|
inline |
Dereference operator
Move assignment operator
that | The object to move from. |
|
inline |
Reset the object by deleting the old object, and assigning a new one.
p | The new underlying pointer to assign. |