Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Shared ownership intrusive pointer. More...
#include <shared_ptr.h>
Public Member Functions | |
SharedPtr () | |
Create empty shared pointer. More... | |
SharedPtr (T *ptr) | |
Create shared pointer from raw pointer. More... | |
SharedPtr (const SharedPtr &other) | |
Create shared pointer from shared pointer of the same type. More... | |
template<class TT > | |
SharedPtr (const SharedPtr< TT, OwnershipPolicy > &other) | |
Create shared pointer from shared pointer of another type. More... | |
~SharedPtr () | |
Destroy shared pointer. More... | |
SharedPtr & | operator= (const SharedPtr &other) |
Reset shared pointer and attach it to another object. More... | |
void | reset (const SharedPtr &other) |
Reset shared pointer and attach it to another object. More... | |
void | reset (T *ptr=NULL) |
Reset shared pointer and attach it to another object. 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... | |
Shared ownership intrusive pointer.
T | defines pointee type. It may be const. |
OwnershipPolicy | defines ownwership policy. It provides methods to increase and decrease the reference counter embedded into object. |
If RefCountedOwnership is used, T should inherit RefCounted. A template parameter of RefCounted defines its (de)allocation policy.
Definition at line 32 of file shared_ptr.h.
|
inline |
Create empty shared pointer.
Definition at line 37 of file shared_ptr.h.
|
inline |
Create shared pointer from raw pointer.
Definition at line 44 of file shared_ptr.h.
|
inline |
Create shared pointer from shared pointer of the same type.
Definition at line 52 of file shared_ptr.h.
|
inline |
Create shared pointer from shared pointer of another type.
Definition at line 62 of file shared_ptr.h.
|
inline |
Destroy shared pointer.
Definition at line 68 of file shared_ptr.h.
|
inline |
Get underlying pointer.
Definition at line 93 of file shared_ptr.h.
|
inline |
Convert to bool.
Definition at line 114 of file shared_ptr.h.
|
inline |
Get underlying reference.
Definition at line 106 of file shared_ptr.h.
|
inline |
Get underlying pointer.
Definition at line 98 of file shared_ptr.h.
|
inline |
Reset shared pointer and attach it to another object.
Definition at line 73 of file shared_ptr.h.
|
inline |
Reset shared pointer and attach it to another object.
Definition at line 79 of file shared_ptr.h.
|
inline |
Reset shared pointer and attach it to another object.
Definition at line 84 of file shared_ptr.h.