33 #define _BASIC_IOS_H 1
35 #pragma GCC system_header
42 _GLIBCXX_BEGIN_NAMESPACE(std)
44 template<typename _Facet>
46 __check_facet(const _Facet* __f)
61 template<
typename _CharT,
typename _Traits>
62 class basic_ios :
public ios_base
93 mutable bool _M_fill_init;
111 operator void*()
const
112 {
return this->fail() ? 0 :
const_cast<basic_ios*
>(
this); }
116 {
return this->fail(); }
128 {
return _M_streambuf_state; }
138 clear(iostate __state = goodbit);
148 { this->clear(this->rdstate() | __state); }
154 _M_setstate(iostate __state)
158 _M_streambuf_state |= __state;
159 if (this->exceptions() & __state)
160 __throw_exception_again;
171 {
return this->rdstate() == 0; }
181 {
return (this->rdstate() & eofbit) != 0; }
192 {
return (this->rdstate() & (badbit | failbit)) != 0; }
202 {
return (this->rdstate() & badbit) != 0; }
213 {
return _M_exception; }
249 _M_exception = __except;
250 this->clear(_M_streambuf_state);
261 :
ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0),
262 _M_ctype(0), _M_num_put(0), _M_num_get(0)
263 { this->init(__sb); }
312 {
return _M_streambuf; }
364 _M_fill = this->widen(
' ');
400 imbue(
const locale& __loc);
421 {
return __check_facet(_M_ctype).narrow(__c, __dfault); }
440 {
return __check_facet(_M_ctype).widen(__c); }
452 _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0)
465 _M_cache_locale(
const locale& __loc);
468 _GLIBCXX_END_NAMESPACE
470 #ifndef _GLIBCXX_EXPORT_TEMPLATE
_Traits::off_type off_type
basic_ostream< _CharT, _Traits > * tie() const
Fetches the current tied stream.
bool bad() const
Fast error checking.
void setstate(iostate __state)
Sets additional flags in the error state.
char_type fill() const
Retrieves the "empty" character.
char_type widen(char __c) const
Widens characters.
basic_ostream< _CharT, _Traits > * tie(basic_ostream< _CharT, _Traits > *__tiestr)
Ties this stream to an output stream.
The actual work of input and output (interface).
_Traits::int_type int_type
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
ctype< _CharT > __ctype_type
The ctype<char> specialization.
bool fail() const
Fast error checking.
bool good() const
Fast error checking.
Virtual base class for all stream classes.Most of the member functions called dispatched on stream ob...
Controlling output.This is the base class for all output streams. It provides text formatting of all ...
char narrow(char_type __c, char __dfault) const
Squeezes characters.
iostate exceptions() const
Throwing exceptions on errors.
num_put< _CharT, ostreambuf_iterator< _CharT, _Traits > > __num_put_type
bool operator!() const
The quick-and-easy status check.
basic_streambuf< _CharT, _Traits > * rdbuf() const
Accessing the underlying buffer.
Container class for localization functionality.
basic_ios(basic_streambuf< _CharT, _Traits > *__sb)
Constructor performs initialization.
char_type fill(char_type __ch)
Sets a new "empty" character.
_Traits::pos_type pos_type
Facet for converting numbers to strings.
iostate rdstate() const
Returns the error state of the stream buffer.
virtual ~basic_ios()
Empty.
bool eof() const
Fast error checking.
num_get< _CharT, istreambuf_iterator< _CharT, _Traits > > __num_get_type
Facet for parsing number strings.
void exceptions(iostate __except)
Throwing exceptions on errors.