Module: Advanced Tools Package: Streams
RWTStreambufFromByteCharInputStream std::streambuf
#include <rw/stream/RWTStreambufFromByteCharInputStream.h>
The class RWTStreambufFromByteCharInputStream is an adaptor class that adapts the iostreams std::streambuf interface to the Rogue Wave binary and narrow character Input Stream interfaces. Requests made through the iostreams streambuf interface are forwarded to the embedded input stream handle. Calls to the iostreams streambuf functions dealing with the streambuf's output sequence will always fail since the underlying output stream only supports input operations. The type of the underlying input stream is provided by the template parameter InputStream, and can be RWByteInputStream or RWCharInputStream.
typedef InputStream RWInputStream_type RWInputStream_type typedef InputStream::element_type element_type
RWTStreambufFromByteCharInputStream(InputStream&
sourceStream);
Initializes the reference to the input stream that will be used as the source of elements.
Parameter List
sourceStream |
The input stream that will serve as the source of elements. |
virtual ~RWTStreambufFromByteCharInputStream();
Destructor.
InputStream& getSourceStream(); const InputStream& getSourceStream() const;
These functions return a handle to the embedded InputStream that is used as the source of elements. They throw no exceptions.
virtual int_type overflow(int_type c = traits_type::eof());
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual int overflow(int c=EOF);
(Use if the Standard iostreams are not defined.)
This function always returns EOF to indicate failure. Throws no exceptions.
virtual int_type pbackfail(int_type c = traits_type::eof());
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual int pbackfail(int c=EOF);
(Use if the Standard iostreams are not defined.)
This function always returns EOF to indicate failure. Throws no exceptions.
virtual pos_type seekoff(off_type off, ios_base::seekdir way,ios_base::openmode
which = ios_base::in | ios_base::out);
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual streampos seekoff(streamoff offset, ios::seek_dir dir, int mode= ios::in
| ios::out);
(Use if the Standard iostreams are not defined.)
This function always returns EOF to indicate failure. Throws no exceptions.
virtual pos_type seekpos(pos_type sp,ios_base::openmode which = ios_base::in
| ios_base::out);
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual streampos seekpos(streampos, int mode= ios::in | ios::out);
(Use if the Standard iostreams are not defined.)
This function always returns EOF to indicate failure. Throws no exceptions.
virtual int showmanyc();
This function always returns 0. Throws no exceptions.
virtual int sync();
This function always returns zero. Throws no exceptions.
virtual streamsize xsgetn(char_type* s, streamsize n);
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual int xsgetn(char* s, int n);
(Use if the Standard iostreams are not defined.)
This function gets n characters (bytes) from the input sequence and stores them in the array pointed at by s. The function returns the number of characters (bytes) read. Throws no exceptions.
Parameter List
s |
A pointer to the first element of the character (byte) array. |
n |
The number of elements to be read. |
virtual streamsize xsputn(const char_type*, streamsize);
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual int xsputn(const char*, int);
(Use if the Standard iostreams are not defined.)
This function always returns EOF to indicate failure. Throws no exceptions.
virtual int_type underflow();
(Use if a standard C++ library implementation and the Standard iostreams are defined.)
virtual int underflow();
(Use if the Standard iostreams are not defined.)
This function returns the first character in the get area if called when there are characters in the get area. If the get area is empty, then the function returns the next character that would be read from the input sequence. Throws no exceptions.
© 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.