#include <UseCount.H>
Public Member Functions | |
UseCount () | |
Construct a UseCount initialized to one. | |
UseCount (const UseCount &rhs) | |
The copy constructor -- bumps reference count. | |
UseCount & | operator= (const UseCount &rhs) |
The assignment operator. | |
~UseCount () | |
The destructor -- decrements the reference count. | |
bool | unique () const |
The UseCount is unique if the reference count == 1. | |
int | linkCount () const |
Returns the reference count. |
This class encapsulates reference counts.
UseCount::UseCount | ( | ) |
Construct a UseCount initialized to one.
UseCount::UseCount | ( | const UseCount & | rhs | ) |
The copy constructor -- bumps reference count.
UseCount::~UseCount | ( | ) |
The destructor -- decrements the reference count.
The assignment operator.
Increments the reference count on rhs, decrements the reference count on this, and then makes this and rhs point to the same reference count.
References cnt.
bool UseCount::unique | ( | ) | const [inline] |
The UseCount is unique if the reference count == 1.
Referenced by LnClassPtr< T >::unique(), LnPtr< T >::unique(), LnClassPtr< T >::~LnClassPtr(), and LnPtr< T >::~LnPtr().
int UseCount::linkCount | ( | ) | const [inline] |
Returns the reference count.
Referenced by LnClassPtr< T >::linkCount(), and LnPtr< T >::linkCount().