32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/ofstd/oftypes.h"
34 #include "dcmtk/ofstd/ofcond.h"
35 #include "dcmtk/dcmdata/dcxfer.h"
36 #include "dcmtk/ofstd/offile.h"
54 virtual OFBool
good()
const = 0;
76 virtual offile_off_t
avail()
const = 0;
83 virtual offile_off_t
write(
const void *buf, offile_off_t buflen) = 0;
90 virtual void flush() = 0;
130 virtual OFBool
good()
const;
152 virtual offile_off_t
avail()
const;
159 virtual offile_off_t
write(
const void *buf, offile_off_t buflen);
166 virtual void flush();
171 virtual offile_off_t
tell()
const;
virtual OFCondition status() const
returns the status of the consumer as an OFCondition object.
DcmOutputStream(DcmConsumer *initial)
protected constructor, to be called from derived class constructor
virtual OFCondition installCompressionFilter(E_StreamCompression filterType)
installs a compression filter for the given stream compression type, which should be neither ESC_none...
virtual ~DcmOutputStream()
destructor
virtual offile_off_t tell() const
returns the total number of bytes written to the stream so far
base class for output streams.
DcmConsumer * current_
pointer to first node in filter chain
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...
virtual offile_off_t avail() const
returns the minimum number of bytes that can be written with the next call to write().
virtual ~DcmConsumer()
destructor
virtual OFCondition status() const =0
returns the status of the consumer as an OFCondition object.
virtual void flush()
instructs the stream to flush its internal content until either the stream becomes "flushed" or I/O s...
pure virtual abstract base class for output filters, i.e.
virtual OFBool isFlushed() const
returns true if the stream is flushed, i.e.
virtual OFBool good() const
returns the status of the stream.
virtual offile_off_t write(const void *buf, offile_off_t buflen)
processes as many bytes as possible from the given input block.
virtual void append(DcmConsumer &consumer)=0
determines the consumer to which the filter is supposed to write it's output.
offile_off_t tell_
counter for number of bytes written so far
virtual OFBool good() const =0
returns the status of the consumer.
virtual OFBool isFlushed() const =0
returns true if the consumer is flushed, i.e.
DcmOutputFilter * compressionFilter_
pointer to compression filter, NULL if no compression
virtual offile_off_t avail() const =0
returns the minimum number of bytes that can be written with the next call to write().
pure virtual abstract base class for consumers, i.e.
DcmOutputStream & operator=(const DcmOutputStream &)
private unimplemented copy assignment operator
virtual ~DcmOutputFilter()
destructor
General purpose class for condition codes.