#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; }
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.
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.
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.
iStrstream(const String& s); An istream employing a Strstreambuf created by the constructor Strstreambuf(s).
~iStrstream(); Destructor.
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().)
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().)