DCMTK
Version 3.6.4
OFFIS DICOM Toolkit
|
abstract base class for input streams. More...
Public Member Functions | |
virtual | ~DcmInputStream () |
destructor | |
virtual OFBool | good () const |
returns the status of the stream. More... | |
virtual OFCondition | status () const |
returns the status of the stream as an OFCondition object. More... | |
virtual OFBool | eos () |
returns true if the producer is at the end of stream. More... | |
virtual offile_off_t | avail () |
returns the minimum number of bytes that can be read with the next call to read(). More... | |
virtual offile_off_t | read (void *buf, offile_off_t buflen) |
reads as many bytes as possible into the given block. More... | |
virtual offile_off_t | skip (offile_off_t skiplen) |
skips over the given number of bytes (or less) More... | |
virtual offile_off_t | tell () const |
returns the total number of bytes read from the stream so far More... | |
virtual OFCondition | installCompressionFilter (E_StreamCompression filterType) |
installs a compression filter for the given stream compression type, which should be neither ESC_none nor ESC_unsupported. More... | |
virtual DcmInputStreamFactory * | newFactory () const =0 |
creates a new factory object for the current stream and stream position. More... | |
virtual void | mark () |
marks the current stream position for a later putback operation, overwriting a possibly existing prior putback mark. More... | |
virtual void | putback () |
resets the stream to the position previously marked with setPutbackMark(). More... | |
Protected Member Functions | |
DcmInputStream (DcmProducer *initial) | |
protected constructor, to be called from derived class constructor More... | |
const DcmProducer * | currentProducer () const |
returns pointer to current producer object | |
Private Member Functions | |
DcmInputStream (const DcmInputStream &) | |
private unimplemented copy constructor | |
DcmInputStream & | operator= (const DcmInputStream &) |
private unimplemented copy assignment operator | |
Private Attributes | |
DcmProducer * | current_ |
pointer to first node in filter chain | |
DcmInputFilter * | compressionFilter_ |
pointer to compression filter, NULL if no compression | |
offile_off_t | tell_ |
counter for number of bytes read so far | |
offile_off_t | mark_ |
putback marker | |
abstract base class for input streams.
|
protected |
protected constructor, to be called from derived class constructor
initial | initial pointer to first node in filter chain The pointer is not dereferenced in the constructor, so the object pointed to may be initialized later in the subclass constructor. |
|
virtual |
returns the minimum number of bytes that can be read with the next call to read().
The DcmObject read methods rely on avail to return a value > 0 if there is no I/O suspension since certain data such as tag and length are only read "en bloc", i.e. all or nothing.
|
virtual |
returns true if the producer is at the end of stream.
|
virtual |
returns the status of the stream.
Unless the status is good, the stream will not permit any operation.
|
virtual |
installs a compression filter for the given stream compression type, which should be neither ESC_none nor ESC_unsupported.
Once a compression filter is active, it cannot be deactivated or replaced during the lifetime of the stream.
filterType | type of compression filter |
|
virtual |
marks the current stream position for a later putback operation, overwriting a possibly existing prior putback mark.
The DcmObject read methods rely on the possibility to putback up to 132 bytes for transfer syntax detection, parse error recovery etc. Implementations of this class should guarantee a putback capability of at least 1 kbyte.
|
pure virtual |
creates a new factory object for the current stream and stream position.
When activated, the factory will be able to create new DcmInputStream delivering the same data as the current stream. Used to defer loading of value fields until accessed. If no factory object can be created (e.g. because the stream is not seekable), returns NULL.
Implemented in DcmInputFileStream, and DcmInputBufferStream.
|
virtual |
resets the stream to the position previously marked with setPutbackMark().
If the putback operation fails (no putback mark set or putback buffer exceeded), status of the producer switches to bad.
|
virtual |
reads as many bytes as possible into the given block.
buf | pointer to memory block, must not be NULL |
buflen | length of memory block |
|
virtual |
skips over the given number of bytes (or less)
skiplen | number of bytes to skip |
|
virtual |
returns the status of the stream as an OFCondition object.
Unless the status is good, the stream will not permit any operation.
|
virtual |
returns the total number of bytes read from the stream so far
Referenced by DcmFileCache::init().