fatalmind::gc_ptr< T, TM > Class Template Reference

#include <gc_ptr.hh>

List of all members.


Detailed Description

template<class T, class TM = fatalmind::DefaultThreadedModel>
class fatalmind::gc_ptr< T, TM >

Garbage collected pointer.

Suitable to be used with STL container classes.

Public Member Functions

 gc_ptr (T *p=0)
void resetFromExisting (T *ptr)
 Use with care.
 gc_ptr (const gc_ptr< T, TM > &p) throw ()
 gc_ptr (const gc_ptr_ref< T, TM > &p) throw ()
gc_ptr< T, TM > & operator= (const gc_ptr< T, TM > &p) throw ()
T & operator * () const throw ()
T * operator-> () const throw ()
T * get () const throw ()
bool isNull () const throw ()
void reset (T *ptr=0) throw ()
bool operator< (const gc_ptr< T > &a) const
template<class Y>
 o () throw ()

Protected Member Functions

void dispose () throw ()

Static Protected Member Functions

static usg_cnt * newUsageCounter (const T *p)

Protected Attributes

T * d_ptr
usg_cnt * d_usg


Member Function Documentation

template<class T, class TM = fatalmind::DefaultThreadedModel>
void fatalmind::gc_ptr< T, TM >::resetFromExisting ( T *  ptr  )  [inline]

Use with care.

Can be used to re-create a gc_ptr out of an pointer to an object which is owned by another gc_ptr's BUT is derived from usg_cnt_t so that it is known where the counter is.

will casue undefined behviour if applied to objects on the stack


The documentation for this class was generated from the following file:
Generated on Mon Nov 9 16:21:24 2009 for ResourcePool by  doxygen 1.5.3