/* For wchar support, you need to include the wchar.i file before this file, ie: %include %include or equivalently, just include %include */ %include %include %include %include #if defined(SWIG_WCHAR) %include #endif %include %include %{ #include %} namespace std { template, typename _Alloc = allocator<_CharT> > class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { public: // Types: typedef _CharT char_type; typedef _Traits traits_type; // 251. basic_stringbuf missing allocator_type typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; public: // Constructors: explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out); explicit basic_stringbuf(const basic_string<_CharT, _Traits, _Alloc>& __str, ios_base::openmode __mode = ios_base::in | ios_base::out); // Get and set: basic_string<_CharT, _Traits, _Alloc> str() const; void str(const basic_string<_CharT, _Traits, _Alloc>& __s); }; // 27.7.2 Template class basic_istringstream template, typename _Alloc = allocator<_CharT> > class basic_istringstream : public basic_istream<_CharT, _Traits> { public: // Types: typedef _CharT char_type; typedef _Traits traits_type; // 251. basic_stringbuf missing allocator_type typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; public: // Constructors: explicit basic_istringstream(ios_base::openmode __mode = ios_base::in); explicit basic_istringstream(const basic_string<_CharT, _Traits, _Alloc>& __str, ios_base::openmode __mode = ios_base::in); ~basic_istringstream(); // Members: basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const; basic_string<_CharT, _Traits, _Alloc> str() const; void str(const basic_string<_CharT, _Traits, _Alloc>& __s); }; // 27.7.3 Template class basic_ostringstream template, typename _Alloc = allocator<_CharT> > class basic_ostringstream : public basic_ostream<_CharT, _Traits> { public: // Types: typedef _CharT char_type; typedef _Traits traits_type; // 251. basic_stringbuf missing allocator_type typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; public: // Constructors/destructor: explicit basic_ostringstream(ios_base::openmode __mode = ios_base::out); explicit basic_ostringstream(const basic_string<_CharT, _Traits, _Alloc>& __str, ios_base::openmode __mode = ios_base::out); ~basic_ostringstream(); // Members: basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const; basic_string<_CharT, _Traits, _Alloc> str() const; #if 0 void str(const basic_string<_CharT, _Traits, _Alloc>& __s); #endif }; // 27.7.4 Template class basic_stringstream template, typename _Alloc = allocator<_CharT> > class basic_stringstream : public basic_iostream<_CharT, _Traits> { public: // Types: typedef _CharT char_type; typedef _Traits traits_type; // 251. basic_stringbuf missing allocator_type typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; public: // Constructors/destructors explicit basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in); explicit basic_stringstream(const basic_string<_CharT, _Traits, _Alloc>& __str, ios_base::openmode __m = ios_base::out | ios_base::in); ~basic_stringstream(); // Members: basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const; basic_string<_CharT, _Traits, _Alloc> str() const; void str(const basic_string<_CharT, _Traits, _Alloc>& __s); }; } // namespace std namespace std { %template(istringstream) basic_istringstream; %template(ostringstream) basic_ostringstream; %template(stringstream) basic_stringstream; #if defined(SWIG_WCHAR) %template(wistringstream) basic_istringstream; %template(wostringstream) basic_ostringstream; %template(wstringstream) basic_stringstream; #endif }