Tools.h++ Manual
21-150 104011 Tandem Computers Incorporated
21
RWpistream
RWpistream
||
RWvistream istream
|
RWvios
Synopsis
#include <rw/pstream.h>
RWpistream pstr(cin); // Construct a RWpistream, using 
cin's streambuf
Description Class 
RWpistream 
specializes the abstract base class 
RWvistream 
to restore 
variables stored in a portable ASCII format by 
RWpostream
.
You can think of 
RWpistream 
and 
RWpostream 
as an ASCII veneer over an 
associated 
streambuf 
which are responsibile for formatting variables and 
escaping characters such that the results can be interchanged between any 
machines. As such, they are slower than their binary counterparts 
RWbistream 
and 
RWbostream 
which are more machine dependent. Because 
RWpistream 
and 
RWpostream 
retain no information about the state of their 
associated 
streambufs
, their use can be freely exchanged with other users of 
the streambuf (such as 
istream 
or 
ifstream
).
RWpistream 
can be interrogated as to the stream state using member 
functions 
good()
, 
bad()
, 
eof()
, etc.










