Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

GenericReference< Tp > Class Template Reference

#include <refcount.hpp>

Inheritance diagram for GenericReference< Tp >:

Inheritance graph
[legend]
Collaboration diagram for GenericReference< Tp >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class Tp>
class GenericReference< Tp >

Template for creating application-defined references to g/c classes.

This template implements some common methods to deal with garbage collecting pointers invented above.

Note:
T must be a descender of GarbageSafe class

Definition at line 146 of file refcount.hpp.

Public Member Functions

 GenericReference ()
 Creates NULL reference.
 GenericReference (const Tp *tp)
 Creates a reference from a plain pointer.
 GenericReference (const GenericReference &other)
 Copy constructor.
 ~GenericReference ()
 Destructor.
GenericReferenceoperator= (Tp *tp)
 Assignment.
GenericReferenceoperator= (const GenericReference &other)
 Assignment.
Tp * GetPtr () const
 Get a plain pointer.
Tp * operator-> () const
 Field/method selection.
Tp & operator * () const
 Dereference.


Constructor & Destructor Documentation

template<class Tp>
GenericReference< Tp >::GenericReference  ) 
 

Creates NULL reference.

Definition at line 149 of file refcount.hpp.

template<class Tp>
GenericReference< Tp >::GenericReference const Tp *  tp  ) 
 

Creates a reference from a plain pointer.

Definition at line 151 of file refcount.hpp.

template<class Tp>
GenericReference< Tp >::GenericReference const GenericReference< Tp > &  other  ) 
 

Copy constructor.

Definition at line 153 of file refcount.hpp.

template<class Tp>
GenericReference< Tp >::~GenericReference  ) 
 

Destructor.

Definition at line 156 of file refcount.hpp.


Member Function Documentation

template<class Tp>
GenericReference& GenericReference< Tp >::operator= Tp *  tp  ) 
 

Assignment.

Reimplemented in SReference.

Definition at line 159 of file refcount.hpp.

Referenced by SReference::operator=().

template<class Tp>
GenericReference& GenericReference< Tp >::operator= const GenericReference< Tp > &  other  ) 
 

Assignment.

Definition at line 165 of file refcount.hpp.

template<class Tp>
Tp* GenericReference< Tp >::GetPtr  )  const
 

Get a plain pointer.

Reimplemented from GarbageSafePointer.

Reimplemented in GenericSReference< Tp, X_wrongtype >, SBacklinkRef, SReference, SQueue, GenericSReference< SExpressionStream, IntelibX_not_a_stream >, GenericSReference< SchExpressionContext, IntelibX_scheme_not_a_context >, GenericSReference< SExpressionWrapper< Data >, IntelibX_wrong_expression_type >, GenericSReference< LExpressionSymbol, IntelibX_lisp_not_a_symbol >, GenericSReference< SExpressionDoubleList, IntelibX_not_a_doublelist >, GenericSReference< SExpressionString, IntelibX_not_a_string >, GenericSReference< SExpressionHashPackage, IntelibX_not_a_package >, GenericSReference< SExpressionVector, IntelibX_not_a_vector >, GenericSReference< SExpressionHashTable, IntelibX_not_a_hash_table >, GenericSReference< SchExpressionSymbol, IntelibX_scheme_not_a_symbol >, and GenericSReference< LExpressionContext, IntelibX_lisp_not_a_context >.

Definition at line 171 of file refcount.hpp.

Referenced by SReference::GetPtr(), GenericReference< SExpression >::operator *(), and GenericReference< SExpression >::operator->().

template<class Tp>
Tp* GenericReference< Tp >::operator->  )  const
 

Field/method selection.

Reimplemented in GenericSReference< Tp, X_wrongtype >, SBacklinkRef, GenericSReference< SExpressionStream, IntelibX_not_a_stream >, GenericSReference< SchExpressionContext, IntelibX_scheme_not_a_context >, GenericSReference< SExpressionWrapper< Data >, IntelibX_wrong_expression_type >, GenericSReference< LExpressionSymbol, IntelibX_lisp_not_a_symbol >, GenericSReference< SExpressionDoubleList, IntelibX_not_a_doublelist >, GenericSReference< SExpressionString, IntelibX_not_a_string >, GenericSReference< SExpressionHashPackage, IntelibX_not_a_package >, GenericSReference< SExpressionVector, IntelibX_not_a_vector >, GenericSReference< SExpressionHashTable, IntelibX_not_a_hash_table >, GenericSReference< SchExpressionSymbol, IntelibX_scheme_not_a_symbol >, and GenericSReference< LExpressionContext, IntelibX_lisp_not_a_context >.

Definition at line 175 of file refcount.hpp.

template<class Tp>
Tp& GenericReference< Tp >::operator *  )  const
 

Dereference.

Reimplemented in GenericSReference< Tp, X_wrongtype >, GenericSReference< SExpressionStream, IntelibX_not_a_stream >, GenericSReference< SchExpressionContext, IntelibX_scheme_not_a_context >, GenericSReference< SExpressionWrapper< Data >, IntelibX_wrong_expression_type >, GenericSReference< LExpressionSymbol, IntelibX_lisp_not_a_symbol >, GenericSReference< SExpressionDoubleList, IntelibX_not_a_doublelist >, GenericSReference< SExpressionString, IntelibX_not_a_string >, GenericSReference< SExpressionHashPackage, IntelibX_not_a_package >, GenericSReference< SExpressionVector, IntelibX_not_a_vector >, GenericSReference< SExpressionHashTable, IntelibX_not_a_hash_table >, GenericSReference< SchExpressionSymbol, IntelibX_scheme_not_a_symbol >, and GenericSReference< LExpressionContext, IntelibX_lisp_not_a_context >.

Definition at line 179 of file refcount.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Dec 18 00:41:42 2007 for InteLib by  doxygen 1.4.1