using ::ostream;
using ::dec;
+ using ::oct;
using ::hex;
+
+ enum { skipws=ios::skipws,
+ left=ios::left, right=ios::right, internal=ios::internal,
+ showbase=ios::showbase, showpoint=ios::showpoint,
+ uppercase=ios::uppercase, showpos=ios::showpos,
+ scientific=ios::scientific, fixed=ios::fixed,
+ unitbuf=ios::unitbuf, stdio=ios::stdio
+#if _BOOL && __EDG_ABI_COMPATIBILITY_VERSION>227 /* bool support */
+ ,boolalpha=ios::boolalpha
+#endif /* bool support */
+ };
+
};
# endif
#ifndef __SG_SSTREAM
#define __SG_SSTREAM 1
+# include <iostream>
# include <strstream>
+# include <string>
namespace std {
- typedef ::ostrstream ostringstream;
- typedef ::istrstream istringstream;
+
+ class ostringstream : public strstreambase, public iostream {
+ private:
+ std::ostrstream *sstr;
+
+ public:
+ ostringstream() { sstr = new std::ostrstream; }
+ ostringstream(const string &str, int=ios::out) {
+ sstr = new ostrstream((char *)str.c_str(), str.size(), ios::out);
+ }
+ ~ostringstream() { delete sstr; }
+ std::string str() { return std::string(sstr->str()); }
+ int pcount() { return sstr->pcount(); }
+ };
+
+ class istringstream : public istrstream {
+ };
+
};
#endif // !__SG_SSTREAM