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

RWTTransformInputStreamImp

Module:  XML Streams   Package:  XML Streams


RWTTransformInputStreamImp FilteredInputStreamImp

Local Index

Members

Header File

#include <rw/xmlstreams/RWTTransformInputStreamImp.h>

Description

The class RWTTransformInputStreamImp implements a buffered char or byte input character stream that includes a transformation. The size of the buffer is specified as a parameter to the static make() function that is used to create it. If the buffer as initialized is not large enough to contain the entire XML document, it grows as needed to be able to do so. It is more efficient, though, to allocate a buffer of sufficient size initially.

RWTTransformInputStreamImp is a class template that is derived from one of its own template parameters.

The class is defined as

When the read() or readUntil() is first called on this class, the transform() method of the transformation object passed into the constructor gets called. The transform() method reads from the source, applies the transformation defined by the method, and stores the result in the buffer. Once the buffer contains the entire transformed document, the call to read() or readUntil() is completed by reading from the buffer.

Public Typedef

typedef typename InputStream::element_type
element_type;

NOTE -- Be aware that characters in the stream are called "elements," which have no connection to XML "elements."

Static Public Member Functions

static InputStream
make(const InputStream& sourceStream, Transform transform);
static InputStream
make(const InputStream& sourceStream, Transform transform,
     RWSize bufSize);
static InputStream
make(const InputStream& sourceStream, Transform transform,
     element_type* buffer, RWSize bufSize);

Public Destructor

virtual
~RWTTransformInputStreamImp();

Public Member Functions

virtual RWSize
available() const;
virtual bool
isEof() const;
virtual bool
isBad() const;
virtual bool
isFail() const;
virtual bool
isGood() const;
virtual element_type
read();
virtual RWSize
read(element_type* array, RWSize num);
virtual RWSize
readUntil(element_type* array, RWSize maxSize,
          element_type delim);

Protected Constructors

RWTTransformInputStreamImp(const InputStream& sourceStream,
  Transform transform);
RWTTransformInputStreamImp(const InputStream& sourceStream,
  Transform transform, RWSize bufSize);
RWTTransformInputStreamImp(const InputStream& sourceStream, 
  Transform transform, element_type* buffer, RWSize bufSize);

Protected Member Functions

element_type*
eback() const;
element_type*
ebuf() const;
element_type*
egptr() const;
void
freeBuffer();
void
gbump(RWSize n);
element_type*
gptr() const;
void
setBufferEnd(element_type* gend_arg);
void
setg(element_type* gbeg_arg,element_type* gcur_arg, 
     element_type* gend_arg);
bool
underflow();


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.