35 #ifndef _GLIBCXX_ISTREAM
36 #define _GLIBCXX_ISTREAM 1
38 #pragma GCC system_header
43 _GLIBCXX_BEGIN_NAMESPACE(std)
54 template<typename _CharT, typename _Traits>
55 class basic_istream : virtual public basic_ios<_CharT, _Traits>
59 typedef _CharT char_type;
60 typedef typename _Traits::int_type int_type;
61 typedef typename _Traits::pos_type pos_type;
62 typedef typename _Traits::off_type off_type;
63 typedef _Traits traits_type;
66 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
67 typedef basic_ios<_CharT, _Traits> __ios_type;
68 typedef basic_istream<_CharT, _Traits> __istream_type;
69 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
71 typedef ctype<_CharT> __ctype_type;
120 {
return __pf(*
this); }
167 {
return _M_extract(__n); }
174 {
return _M_extract(__n); }
181 {
return _M_extract(__n); }
185 {
return _M_extract(__n); }
189 {
return _M_extract(__n); }
191 #ifdef _GLIBCXX_USE_LONG_LONG
194 {
return _M_extract(__n); }
198 {
return _M_extract(__n); }
203 {
return _M_extract(__f); }
207 {
return _M_extract(__f); }
211 {
return _M_extract(__f); }
215 {
return _M_extract(__p); }
249 {
return _M_gcount; }
321 get(char_type* __s,
streamsize __n, char_type __delim);
333 {
return this->
get(__s, __n, this->widen(
'\n')); }
355 get(__streambuf_type& __sb, char_type __delim);
365 get(__streambuf_type& __sb)
366 {
return this->
get(__sb, this->widen(
'\n')); }
394 getline(char_type* __s,
streamsize __n, char_type __delim);
406 {
return this->getline(__s, __n, this->widen(
'\n')); }
499 putback(char_type __c);
577 seekg(off_type, ios_base::seekdir);
585 template<
typename _ValueT>
587 _M_extract(_ValueT& __v);
606 #ifdef _GLIBCXX_USE_WCHAR_T
608 basic_istream<wchar_t>&
609 basic_istream<wchar_t>::
610 getline(char_type* __s,
streamsize __n, char_type __delim);
613 basic_istream<wchar_t>&
614 basic_istream<wchar_t>::
618 basic_istream<wchar_t>&
619 basic_istream<wchar_t>::
631 template<
typename _CharT,
typename _Traits>
640 typedef typename _Traits::int_type __int_type;
673 operator bool()
const
693 template<
typename _CharT,
typename _Traits>
697 template<
class _Traits>
700 {
return (__in >> reinterpret_cast<char&>(__c)); }
702 template<
class _Traits>
703 inline basic_istream<char, _Traits>&
705 {
return (__in >> reinterpret_cast<char&>(__c)); }
734 template<
typename _CharT,
typename _Traits>
735 basic_istream<_CharT, _Traits>&
736 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
741 operator>>(basic_istream<char>& __in,
char* __s);
743 template<
class _Traits>
744 inline basic_istream<char, _Traits>&
746 {
return (__in >> reinterpret_cast<char*>(__s)); }
748 template<
class _Traits>
749 inline basic_istream<char, _Traits>&
751 {
return (__in >> reinterpret_cast<char*>(__s)); }
762 template<
typename _CharT,
typename _Traits>
764 :
public basic_istream<_CharT, _Traits>,
765 public basic_ostream<_CharT, _Traits>
771 typedef _CharT char_type;
772 typedef typename _Traits::int_type int_type;
773 typedef typename _Traits::pos_type pos_type;
774 typedef typename _Traits::off_type off_type;
775 typedef _Traits traits_type;
778 typedef basic_istream<_CharT, _Traits> __istream_type;
779 typedef basic_ostream<_CharT, _Traits> __ostream_type;
799 : __istream_type(), __ostream_type() { }
823 template<
typename _CharT,
typename _Traits>
824 basic_istream<_CharT, _Traits>&
825 ws(basic_istream<_CharT, _Traits>& __is);
827 _GLIBCXX_END_NAMESPACE
829 #ifndef _GLIBCXX_EXPORT_TEMPLATE
__istream_type & operator>>(double &__f)
Basic arithmetic extractors.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
__istream_type & operator>>(unsigned long &__n)
Basic arithmetic extractors.
virtual ~basic_istream()
Base destructor.
Merging istream and ostream capabilities.This class multiply inherits from the input and output strea...
__istream_type & operator>>(__istream_type &(*__pf)(__istream_type &))
Interface for manipulators.
basic_istream(__streambuf_type *__sb)
Base constructor.
__istream_type & operator>>(void *&__p)
Basic arithmetic extractors.
__istream_type & operator>>(__ios_type &(*__pf)(__ios_type &))
Interface for manipulators.
Performs setup work for input streams.
The actual work of input and output (interface).
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
__istream_type & ignore()
Discarding characters.
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
__istream_type & operator>>(long &__n)
Basic arithmetic extractors.
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.
__istream_type & operator>>(long double &__f)
Basic arithmetic extractors.
__istream_type & operator>>(bool &__n)
Basic arithmetic extractors.
_Traits traits_type
Easy access to dependant types.
__istream_type & operator>>(float &__f)
Basic arithmetic extractors.
__istream_type & operator>>(unsigned long long &__n)
Basic arithmetic extractors.
__istream_type & operator>>(long long &__n)
Basic arithmetic extractors.
basic_istream< char, _Traits > & operator>>(basic_istream< char, _Traits > &__in, signed char *__s)
Character string extractors.
__istream_type & operator>>(unsigned short &__n)
Basic arithmetic extractors.
__istream_type & operator>>(ios_base &(*__pf)(ios_base &))
Interface for manipulators.
virtual ~basic_iostream()
Destructor does nothing.
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
__istream_type & getline(char_type *__s, streamsize __n)
String extraction.
Controlling input.This is the base class for all input streams. It provides text formatting of all bu...
streamsize gcount() const
Character counting.
__istream_type & operator>>(unsigned int &__n)
Basic arithmetic extractors.