rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWvios Class Reference
[Virtual Streams]

Abstract base class defining an interface similar to std::ios, but without a required association with std::streambuf. More...

#include <rw/vstream.h>

Inheritance diagram for RWvios:
RWvistream RWvostream RWbistream RWpistream RWvistreamFromDataInputStream RWXDRistream RWbostream RWpostream RWvostreamToDataOutputStream RWXDRostream

List of all members.

Public Member Functions

virtual int eof ()=0
virtual int fail ()=0
virtual int bad ()=0
virtual int good ()=0
virtual int rdstate ()=0
virtual void clear (int v=0)=0
 operator void * ()

Detailed Description

RWvios is an abstract base class that defines an interface similar to the C++ Standard Library streams class std::ios. However, unlike std::ios, it does not require association with a std::streambuf.

This disassociation can be useful for classes that cannot use a std::streambuf in their implementation, for example, RWXDRistream in which the XDR model does not permit std::streambuf functionality.

Specializing classes that do use std::streambuf in their implementation (such as RWpistream) can usually just return the corresponding std::ios function.

Synopsis

 #include <vstream.h>
 (abstract base class)

Persistence

None


Member Function Documentation

virtual int RWvios::bad (  )  [pure virtual]

Returns a nonzero integer if the bad bit has been set. Normally this indicates that a severe error has occurred from which recovery is probably impossible.

Implemented in RWbistream, RWbostream, RWpistream, RWpostream, RWvistreamFromDataInputStream, RWvostreamToDataOutputStream, RWvistream, RWvostream, RWXDRistream, and RWXDRostream.

virtual void RWvios::clear ( int  v = 0  )  [pure virtual]

Sets the current error state to v. If v is zero, then this clears the error state.

Implemented in RWbistream, RWbostream, RWpistream, RWpostream, RWvistreamFromDataInputStream, RWvostreamToDataOutputStream, RWvistream, RWvostream, RWXDRistream, and RWXDRostream.

virtual int RWvios::eof (  )  [pure virtual]
virtual int RWvios::fail (  )  [pure virtual]

Returns a nonzero integer if the failed or bad bit has been set. Normally, this indicates that some storage or retrieval has failed, but that the stream is still in a usable state.

Implemented in RWbistream, RWbostream, RWpistream, RWpostream, RWvistreamFromDataInputStream, RWvostreamToDataOutputStream, RWvistream, RWvostream, RWXDRistream, and RWXDRostream.

virtual int RWvios::good (  )  [pure virtual]

Returns a nonzero integer if no error bits have been set.

Implemented in RWbistream, RWbostream, RWpistream, RWpostream, RWvistreamFromDataInputStream, RWvostreamToDataOutputStream, RWvistream, RWvostream, RWXDRistream, and RWXDRostream.

RWvios::operator void * (  )  [inline]

If fail(), returns NULL, otherwise returns self.

Reimplemented in RWbistream, and RWbostream.

virtual int RWvios::rdstate (  )  [pure virtual]
 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.