DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Strstream(C++)


Strstream -- iostream and streambuf specialized to Strings

Synopsis

   #include <Strstream.h>
   namespace SCO_SC {
   

class Strstreambuf : public streambuf { public: Strstreambuf(); Strstreambuf(String& s); ~Strstreambuf(); String str(); }; class Strstreambase : virtual public ios { public: Strstreambase(); Strstreambase(String& s); ~Strstreambase(); Strstreambuf* rdbuf(); }; class iStrstream : public Strstreambase, public istream { public: iStrstream(const String& s); ~iStrstream(); }; class oStrstream : public Strstreambase, public ostream { public: oStrstream(); oStrstream(String& s); ~oStrstream(); String str(); }; class Strstream : public Strstreambase, public iostream { public: Strstream(); Strstream(String& s); ~Strstream(); String str(); }; // Compatibility typedef ... oStrstream; typedef ... iStrstream; }

Description

Strstreambuf, Strstreambase, iStrstream, oStrstream, and Strstream specialize classes streambuf, ios, istream, ostream, and iostream (see iostream(3C++)) to use a String (see String(3C++)) for its underlying sequence of characters.

class Strstreambuf

A Strstreambuf is queuelike; characters are stored at the right end of the underlying String and fetched from the left. Strstreambufs support arbitrary putback.

Strstreambuf(); Characters will be stored into and fetched from an initially empty internal String.

Strstreambuf(String& s); Characters will be stored into and fetched from s. Since buffering may occur, the contents of s at any given moment may not be equal to the current contents of the sequence. Calling sync() forces agreement.

~Strstreambuf(); Destructor.

str(); The current contents of the sequence.

class Strstreambase

Strstreambase(); An ios employing a Strstreambuf created by the constructor Strstreambuf().

Strstreambase(String& s); An ios employing a Strstreambuf created by the constructor Strstreambuf(s).

~Strstreambase(); Destructor.

Strstreambuf* rdbuf(); A pointer to the underlying Strstreambuf.

class iStrstream

iStrstream(const String& s); An istream employing a Strstreambuf created by the constructor Strstreambuf(s).

~iStrstream(); Destructor.

class oStrstream

oStrstream(); An ostream employing a Strstreambuf created by the constructor Strstreambuf().

oStrstream(String& s); An ostream employing a Strstreambuf created by the constructor Strstreambuf(s).

~oStrstream(); Destructor.

str(); The current contents of the sequence. (Equivalent to rdbuf()->str().)

class Strstream

Strstream(); An iostream employing a Strstreambuf created by the constructor Strstreambuf().

Strstream(String& s); An iostream employing a Strstreambuf created by the constructor Strstreambuf(s).

~Strstream(); Destructor.

str(); The current contents of the sequence. (Equivalent to rdbuf()->str().)

References

iostream(C++), String(C++), strstream(C++)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005