rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWTStreambufFromByteCharInputStream< InputStream > Class Template Reference
[Streams]

Adaptor class to adapt the iostreams std::streambuf interface to the Rogue Wave binary and narrow character Input Stream interfaces. More...

#include <rw/stream/RWTStreambufFromByteCharInputStream.h>

List of all members.

Public Types

typedef InputStream RWInputStream_type
typedef InputStream::element_type element_type

Public Member Functions

 RWTStreambufFromByteCharInputStream (const InputStream &sourceStream)
virtual ~RWTStreambufFromByteCharInputStream ()

Protected Member Functions

virtual int_type overflow (int_type c=traits_type::eof())
virtual int_type underflow ()
virtual int sync ()
virtual RW_SHOWMANYC_RETURN_TYPE showmanyc ()
virtual int_type pbackfail (int_type c=traits_type::eof())
virtual pos_type seekoff (off_type off, std::ios_base::seekdir way, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
virtual pos_type seekpos (pos_type sp, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out)
virtual std::streamsize xsputn (const char_type *, std::streamsize)
InputStream & getSourceStream ()
const InputStream & getSourceStream () const

Detailed Description

template<class InputStream>
class RWTStreambufFromByteCharInputStream< InputStream >

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 std::streambuf interface are forwarded to the embedded input stream handle. Calls to the iostreams std::streambuf functions dealing with the std::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.


Member Typedef Documentation

template<class InputStream >
typedef InputStream::element_type RWTStreambufFromByteCharInputStream< InputStream >::element_type

A typedef for the type of element to be read from RWInputStream_type.

template<class InputStream >
typedef InputStream RWTStreambufFromByteCharInputStream< InputStream >::RWInputStream_type

A typedef for the template parameter InputStream which will be used as the source of elements.


Constructor & Destructor Documentation

template<class InputStream >
RWTStreambufFromByteCharInputStream< InputStream >::RWTStreambufFromByteCharInputStream ( const InputStream &  sourceStream  ) 

Initializes the reference to the input stream that will be used as the source of elements.

Parameters:
sourceStream The input stream that will serve as the source of elements.
template<class InputStream >
virtual RWTStreambufFromByteCharInputStream< InputStream >::~RWTStreambufFromByteCharInputStream (  )  [virtual]

Destructor.


Member Function Documentation

template<class InputStream >
const InputStream& RWTStreambufFromByteCharInputStream< InputStream >::getSourceStream (  )  const [inline, protected]

Returns a handle to the embedded InputStream that is used as the source of elements. Throw no exceptions.

template<class InputStream >
InputStream& RWTStreambufFromByteCharInputStream< InputStream >::getSourceStream (  )  [inline, protected]

Returns a handle to the embedded InputStream that is used as the source of elements. Throw no exceptions.

template<class InputStream >
virtual int_type RWTStreambufFromByteCharInputStream< InputStream >::overflow ( int_type  c = traits_type::eof()  )  [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are defined.)

This function always returns EOF to indicate failure. Throws no exceptions.

template<class InputStream >
virtual int_type RWTStreambufFromByteCharInputStream< InputStream >::pbackfail ( int_type  c = traits_type::eof()  )  [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are defined.)

This function always returns EOF to indicate failure. Throws no exceptions.

template<class InputStream >
virtual pos_type RWTStreambufFromByteCharInputStream< InputStream >::seekoff ( off_type  off,
std::ios_base::seekdir  way,
std::ios_base::openmode  which = std::ios_base::in|std::ios_base::out 
) [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are defined.)

This function always returns EOF to indicate failure. Throws no exceptions.

template<class InputStream >
virtual pos_type RWTStreambufFromByteCharInputStream< InputStream >::seekpos ( pos_type  sp,
std::ios_base::openmode  which = std::ios_base::in|std::ios_base::out 
) [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are defined.)

This function always returns EOF to indicate failure. Throws no exceptions.

template<class InputStream >
virtual RW_SHOWMANYC_RETURN_TYPE RWTStreambufFromByteCharInputStream< InputStream >::showmanyc (  )  [protected, virtual]

This function always returns 0. Throws no exceptions.

template<class InputStream >
virtual int RWTStreambufFromByteCharInputStream< InputStream >::sync (  )  [protected, virtual]

This function always returns zero. Throws no exceptions.

template<class InputStream >
virtual int_type RWTStreambufFromByteCharInputStream< InputStream >::underflow (  )  [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are 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.

template<class InputStream >
virtual std::streamsize RWTStreambufFromByteCharInputStream< InputStream >::xsputn ( const char_type *  ,
std::streamsize   
) [protected, virtual]

(Use if a standard C++ library implementation and the Standard iostreams are defined.)

This function always returns EOF to indicate failure. Throws no exceptions.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© 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.