DcmProducer Class Reference

pure virtual abstract base class for producers, i.e. More...

Inheritance diagram for DcmProducer:

DcmBufferProducer DcmFileProducer DcmInputFilter DcmZLibInputFilter List of all members.

Public Member Functions

virtual ~DcmProducer ()
 destructor
virtual OFBool good () const =0
 returns the status of the producer.
virtual OFCondition status () const =0
 returns the status of the producer as an OFCondition object.
virtual OFBool eos () const =0
 returns true if the producer is at the end of stream.
virtual Uint32 avail () const =0
 returns the minimum number of bytes that can be read with the next call to read().
virtual Uint32 read (void *buf, Uint32 buflen)=0
 reads as many bytes as possible into the given block.
virtual Uint32 skip (Uint32 skiplen)=0
 skips over the given number of bytes (or less)
virtual void putback (Uint32 num)=0
 resets the stream to the position by the given number of bytes.

Detailed Description

pure virtual abstract base class for producers, i.e.

the initial node of a filter chain in an input stream.

Definition at line 47 of file dcistrma.h.


Member Function Documentation

virtual Uint32 DcmProducer::avail  )  const [pure 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.

Returns:
minimum of data available in producer

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual OFBool DcmProducer::eos  )  const [pure virtual]
 

returns true if the producer is at the end of stream.

Returns:
true if end of stream, false otherwise

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual OFBool DcmProducer::good  )  const [pure virtual]
 

returns the status of the producer.

Unless the status is good, the producer will not permit any operation.

Returns:
status, true if good

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual void DcmProducer::putback Uint32  num  )  [pure virtual]
 

resets the stream to the position by the given number of bytes.

Parameters:
num number of bytes to putback. If the putback operation fails, the producer status becomes bad.

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual Uint32 DcmProducer::read void *  buf,
Uint32  buflen
[pure virtual]
 

reads as many bytes as possible into the given block.

Parameters:
buf pointer to memory block, must not be NULL
buflen length of memory block
Returns:
number of bytes actually read.

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual Uint32 DcmProducer::skip Uint32  skiplen  )  [pure virtual]
 

skips over the given number of bytes (or less)

Parameters:
skiplen number of bytes to skip
Returns:
number of bytes actually skipped.

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.

virtual OFCondition DcmProducer::status  )  const [pure virtual]
 

returns the status of the producer as an OFCondition object.

Unless the status is good, the producer will not permit any operation.

Returns:
status, EC_Normal if good

Implemented in DcmBufferProducer, DcmFileProducer, and DcmZLibInputFilter.


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


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5