GCpp::gc_ptr< T > Class Template Reference

Pointer type to be used for 'managed' objects. More...

#include <gc++.hpp>

Inheritance diagram for GCpp::gc_ptr< T >:

Inheritance graph
[legend]
Collaboration diagram for GCpp::gc_ptr< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 gc_ptr ()
 Default constructor.
 gc_ptr (T *p_item)
 Constructor.
gc_ptr< T > & operator= (const gc_ptr< T > &p_other)
 Assignment.
gc_ptr< T > & operator= (T *p_item)
 Assignment.
 operator bool ()
 Conversion to bool.
T * operator-> () const
 Access.
T & operator * () const
 Access.
void * storage () const
 accessor

Public Attributes

GCBasePointernext
 Implementation detail.
GCBasePointerprior
 Implementation detail.

Protected Member Functions

char fetch_state ()
 state

Protected Attributes

void * f_storage
 the managed object
char f_state
 state


Detailed Description

template<class T>
class GCpp::gc_ptr< T >

Pointer type to be used for 'managed' objects.

This pointer type has to be used to hold objects allocated with gcnew .

Definition at line 242 of file gc++.hpp.


Constructor & Destructor Documentation

template<class T>
GCpp::gc_ptr< T >::gc_ptr ( T *  p_item  )  [inline, explicit]

Constructor.

Parameters:
p_item pointee

Definition at line 254 of file gc++.hpp.


Member Function Documentation

template<class T>
GCpp::gc_ptr< T >::operator bool (  )  [inline]

Conversion to bool.

Returns:
true = pointer points to something

Definition at line 277 of file gc++.hpp.

References GCpp::GCBasePointer::f_storage.

template<class T>
T* GCpp::gc_ptr< T >::operator-> (  )  const [inline]

Access.

Returns:
memory address this points to, maybe 0

Definition at line 285 of file gc++.hpp.

References GCpp::GCBasePointer::f_storage.

template<class T>
T& GCpp::gc_ptr< T >::operator * (  )  const [inline]

Access.

Unspecified behaviour (read: crash) if there is nothing to dereference.

Returns:
dereferenced memory

Definition at line 295 of file gc++.hpp.

References GCpp::GCBasePointer::f_storage.


The documentation for this class was generated from the following file:
Generated on Thu Dec 27 14:02:00 2007 for GC++ by  doxygen 1.5.4