libqi-api  2.0.6.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
qi::SharedPtr< T > Class Template Reference

Lightweight implementation of shared pointers. More...

#include <shared_ptr.hpp>

List of all members.

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.
SharedPtroperator= (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.

Detailed Description

template<typename T>
class qi::SharedPtr< T >

Lightweight implementation of shared pointers.

Definition at line 19 of file shared_ptr.hpp.


Constructor & Destructor Documentation

template<typename T>
qi::SharedPtr< T >::SharedPtr ( T *  ptr) [inline]

Initialization of the SharedPtr with the pointer it will manage.

Parameters:
ptrpointer to the managed data.

Definition at line 23 of file shared_ptr.hpp.

template<typename T>
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.

template<typename T>
qi::SharedPtr< T >::SharedPtr ( const SharedPtr< T > &  sp) [inline]

Copy shared pointer.

Parameters:
spshared pointer also holding the pointer.

Definition at line 41 of file shared_ptr.hpp.


Member Function Documentation

template<typename T>
T& qi::SharedPtr< T >::operator* ( ) const [inline]

Value accessor.

Definition at line 89 of file shared_ptr.hpp.

template<typename T>
T* qi::SharedPtr< T >::operator-> ( ) const [inline]

Pointer accessor.

Definition at line 95 of file shared_ptr.hpp.

template<typename T>
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.

Parameters:
spshared pointer also holding the pointer.

Definition at line 66 of file shared_ptr.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines