OFFIS DCMTK  Version 3.6.0
dcostrmb.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmdata
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose: DcmOutputBufferStream and related classes,
19  * implements output to blocks of memory as needed in the dcmnet module.
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:15:41 $
23  * CVS/RCS Revision: $Revision: 1.5 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef DCOSTRMB_H
31 #define DCOSTRMB_H
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmdata/dcostrma.h"
35 
40 {
41 public:
42 
48  DcmBufferConsumer(void *buf, offile_off_t bufLen);
49 
51  virtual ~DcmBufferConsumer();
52 
57  virtual OFBool good() const;
58 
63  virtual OFCondition status() const;
64 
70  virtual OFBool isFlushed() const;
71 
79  virtual offile_off_t avail() const;
80 
86  virtual offile_off_t write(const void *buf, offile_off_t buflen);
87 
93  virtual void flush();
94 
102  virtual void flushBuffer(void *& buffer, offile_off_t& length);
103 
104 private:
105 
108 
111 
113  unsigned char *buffer_;
114 
116  offile_off_t bufSize_;
117 
119  offile_off_t filled_;
120 
123 };
124 
125 
130 {
131 public:
137  DcmOutputBufferStream(void *buf, offile_off_t bufLen);
138 
140  virtual ~DcmOutputBufferStream();
141 
149  virtual void flushBuffer(void *& buffer, offile_off_t& length);
150 
151 private:
152 
155 
158 
161 
162 };
163 
164 
165 #endif
166 
167 /*
168  * CVS/RCS Log:
169  * $Log: dcostrmb.h,v $
170  * Revision 1.5 2010-10-14 13:15:41 joergr
171  * Updated copyright header. Added reference to COPYRIGHT file.
172  *
173  * Revision 1.4 2009-11-04 09:58:07 uli
174  * Switched to logging mechanism provided by the "new" oflog module
175  *
176  * Revision 1.3 2007-02-19 16:06:09 meichel
177  * Class DcmOutputStream and related classes are now safe for use with
178  * large files (2 GBytes or more) if supported by compiler and operating system.
179  *
180  * Revision 1.2 2005/12/08 16:28:25 meichel
181  * Changed include path schema for all DCMTK header files
182  *
183  * Revision 1.1 2002/08/27 16:55:36 meichel
184  * Initial release of new DICOM I/O stream classes that add support for stream
185  * compression (deflated little endian explicit VR transfer syntax)
186  *
187  *
188  */
virtual ~DcmOutputBufferStream()
destructor
DcmBufferConsumer & operator=(const DcmBufferConsumer &)
private unimplemented copy assignment operator
virtual OFBool good() const
returns the status of the consumer.
output stream that writes into a buffer of fixed length which must be provided by the caller...
Definition: dcostrmb.h:129
virtual OFCondition status() const
returns the status of the consumer as an OFCondition object.
base class for output streams.
Definition: dcostrma.h:119
DcmBufferConsumer consumer_
the final consumer of the filter chain
Definition: dcostrmb.h:160
DcmBufferConsumer(void *buf, offile_off_t bufLen)
constructor
virtual OFBool isFlushed() const
returns true if the consumer is flushed, i.e.
consumer class that stores data in a buffer provided by the caller.
Definition: dcostrmb.h:39
OFCondition status_
status
Definition: dcostrmb.h:122
offile_off_t filled_
number of bytes filled in buffer
Definition: dcostrmb.h:119
unsigned char * buffer_
the buffer we're actually writing to
Definition: dcostrmb.h:113
DcmOutputBufferStream(void *buf, offile_off_t bufLen)
constructor
virtual void flushBuffer(void *&buffer, offile_off_t &length)
retrieves and flushes the underlying buffer.
virtual ~DcmBufferConsumer()
destructor
offile_off_t bufSize_
size of the buffer, in bytes
Definition: dcostrmb.h:116
virtual offile_off_t write(const void *buf, offile_off_t buflen)
processes as many bytes as possible from the given input block.
virtual offile_off_t avail() const
returns the minimum number of bytes that can be written with the next call to write().
DcmOutputBufferStream & operator=(const DcmOutputBufferStream &)
private unimplemented copy assignment operator
pure virtual abstract base class for consumers, i.e.
Definition: dcostrma.h:41
virtual void flushBuffer(void *&buffer, offile_off_t &length)
retrieves and flushes the underlying buffer.
virtual void flush()
instructs the consumer to flush its internal content until either the consumer becomes "flushed" or I...
General purpose class for condition codes.
Definition: ofcond.h:305


Generated on Thu Aug 27 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1