Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Advanced Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWTOutputStreamBufferImp <OutputStream, FilteredOutputStreamImp>

Module:  Advanced Tools   Package:  Streams


RWTOutputStreamBufferImp FilteredOutputStreamImp

Local Index

Members

Header File

#include <rw/stream/RWTOutputStreamBufferImp.h>

Description

The class RWTOutputStreamBufferImp implements a buffer that can be used with any kind of output stream. The size of the buffer is specified in its static member make() function, which is used to create it. The buffer's role is to store elements up to its maximum capacity, and then to forward them to its associated sink stream. The buffer flushes itself upon destruction.

Member Typedefs

typedef OutputStream RWOutputStream_type   RWOutputStream_type 
typedef OutputStream::element_type                element_type 

Protected Constructors

RWTOutputStreamBufferImp(OutputStream& sinkStream);
RWTOutputStreamBufferImp(OutputStream& sinkStream, 
RWSize bufSize);
RWTOutputStreamBufferImp(OutputStream& sinkStream,
element_type* buffer,
RWSize bufSize);

Public Destructors

virtual 
~RWTOutputStreamBufferImp();

Static Public Member Functions

static OutputStream 
make(OutputStream& sinkStream);
static OutputStream 
make(OutputStream& sinkStream, RWSize bufSize);
static OutputStream 
make(OutputStream& sinkStream, element_type* buffer, 
RWSize bufSize);

Public Member Functions

virtual void 
close();
virtual void 
flush();
virtual void 
write(const element_type* array, RWSize numElements);
virtual void 
write(element_type value);

Protected Member Functions

element_type* 
epptr() const;
void 
freeBuffer();
element_type* 
pbase() const; 
void 
pbump(RWSize n);
element_type* 
pptr() const; 
void 
setp(element_type* pbeg_arg,element_type* pend_arg);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.