33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmdata/dcistrma.h"
55 virtual OFBool
good()
const;
75 virtual offile_off_t
avail();
82 virtual offile_off_t
read(
void *buf, offile_off_t buflen);
88 virtual offile_off_t
skip(offile_off_t skiplen);
94 virtual void putback(offile_off_t num);
this class provides a simple C++ encapsulation layer for stdio FILE pointers.
DcmInputStream * create() const
create an input stream that permits reading from the temporary file
void increaseRefCount()
increase reference counter for this object
virtual ~DcmFileProducer()
destructor
virtual OFBool eos()
returns true if the producer is at the end of stream.
virtual OFBool good() const
returns the status of the producer.
virtual offile_off_t read(void *buf, offile_off_t buflen)
reads as many bytes as possible into the given block.
class that manages the life cycle of a temporary file.
virtual void putback(offile_off_t num)
resets the stream to the position by the given number of bytes.
DcmTempFileHandler(const char *fname)
private constructor.
virtual offile_off_t avail()
returns the minimum number of bytes that can be read with the next call to read().
DcmFileProducer(const char *filename, offile_off_t offset=0)
constructor
DcmTempFileHandler & operator=(const DcmTempFileHandler &arg)
private undefined copy assignment operator
provides an operating system independent abstraction for mutexes (mutual exclusion locks)...
virtual ~DcmTempFileHandler()
private destructor.
size_t refCount_
number of references to temporary file.
static DcmTempFileHandler * newInstance(const char *fname)
static method that permits creation of instances of this class (only) on the heap, never on the stack.
OFString filename_
path to temporary file
DcmFileProducer & operator=(const DcmFileProducer &)
private unimplemented copy assignment operator
OFFile file_
the file we're actually reading from
offile_off_t size_
number of bytes in file
producer class that reads data from a plain file.
a simple string class that implements a subset of std::string.
virtual offile_off_t skip(offile_off_t skiplen)
skips over the given number of bytes (or less)
pure virtual abstract base class for producers, i.e.
void decreaseRefCount()
decreases reference counter for this object and deletes the temporary file and this object if the ref...
OFCondition status_
status
virtual OFCondition status() const
returns the status of the producer as an OFCondition object.
General purpose class for condition codes.