SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 RWXDRistream RWbistream RWpistream RWvistreamFromDataInputStream RWXDRostream RWbostream RWpostream RWvostreamToDataOutputStream

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

◆ bad()

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

◆ clear()

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

◆ eof()

virtual int RWvios::eof ( )
pure virtual

◆ fail()

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

◆ good()

virtual int RWvios::good ( )
pure virtual

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

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

◆ operator void *()

RWvios::operator void * ( )
inline

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

◆ rdstate()

virtual int RWvios::rdstate ( )
pure virtual

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