SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWvios Class Referenceabstract

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

Public Member Functions

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

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 RWvostream, RWXDRostream, RWpostream, RWbostream, RWvistream, RWXDRistream, RWpistream, RWbistream, RWvistreamFromDataInputStream, and RWvostreamToDataOutputStream.

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 RWvostream, RWXDRostream, RWpostream, RWbostream, RWvistream, RWXDRistream, RWpistream, RWbistream, RWvistreamFromDataInputStream, and RWvostreamToDataOutputStream.

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 RWvostream, RWXDRostream, RWpostream, RWbostream, RWvistream, RWXDRistream, RWpistream, RWbistream, RWvistreamFromDataInputStream, and RWvostreamToDataOutputStream.

virtual int RWvios::good ( )
pure virtual

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

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

RWvios::operator void * ( )
inline

If fail(), returns 0, otherwise returns a pointer to self.

virtual int RWvios::rdstate ( )
pure virtual

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.