44 #ifndef _BACKWARD_STRSTREAM
45 #define _BACKWARD_STRSTREAM
47 #include "backward_warning.h"
54 _GLIBCXX_BEGIN_NAMESPACE(std)
58 class strstreambuf : public basic_streambuf<
char, char_traits<
char> >
62 typedef char_traits<char> _Traits;
63 typedef basic_streambuf<char, _Traits> _Base;
67 explicit strstreambuf(
streamsize __initial_capacity = 0);
68 strstreambuf(
void* (*__alloc)(
size_t),
void (*__free)(
void*));
70 strstreambuf(
char* __get,
streamsize __n,
char* __put = 0);
71 strstreambuf(
signed char* __get,
streamsize __n,
signed char* __put = 0);
72 strstreambuf(
unsigned char* __get,
streamsize __n,
unsigned char* __put=0);
74 strstreambuf(
const char* __get,
streamsize __n);
75 strstreambuf(
const signed char* __get,
streamsize __n);
76 strstreambuf(
const unsigned char* __get,
streamsize __n);
78 virtual ~strstreambuf();
81 void freeze(
bool =
true);
86 virtual int_type overflow(int_type __c = _Traits::eof());
87 virtual int_type pbackfail(int_type __c = _Traits::eof());
88 virtual int_type underflow();
89 virtual _Base* setbuf(
char* __buf,
streamsize __n);
90 virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
91 ios_base::openmode __mode
92 = ios_base::in | ios_base::out);
93 virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
94 = ios_base::in | ios_base::out);
98 operator=(
const strstreambuf&);
100 strstreambuf(
const strstreambuf&);
103 char* _M_alloc(
size_t);
107 void _M_setup(
char* __get,
char* __put,
streamsize __n);
111 void* (*_M_alloc_fun)(size_t);
112 void (*_M_free_fun)(
void*);
116 bool _M_constant : 1;
120 class istrstream :
public basic_istream<char>
123 explicit istrstream(
char*);
124 explicit istrstream(
const char*);
127 virtual ~istrstream();
129 strstreambuf* rdbuf()
const;
137 class ostrstream :
public basic_ostream<char>
141 ostrstream(
char*,
int, ios_base::openmode = ios_base::out);
142 virtual ~ostrstream();
144 strstreambuf* rdbuf()
const;
145 void freeze(
bool =
true);
154 class strstream :
public basic_iostream<char>
157 typedef char char_type;
158 typedef char_traits<char>::int_type int_type;
159 typedef char_traits<char>::pos_type pos_type;
160 typedef char_traits<char>::off_type off_type;
163 strstream(
char*,
int, ios_base::openmode = ios_base::in | ios_base::out);
164 virtual ~strstream();
166 strstreambuf* rdbuf()
const;
167 void freeze(
bool =
true);
175 _GLIBCXX_END_NAMESPACE
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.