Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

DiObjectCounter Class Reference

Class to count number of instances (objects created from a certain class). More...

Inheritance diagram for DiObjectCounter:

DiDocument DiDocument DiLookupTable DiLookupTable DiMonoModality DiMonoModality DiOverlay DiOverlay DiOverlayData DiOverlayData List of all members.

Public Member Functions

void addReference ()
 add a reference.
void removeReference ()
 remove a reference.
void addReference ()
 add a reference.
void removeReference ()
 remove a reference.

Protected Member Functions

 DiObjectCounter ()
 constructor.
virtual ~DiObjectCounter ()
 destructor
 DiObjectCounter ()
 constructor.
virtual ~DiObjectCounter ()
 destructor

Private Attributes

unsigned long Counter
 internal counter

Detailed Description

Class to count number of instances (objects created from a certain class).

used to manage more than one reference to an object in a secure way.

Definition at line 49 of file diobjcou.h.


Constructor & Destructor Documentation

DiObjectCounter::DiObjectCounter  )  [inline, protected]
 

constructor.

Internal counter is initialized with 1.

Definition at line 95 of file diobjcou.h.

DiObjectCounter::DiObjectCounter  )  [inline, protected]
 

constructor.

Internal counter is initialized with 1.

Definition at line 95 of file diobjcou.h.


Member Function Documentation

void DiObjectCounter::addReference  )  [inline]
 

add a reference.

Increase the internal counter by 1.

Definition at line 57 of file diobjcou.h.

void DiObjectCounter::addReference  )  [inline]
 

add a reference.

Increase the internal counter by 1.

Definition at line 57 of file diobjcou.h.

void DiObjectCounter::removeReference  )  [inline]
 

remove a reference.

Decrease the internal counter by 1 and delete the object only if the counter is zero.

Definition at line 71 of file diobjcou.h.

void DiObjectCounter::removeReference  )  [inline]
 

remove a reference.

Decrease the internal counter by 1 and delete the object only if the counter is zero.

Definition at line 71 of file diobjcou.h.


The documentation for this class was generated from the following files:


Generated on 8 Dec 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.9.1