/* /% C++ %/ */ /*********************************************************************** * cint (C/C++ interpreter) ************************************************************************ * header file sstrm.h ************************************************************************ * Description: * Stub file for making iostream library ************************************************************************ * Copyright(c) 1999 Masaharu Goto (MXJ02154@niftyserve.or.jp) * ************************************************************************/ #ifndef G__SSTREAM_H #define G__SSTREAM_H #ifndef __CINT__ #include using namespace std; #else // __CINT__ #include //#include class allocator; class allocator; #include "iostrm.h" template class basic_stringbuf : public basic_streambuf { public: typedef charT char_type; typedef traits::int_type int_type; typedef traits::pos_type pos_type; typedef traits::off_type off_type; typedef traits traits_type; typedef basic_ios ios_type; #ifdef __CINT__ typedef string string_type; #else typedef basic_string string_type; #endif explicit basic_stringbuf(ios_base::openmode which = ios_base::in | ios_base::out ); explicit basic_stringbuf(const string_type& str, ios_base::openmode which = ios_base::in | ios_base::out ); virtual ~basic_stringbuf(); string_type str() const; void str(const string_type& str_arg); protected: virtual int_type overflow(int_type c = traits::eof()); virtual int_type pbackfail(int_type c = traits::eof()); virtual int_type underflow(); virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out); virtual pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out); virtual basic_streambuf* setbuf(char_type* s, streamsize n); virtual streamsize xsputn(const char_type *s, streamsize n); }; template class basic_istringstream : public basic_istream { public: typedef charT char_type; typedef traits::int_type int_type; typedef traits::pos_type pos_type; typedef traits::off_type off_type; typedef traits traits_type; typedef basic_stringbuf sb_type; typedef basic_ios ios_type; #ifdef __CINT__ typedef string string_type; #else typedef basic_string string_type; #endif explicit basic_istringstream(ios_base::openmode which = ios_base::in); explicit basic_istringstream(const string_type& str, ios_base::openmode which = ios_base::in); virtual ~basic_istringstream(); basic_stringbuf *rdbuf() const; string_type str() const; void str(const string_type& str); }; template class basic_ostringstream : public basic_ostream { public: typedef charT char_type; typedef traits::int_type int_type; typedef traits::pos_type pos_type; typedef traits::off_type off_type; typedef traits traits_type; typedef basic_stringbuf sb_type; typedef basic_ios ios_type; #ifdef __CINT__ typedef string string_type; #else typedef basic_string string_type; #endif explicit basic_ostringstream(ios_base::openmode which = ios_base::out); explicit basic_ostringstream(const string_type& str, ios_base::openmode which = ios_base::out); virtual ~basic_ostringstream(); basic_stringbuf *rdbuf() const; string_type str() const; void str(const string_type& str); }; template class basic_stringstream : public basic_iostream { public: typedef charT char_type; typedef traits::int_type int_type; typedef traits::pos_type pos_type; typedef traits::off_type off_type; typedef traits traits_type; typedef basic_stringbuf sb_type; typedef basic_ios ios_type; #ifdef __CINT__ typedef string string_type; #else typedef basic_string string_type; #endif explicit basic_stringstream(ios_base::openmode which = ios_base::out | ios_base::in); explicit basic_stringstream(const string_type& str, ios_base::openmode which = ios_base::out | ios_base::in); virtual ~basic_stringstream(); basic_stringbuf *rdbuf() const; string_type str() const; void str(const string_type& str); }; //typedef basic_stringbuf stringbuf; typedef basic_stringbuf,allocator > stringbuf; //typedef basic_stringbuf wstringbuf; //typedef basic_stringbuf,allocator > wstringbuf; //typedef basic_istringstream istringstream; typedef basic_istringstream,allocator > istringstream; //typedef basic_istringstream wistringstream; //typedef basic_istringstream,allocator > wistringstream; //typedef basic_ostringstream ostringstream; typedef basic_ostringstream,allocator > ostringstream; //typedef basic_ostringstream wostringstream; //typedef basic_ostringstream,allocator > wostringstream; //typedef basic_stringstream stringstream; typedef basic_stringstream,allocator > stringstream; //typedef basic_stringstream wstringstream; //typedef basic_stringstream, allocator > wstringstream; #endif // __CINT__ #endif // G__SSTREAM_H