Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members  

CountedRef Class Reference

#include <SmartPtr.h>

List of all members.

Protected Methods

 CountedRef ()
 CountedRef (const CountedRef &c)
template<class PointerType> void increment (PointerType &)
template<class PointerType> bool decrement (PointerType &)
template<class PointerType> void swap (PointerType &p)


Detailed Description

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-05-30T20:07:09-0400>
Version:
2.1.2
Reference counting ownership policy for a SmartPtr; based, in part, on Andrei Alexandrescu's implementation in "Modern C++ Design".


Constructor & Destructor Documentation

CountedRef   [inline, protected]
 

Create a new CountedRef with a count of 1.

CountedRef const CountedRef &    c [inline, protected]
 

Copy another CountedRef, sharing its count.

Parameters:
c  const CountedRef&


Member Function Documentation

bool decrement PointerType &    [inline, protected]
 

Decrement the reference count.

Returns:
true if the count dropped to 0.

void increment PointerType &    [inline, protected]
 

Increment the reference count.

void swap PointerType &    p [inline, protected]
 

Swap the the internal count with another CountedRef.


The documentation for this class was generated from the following file:
Generated on Thu May 30 21:10:39 2002 for ZThread by doxygen1.2.15