Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Unique ownrship pointer. More...
#include <scoped_ptr.h>
Public Member Functions | |
ScopedPtr () | |
Initialize null pointer. More... | |
ScopedPtr (T *ptr, const AllocationPolicy &policy) | |
Initialize from a raw pointer. More... | |
~ScopedPtr () | |
Destroy object. More... | |
void | reset () |
Reset pointer to null. More... | |
void | reset (T *new_ptr, const AllocationPolicy &new_policy) |
Reset pointer to a new value. More... | |
T * | release () |
Get underlying pointer and pass ownership to the caller. More... | |
T * | get () const |
Get underlying pointer. More... | |
T * | operator-> () const |
Get underlying pointer. More... | |
T & | operator* () const |
Get underlying reference. More... | |
operator const struct unspecified_bool * () const | |
Convert to bool. More... | |
Unique ownrship pointer.
T | defines pointee type. It may be const. |
AllocationPolicy | defies (de)allocation policy. |
When ScopedPtr is destroyed or reset, it invokes AllocationPolicy::destroy() to destroy the owned object.
Definition at line 33 of file scoped_ptr.h.
|
inline |
Initialize null pointer.
Definition at line 36 of file scoped_ptr.h.
|
inline |
Initialize from a raw pointer.
Definition at line 41 of file scoped_ptr.h.
|
inline |
Destroy object.
Definition at line 47 of file scoped_ptr.h.
|
inline |
Get underlying pointer.
Definition at line 84 of file scoped_ptr.h.
|
inline |
Convert to bool.
Definition at line 102 of file scoped_ptr.h.
|
inline |
Get underlying reference.
Definition at line 94 of file scoped_ptr.h.
|
inline |
Get underlying pointer.
Definition at line 89 of file scoped_ptr.h.
|
inline |
Get underlying pointer and pass ownership to the caller.
Definition at line 71 of file scoped_ptr.h.
|
inline |
Reset pointer to null.
Definition at line 52 of file scoped_ptr.h.
|
inline |
Reset pointer to a new value.
Definition at line 61 of file scoped_ptr.h.