|
libqi-api
2.1.4.13
|
Lightweight implementation of shared pointers. More...
#include <shared_ptr.hpp>
Public Member Functions | |
| SharedPtr (T *ptr) | |
| Initialization of the SharedPtr with the pointer it will manage. More... | |
| ~SharedPtr () | |
| Destruct the shared pointer and the pointer if current SharedPtr is the last one to hold the pointer. More... | |
| SharedPtr (const SharedPtr< T > &sp) | |
| Copy shared pointer. More... | |
| SharedPtr & | operator= (SharedPtr< T > &sp) |
| Link current SharedPtr to a new pointer. If old pointer was only held by the current SharedPtr, it is freed. More... | |
| T & | operator* () const |
| Value accessor. More... | |
| T * | operator-> () const |
| Pointer accessor. More... | |
Lightweight implementation of shared pointers.
Definition at line 19 of file shared_ptr.hpp.
|
inline |
Initialization of the SharedPtr with the pointer it will manage.
| ptr | pointer to the managed data. |
Definition at line 23 of file shared_ptr.hpp.
|
inline |
Destruct the shared pointer and the pointer if current SharedPtr is the last one to hold the pointer.
Definition at line 31 of file shared_ptr.hpp.
|
inline |
Copy shared pointer.
| sp | shared pointer also holding the pointer. |
Definition at line 41 of file shared_ptr.hpp.
|
inline |
Value accessor.
Definition at line 89 of file shared_ptr.hpp.
|
inline |
Pointer accessor.
Definition at line 95 of file shared_ptr.hpp.
|
inline |
Link current SharedPtr to a new pointer. If old pointer was only held by the current SharedPtr, it is freed.
| sp | shared pointer also holding the pointer. |
Definition at line 66 of file shared_ptr.hpp.