DCMTK: DcmConsumer Class Reference

DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | List of all members
DcmConsumer Class Referenceabstract

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

Inheritance diagram for DcmConsumer:

## Public Member Functions
virtual | ~DcmConsumer ()
| destructor
virtual OFBool | good () const =0
| returns the status of the consumer.
virtual OFCondition | status () const =0
| returns the status of the consumer as an OFCondition object.
virtual OFBool | isFlushed () const =0
| returns true if the consumer is flushed, i.e.
virtual offile_off_t | avail () const =0
| returns the minimum number of bytes that can be written with the next call to write().
virtual offile_off_t | write (const void *buf, offile_off_t buflen)=0
| processes as many bytes as possible from the given input block.
virtual void | flush ()=0
| instructs the consumer to flush its internal content until either the consumer becomes "flushed" or I/O suspension occurs.

## Detailed Description

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

the final node of a filter chain in an output stream.

## Member Function Documentation

## ◆ avail()

virtual offile_off_t DcmConsumer::avail | ( |  | ) | const
| pure virtual

returns the minimum number of bytes that can be written with the next call to write().

The DcmObject write 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 written "en bloc", i.e. all or nothing.

Returns
  minimum of space available in consumer

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

## ◆ flush()

virtual void DcmConsumer::flush | ( |  | ) |
| pure virtual

instructs the consumer to flush its internal content until either the consumer becomes "flushed" or I/O suspension occurs.

After a call to flush(), a call to write() will produce undefined behaviour.

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

## ◆ good()

virtual OFBool DcmConsumer::good | ( |  | ) | const
| pure virtual

returns the status of the consumer.

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

Returns
  status, true if good

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

## ◆ isFlushed()

virtual OFBool DcmConsumer::isFlushed | ( |  | ) | const
| pure virtual

returns true if the consumer is flushed, i.e.

has no more data pending in it's internal state that needs to be flushed before the stream is closed.

Returns
  true if consumer is flushed, false otherwise

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

## ◆ status()

virtual OFCondition DcmConsumer::status | ( |  | ) | const
| pure virtual

returns the status of the consumer as an OFCondition object.

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

Returns
  status, EC_Normal if good

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

## ◆ write()

virtual offile_off_t DcmConsumer::write | ( | const void * | buf,
|  | offile_off_t | buflen )
| pure virtual

processes as many bytes as possible from the given input block.

Parameters

  buf | pointer to memory block, must not be NULL
  buflen | length of memory block

Returns
  number of bytes actually processed.

Implemented in DcmBufferConsumer, DcmFileConsumer, DcmStdoutConsumer, and DcmZLibOutputFilter.

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

- dcmdata/include/dcmtk/dcmdata/dcostrma.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.16.1