Files
renderdoc/qrenderdoc/3rdparty/swig/Lib/std/std_sstream.i
T
baldurk 768e812e45 Commit binary dependencies necessary for compilation on windows
* On windows it's strongly desired to be able to compile straight out of
  a clean checkout or source download. This means anyone can download
  the source and investigate something quickly, without having to worry
  about the hassle of figuring out how the project downloads 3rd party
  dependencies, fetching them, getting them registered in the right
  place.
* This can't be put in a submodule as git submodules don't get
  downloaded by default so people new to git will get confusing
  compilation messages, and someone downloading the source from github
  directly without cloning via git won't get submodules included.
* It does add some extra size to a fresh download/checkout which is
  unfortunate, but absolutely worth the cost. Shallow checkouts still
  aren't unfeasibly large, and it's only a one-off cost at clone time.
2018-02-02 20:49:35 +00:00

196 lines
5.2 KiB
OpenEdge ABL

/*
For wchar support, you need to include the wchar.i file
before this file, ie:
%include <wchar.i>
%include <std_sstream.i>
or equivalently, just include
%include <std_wsstream.i>
*/
%include <std_alloc.i>
%include <std_basic_string.i>
%include <std_string.i>
%include <std_ios.i>
#if defined(SWIG_WCHAR)
%include <std_wstring.i>
#endif
%include <std_streambuf.i>
%include <std_iostream.i>
%{
#include <sstream>
%}
namespace std
{
template<typename _CharT, typename _Traits = char_traits<_CharT>,
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 _CharT, typename _Traits = char_traits<_CharT>,
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 _CharT, typename _Traits = char_traits<_CharT>,
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 _CharT, typename _Traits = char_traits<_CharT>,
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<char>;
%template(ostringstream) basic_ostringstream<char>;
%template(stringstream) basic_stringstream<char>;
#if defined(SWIG_WCHAR)
%template(wistringstream) basic_istringstream<wchar_t>;
%template(wostringstream) basic_ostringstream<wchar_t>;
%template(wstringstream) basic_stringstream<wchar_t>;
#endif
}