Main Page   Class Hierarchy   Compound List   File List   Compound Members  

zipios::ReferenceCount Template Class Reference

ReferenceCount is useful to ensure proper handling of the reference count for (objects of) classes handled through a SimpleSmartPointer. More...

#include <simplesmartptr.h>

List of all members.

Public Methods

 ReferenceCount ()
 Constructor intializes count to zero. More...

 ReferenceCount ( const ReferenceCount &src )
 Copy-constructor intializes count to zero. More...

const ReferenceCount& operator= ( const ReferenceCount &src )
 The assignment operator doesn't copy the reference count, it leaves it unchanged. More...


Detailed Description

template<class Type> template class zipios::ReferenceCount

ReferenceCount is useful to ensure proper handling of the reference count for (objects of) classes handled through a SimpleSmartPointer.

Subclassing ReferenceCount is all a class needs to become ready for being handled by SimpleSmartPointer. Another way is to add a ReferenceCount member variable to a class and write two methods 'void ref() const' and 'unsigned int unref() const' that invoke the same methods in the ReferenceCount variable.

Definition at line 99 of file simplesmartptr.h.


Constructor & Destructor Documentation

template<classType>
zipios::ReferenceCount<Type>::ReferenceCount<Type> ( )
 

Constructor intializes count to zero.

Definition at line 111 of file simplesmartptr.h.

template<classType>
zipios::ReferenceCount<Type>::ReferenceCount<Type> ( const ReferenceCount<Type> & src )
 

Copy-constructor intializes count to zero.

It doesn't copy it from src.

Definition at line 115 of file simplesmartptr.h.


Member Function Documentation

template<classType>
const ReferenceCount<Type> & zipios::ReferenceCount<Type>::operator= ( const ReferenceCount<Type> & src ) [inline]
 

The assignment operator doesn't copy the reference count, it leaves it unchanged.

Definition at line 119 of file simplesmartptr.h.


The documentation for this class was generated from the following file:
Generated at Tue Aug 14 20:39:58 2001 for Zipios++ by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000