libqi-api
2.0.6.8
|
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. | |
~SharedPtr () | |
Destruct the shared pointer and the pointer if current SharedPtr is the last one to hold the pointer. | |
SharedPtr (const SharedPtr< T > &sp) | |
Copy shared pointer. | |
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. | |
T & | operator* () const |
Value accessor. | |
T * | operator-> () const |
Pointer accessor. |
Lightweight implementation of shared pointers.
Definition at line 19 of file shared_ptr.hpp.
qi::SharedPtr< T >::SharedPtr | ( | T * | ptr | ) | [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.
qi::SharedPtr< T >::~SharedPtr | ( | ) | [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.
qi::SharedPtr< T >::SharedPtr | ( | const SharedPtr< T > & | sp | ) | [inline] |
Copy shared pointer.
sp | shared pointer also holding the pointer. |
Definition at line 41 of file shared_ptr.hpp.
T& qi::SharedPtr< T >::operator* | ( | ) | const [inline] |
Value accessor.
Definition at line 89 of file shared_ptr.hpp.
T* qi::SharedPtr< T >::operator-> | ( | ) | const [inline] |
Pointer accessor.
Definition at line 95 of file shared_ptr.hpp.
qi::SharedPtr< T >::operator= | ( | SharedPtr< T > & | sp | ) | [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.