Go to Overview over all GrAL packages.
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

copy_on_write_ptr Class Template Reference

A smart copy-on-write pointer. More...

#include <reference-count.h>

List of all members.

Public Methods

 copy_on_write_ptr (T *pt=0)
 copy_on_write_ptr (const copy_on_write_ptr< T > &rhs)
copy_on_write_ptr< T > & operator= (const copy_on_write_ptr< T > &rhs)
 ~copy_on_write_ptr ()
const T * operator-> () const
const T & operator * () const
T & operator * ()
T * operator-> ()


Detailed Description

template<class T>
class copy_on_write_ptr< T >

A smart copy-on-write pointer.

This class has been adapted from Scott Meyers "More Effective C++". The class can be used also for pointers to abstract classes, due to replacement of `new T' by copy_traits<T>::clone(T*).

Definition at line 55 of file reference-count.h.


Constructor & Destructor Documentation

template<class T>
copy_on_write_ptr< T >::copy_on_write_ptr T *    pt = 0 [inline]
 

Definition at line 82 of file reference-count.h.

template<class T>
copy_on_write_ptr< T >::copy_on_write_ptr const copy_on_write_ptr< T > &    rhs [inline]
 

Definition at line 58 of file reference-count.h.

template<class T>
copy_on_write_ptr< T >::~copy_on_write_ptr   [inline]
 

Definition at line 61 of file reference-count.h.


Member Function Documentation

template<class T>
copy_on_write_ptr< T > & copy_on_write_ptr< T >::operator= const copy_on_write_ptr< T > &    rhs [inline]
 

Definition at line 91 of file reference-count.h.

References counter.

template<class T>
const T* copy_on_write_ptr< T >::operator->   const [inline]
 

Definition at line 63 of file reference-count.h.

template<class T>
const T& copy_on_write_ptr< T >::operator *   const [inline]
 

Definition at line 64 of file reference-count.h.

template<class T>
T& copy_on_write_ptr< T >::operator *   [inline]
 

Definition at line 66 of file reference-count.h.

template<class T>
T* copy_on_write_ptr< T >::operator->   [inline]
 

Definition at line 67 of file reference-count.h.


The documentation for this class was generated from the following file:
Copyright (c) Guntram Berti 1997-2002. See the GrAL Homepage for up-to-date information.

Generated at Tue Feb 26 15:57:04 2002 for Utilities by doxygen 1.2.11-20011104 written by Dimitri van Heesch, © 1997-2000