shared_pointer Class Template Reference

#include <pointer.hpp>

Inheritance diagram for shared_pointer:

Inheritance graph
[legend]
Collaboration diagram for shared_pointer:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T, bool ARRAY_PTR = false>
class gsgl::data::shared_pointer< T, ARRAY_PTR >

A smart pointer class with reference counting.

When the last shared pointer goes out of scope, the object it's pointing to will be deleted. Assigning a new pointer value to a shared pointer object will break its link to the old object.

Definition at line 189 of file pointer.hpp.


Public Member Functions

 operator const T * () const
 operator T * ()
T & operator* ()
const T & operator* () const
T * operator-> ()
const T * operator-> () const
shared_pointeroperator= (T *data)
shared_pointeroperator= (const shared_pointer &p)
bool operator== (const shared_pointer &p) const
T * ptr ()
const T * ptr () const
 shared_pointer (const shared_pointer &p)
 shared_pointer (T *data=0)
T & value ()
const T & value () const
 ~shared_pointer ()

Private Attributes

shared_pointer_impl< T,
ARRAY_PTR > * 
impl

Constructor & Destructor Documentation

shared_pointer ( T *  data = 0  )  [inline]

Definition at line 225 of file pointer.hpp.

References shared_pointer::impl.

shared_pointer ( const shared_pointer< T, ARRAY_PTR > &  p  )  [inline]

Definition at line 232 of file pointer.hpp.

References shared_pointer::impl.

~shared_pointer (  )  [inline]

Definition at line 259 of file pointer.hpp.

References shared_pointer::impl.


Member Function Documentation

operator const T * (  )  const [inline]

Definition at line 322 of file pointer.hpp.

References shared_pointer::impl.

operator T * (  )  [inline]

Definition at line 329 of file pointer.hpp.

References shared_pointer::impl.

T & operator* (  )  [inline]

Definition at line 301 of file pointer.hpp.

References shared_pointer::impl.

const T & operator* (  )  const [inline]

Definition at line 294 of file pointer.hpp.

References shared_pointer::impl.

T * operator-> (  )  [inline]

Definition at line 315 of file pointer.hpp.

References shared_pointer::impl.

const T * operator-> (  )  const [inline]

Definition at line 308 of file pointer.hpp.

References shared_pointer::impl.

shared_pointer< T, ARRAY_PTR > & operator= ( T *  data  )  [inline]

Definition at line 249 of file pointer.hpp.

References shared_pointer::impl.

shared_pointer< T, ARRAY_PTR > & operator= ( const shared_pointer< T, ARRAY_PTR > &  p  )  [inline]

Definition at line 239 of file pointer.hpp.

References shared_pointer::impl.

bool operator== ( const shared_pointer< T, ARRAY_PTR > &  p  )  const [inline]

Definition at line 336 of file pointer.hpp.

References shared_pointer::impl.

T * ptr (  )  [inline]

Definition at line 273 of file pointer.hpp.

References shared_pointer::impl.

const T * ptr (  )  const [inline]

Definition at line 266 of file pointer.hpp.

References shared_pointer::impl.

T & value (  )  [inline]

Definition at line 287 of file pointer.hpp.

References shared_pointer::impl.

const T & value (  )  const [inline]

Definition at line 280 of file pointer.hpp.

References shared_pointer::impl.


Member Data Documentation

shared_pointer_impl<T, ARRAY_PTR>* impl [private]


The documentation for this class was generated from the following file:

Generated on Sat Mar 1 13:50:06 2008 for Periapsis Project by  doxygen 1.5.5