Inherits FilteredInputStreamImp.
|
| RWTParsedTransformInputStreamImp (const InputStream &sourceStream, Transform transform) |
|
| RWTParsedTransformInputStreamImp (const InputStream &sourceStream, Transform transform, RWSize bufSize) |
|
| RWTParsedTransformInputStreamImp (const InputStream &sourceStream, Transform transform, element_type *buffer, RWSize bufSize) |
|
element_type * | eback () const |
|
element_type * | ebuf () const |
|
element_type * | egptr () const |
|
void | freeBuffer () |
|
void | gbump (RWSize n) |
|
element_type * | gptr () const |
|
void | putBack (element_type cur) |
|
element_type | readAttribute (element_type cur, string_type &token) |
|
element_type | readAttributes (element_type cur, RWXmlStreamElement &element) |
|
element_type | readAttributeValue (element_type cur, string_type &token) |
|
RWXmlStreamElement | readNextElement (element_type &cur, const RWXmlStreamElement &parent) |
|
element_type | readOne () |
|
element_type | readToClose (element_type cur, string_type &token) |
|
element_type | readToken (element_type cur, string_type &token) |
|
element_type | readValue (element_type cur, RWXmlStreamElement &element) |
|
element_type | readWholeName (element_type cur, string_type &token) |
|
void | setBufferEnd (element_type *gend_arg) |
|
void | setg (element_type *gbeg_arg, element_type *gcur_arg, element_type *gend_arg) |
|
void | transform () |
|
bool | underflow () |
|
template<class InputStream, class FilteredInputStreamImp, class Transform, class Traits>
class RWTParsedTransformInputStreamImp< InputStream, FilteredInputStreamImp, Transform, Traits >
The class RWTParsedTransformInputStreamImp implements a buffer that can be used with any kind of input stream. 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.
RWTParsedTransformInputStreamImp is a class template that is derived from one of its own template parameters.
The class is defined as
template <class InputStream, class FilteredInputStreamImp,
class Transform, class Traits>
public FilteredInputStreamImp { ... };
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Initializes the reference to the input stream used as the source of elements, as well as the internal buffer, whose capacity is set equal to RW_STREAM_BUFFER_SIZE, defined as 512
bytes.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Initializes the reference to the input stream used as the source of elements, and the internal buffer, whose capacity is set to bufSize.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
The parameter bufSize is the buffer capacity in number of elements.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Initializes the reference to the input stream used as the source of elements, and the internal buffer, which is initialized using a pre-allocated element's array of size bufSize.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
The parameter buffer is a pre-allocated buffer of size bufSize to be used internally by the constructed RWTParsedTransformInputStreamImp object.
The parameter bufSize is the buffer capacity in number of elements.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
static InputStream RWTParsedTransformInputStreamImp< InputStream, FilteredInputStreamImp, Transform, Traits >::make |
( |
const InputStream & |
sourceStream, |
|
|
Transform |
transform |
|
) |
| |
|
inlinestatic |
Constructs an RWTParsedTransformInputStreamImp instance that uses sourceStream as its source of elements, and returns a handle to it. The internal buffer is initialized to be of size RW_STREAM_BUFFER_SIZE, which is defined as 512
bytes. The buffer grows as needed to contain the entire XML document.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Constructs an RWTParsedTransformInputStreamImp instance that uses sourceStream as its source of elements, and returns a handle to it. The internal buffer is initialized to be of size bufSize. The buffer grows as needed to contain the entire XML document.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
The parameter bufSize is the initial buffer capacity in number of elements.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Constructs an RWTParsedTransformInputStreamImp instance that uses sourceStream as its source of elements, and returns a handle to it. The internal buffer is initialized using a pre-allocated element array of size bufSize. The buffer grows as needed to contain the entire XML document.
The parameter sourceStream is the input stream that serves as the source of elements.
The parameter transform is the transformation object and must provide a public interface of transform(RWXmlStreamElement&)
.
The parameter buffer is a pre-allocated buffer of size bufSize to be used internally by the constructed RWTParsedTransformInputStreamImp object.
The parameter bufSize is the initial buffer capacity in number of elements.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Reads an array of elements from the input stream. Returns the actual number of elements read.
The parameter array is a pointer to the beginning of the array used to store the input. The array must have been pre-allocated to contain at least num elements.
The parameter num is the number of elements to be read from the stream
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Reads elements until the last element read is equivalent to delim, maxSize elements have been read, or the end of the input sequence is reached. The elements read are stored in array. The function returns the actual number of elements read from the stream.
The parameter array is a pointer to the beginning of the element array holding the elements extracted from the stream.
The parameter maxSize is the maximum number of elements to be read.
The parameter delim is the element value used as the delimiter.
template<class InputStream , class FilteredInputStreamImp , class Transform , class Traits >
Assigns the parameter values to gbeg_
, gnext_
, and gend_
respectively. These data members represent the beginning of the buffer array, the current position in the array, and the end of the array. Throws no exceptions.