Public Member Functions | |
DcmInputStream * | create () const |
create an input stream that permits reading from the temporary file | |
void | increaseRefCount () |
increase reference counter for this object | |
void | decreaseRefCount () |
decreases reference counter for this object and deletes the temporary file and this object if the reference counter becomes zero. | |
Static Public Member Functions | |
static DcmTempFileHandler * | newInstance (const char *fname) |
static method that permits creation of instances of this class (only) on the heap, never on the stack. | |
Private Member Functions | |
DcmTempFileHandler (const char *fname) | |
private constructor. | |
virtual | ~DcmTempFileHandler () |
private destructor. | |
DcmTempFileHandler (const DcmTempFileHandler &arg) | |
private undefined copy constructor | |
DcmTempFileHandler & | operator= (const DcmTempFileHandler &arg) |
private undefined copy assignment operator | |
Private Attributes | |
size_t | refCount_ |
number of references to temporary file. | |
OFString | filename_ |
path to temporary file |
It maintains a thread-safe reference counter, and when this counter is decreased to zero, unlinks (deletes) the file and then the handler object itself.
Definition at line 205 of file dcistrmf.h.
DcmTempFileHandler::DcmTempFileHandler | ( | const char * | fname | ) | [private] |
private constructor.
Instances of this class are always created through newInstance().
fname | path to temporary file |
virtual DcmTempFileHandler::~DcmTempFileHandler | ( | ) | [private, virtual] |
private destructor.
Instances of this class are always deleted through the reference counting methods
static DcmTempFileHandler* DcmTempFileHandler::newInstance | ( | const char * | fname | ) | [static] |
static method that permits creation of instances of this class (only) on the heap, never on the stack.
A newly created instance always has a reference counter of 1.
fname | path to temporary file |
DcmInputStream* DcmTempFileHandler::create | ( | ) | const |
create an input stream that permits reading from the temporary file
size_t DcmTempFileHandler::refCount_ [private] |
number of references to temporary file.
Default initialized to 1 upon construction of this object
Definition at line 254 of file dcistrmf.h.