31 #define _BASIC_IOS_H 1
33 #pragma GCC system_header
42 _GLIBCXX_BEGIN_NAMESPACE_VERSION
44 template<
typename _Facet>
46 __check_facet(
const _Facet* __f)
65 template<
typename _CharT,
typename _Traits>
66 class basic_ios :
public ios_base
75 typedef _CharT char_type;
76 typedef typename _Traits::int_type int_type;
77 typedef typename _Traits::pos_type pos_type;
78 typedef typename _Traits::off_type off_type;
79 typedef _Traits traits_type;
86 typedef ctype<_CharT> __ctype_type;
87 typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> >
89 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
95 basic_ostream<_CharT, _Traits>* _M_tie;
96 mutable char_type _M_fill;
97 mutable bool _M_fill_init;
98 basic_streambuf<_CharT, _Traits>* _M_streambuf;
101 const __ctype_type* _M_ctype;
103 const __num_put_type* _M_num_put;
105 const __num_get_type* _M_num_get;
115 operator void*()
const
116 {
return this->fail() ? 0 :
const_cast<basic_ios*
>(
this); }
120 {
return this->fail(); }
132 {
return _M_streambuf_state; }
142 clear(iostate __state = goodbit);
151 setstate(iostate __state)
152 { this->clear(this->rdstate() | __state); }
158 _M_setstate(iostate __state)
162 _M_streambuf_state |= __state;
163 if (this->exceptions() & __state)
175 {
return this->rdstate() == 0; }
185 {
return (this->rdstate() & eofbit) != 0; }
196 {
return (this->rdstate() & (badbit | failbit)) != 0; }
206 {
return (this->rdstate() & badbit) != 0; }
217 {
return _M_exception; }
251 exceptions(iostate __except)
253 _M_exception = __except;
254 this->clear(_M_streambuf_state);
264 basic_ios(basic_streambuf<_CharT, _Traits>* __sb)
265 : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(
false), _M_streambuf(0),
266 _M_ctype(0), _M_num_put(0), _M_num_get(0)
267 { this->init(__sb); }
288 basic_ostream<_CharT, _Traits>*
300 basic_ostream<_CharT, _Traits>*
301 tie(basic_ostream<_CharT, _Traits>* __tiestr)
303 basic_ostream<_CharT, _Traits>* __old = _M_tie;
314 basic_streambuf<_CharT, _Traits>*
316 {
return _M_streambuf; }
340 basic_streambuf<_CharT, _Traits>*
341 rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
355 copyfmt(
const basic_ios& __rhs);
368 _M_fill = this->widen(
' ');
386 char_type __old = this->fill();
404 imbue(
const locale& __loc);
424 narrow(char_type __c,
char __dfault)
const
425 {
return __check_facet(_M_ctype).narrow(__c, __dfault); }
443 widen(
char __c)
const
444 {
return __check_facet(_M_ctype).widen(__c); }
455 : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(
false),
456 _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
466 init(basic_streambuf<_CharT, _Traits>* __sb);
469 _M_cache_locale(
const locale& __loc);
472 _GLIBCXX_END_NAMESPACE_VERSION
#define __throw_exception_again
Definition: exception_defines.h:37
namespace std _GLIBCXX_VISIBILITY(default)
Definition: basic_ios.h:40