35 #ifndef _GLIBCXX_ISTREAM
36 #define _GLIBCXX_ISTREAM 1
38 #pragma GCC system_header
43 namespace std _GLIBCXX_VISIBILITY(default)
45 _GLIBCXX_BEGIN_NAMESPACE_VERSION
55 template<
typename _CharT,
typename _Traits>
56 class basic_istream :
virtual public basic_ios<_CharT, _Traits>
60 typedef _CharT char_type;
61 typedef typename _Traits::int_type int_type;
62 typedef typename _Traits::pos_type pos_type;
63 typedef typename _Traits::off_type off_type;
64 typedef _Traits traits_type;
67 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
68 typedef basic_ios<_CharT, _Traits> __ios_type;
69 typedef basic_istream<_CharT, _Traits> __istream_type;
70 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
72 typedef ctype<_CharT> __ctype_type;
119 {
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); }
213 {
return _M_extract(__f); }
217 {
return _M_extract(__f); }
221 {
return _M_extract(__f); }
234 {
return _M_extract(__p); }
341 get(char_type* __s,
streamsize __n, char_type __delim);
353 {
return this->
get(__s, __n, this->
widen(
'\n')); }
375 get(__streambuf_type& __sb, char_type __delim);
386 {
return this->
get(__sb, this->
widen(
'\n')); }
600 seekg(off_type, ios_base::seekdir);
608 template<
typename _ValueT>
610 _M_extract(_ValueT& __v);
629 #ifdef _GLIBCXX_USE_WCHAR_T
631 basic_istream<wchar_t>&
636 basic_istream<wchar_t>&
641 basic_istream<wchar_t>&
654 template<
typename _CharT,
typename _Traits>
666 typedef typename _Traits::int_type __int_type;
700 #ifdef __GXX_EXPERIMENTAL_CXX0X__
703 operator bool()
const
719 template<
typename _CharT,
typename _Traits>
723 template<
class _Traits>
726 {
return (__in >> reinterpret_cast<char&>(__c)); }
728 template<
class _Traits>
729 inline basic_istream<char, _Traits>&
731 {
return (__in >> reinterpret_cast<char&>(__c)); }
761 template<
typename _CharT,
typename _Traits>
762 basic_istream<_CharT, _Traits>&
763 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
768 operator>>(basic_istream<char>& __in,
char* __s);
770 template<
class _Traits>
771 inline basic_istream<char, _Traits>&
773 {
return (__in >> reinterpret_cast<char*>(__s)); }
775 template<
class _Traits>
776 inline basic_istream<char, _Traits>&
778 {
return (__in >> reinterpret_cast<char*>(__s)); }
788 template<
typename _CharT,
typename _Traits>
790 :
public basic_istream<_CharT, _Traits>,
791 public basic_ostream<_CharT, _Traits>
797 typedef _CharT char_type;
798 typedef typename _Traits::int_type int_type;
799 typedef typename _Traits::pos_type pos_type;
800 typedef typename _Traits::off_type off_type;
801 typedef _Traits traits_type;
804 typedef basic_istream<_CharT, _Traits> __istream_type;
805 typedef basic_ostream<_CharT, _Traits> __ostream_type;
825 : __istream_type(), __ostream_type() { }
848 template<
typename _CharT,
typename _Traits>
849 basic_istream<_CharT, _Traits>&
850 ws(basic_istream<_CharT, _Traits>& __is);
852 #ifdef __GXX_EXPERIMENTAL_CXX0X__
864 template<
typename _CharT,
typename _Traits,
typename _Tp>
865 inline basic_istream<_CharT, _Traits>&
867 {
return (__is >> __x); }
868 #endif // __GXX_EXPERIMENTAL_CXX0X__
870 _GLIBCXX_END_NAMESPACE_VERSION
pos_type tellg()
Getting the current read position.
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
Performs setup work for input streams.
__istream_type & operator>>(long double &__f)
Floating point arithmetic extractors.
Primary class template ctype facet.This template class defines classification and conversion function...
basic_istream(__streambuf_type *__sb)
Base constructor.
virtual ~basic_iostream()
Destructor does nothing.
char_type widen(char __c) const
Widens characters.
__istream_type & operator>>(unsigned long &__n)
Integer arithmetic extractors.
_Traits traits_type
Easy access to dependant types.
__istream_type & ignore()
Simple extraction.
__istream_type & unget()
Unextracting the previous character.
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
__istream_type & putback(char_type __c)
Unextracting a single character.
__istream_type & operator>>(unsigned short &__n)
Integer arithmetic extractors.
__istream_type & operator>>(__ios_type &(*__pf)(__ios_type &))
Interface for manipulators.
__istream_type & operator>>(long &__n)
Integer arithmetic extractors.
__istream_type & operator>>(__istream_type &(*__pf)(__istream_type &))
Interface for manipulators.
__istream_type & operator>>(double &__f)
Floating point arithmetic extractors.
streamsize gcount() const
Character counting.
__istream_type & read(char_type *__s, streamsize __n)
Extraction without delimiters.
int sync()
Synchronizing the stream buffer.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
bitset< _Nb > operator>>(size_t __position) const _GLIBCXX_NOEXCEPT
Self-explanatory.
__istream_type & operator>>(unsigned long long &__n)
Integer arithmetic extractors.
__istream_type & getline(char_type *__s, streamsize __n)
String extraction.
__istream_type & operator>>(unsigned int &__n)
Integer arithmetic extractors.
__istream_type & operator>>(bool &__n)
Integer arithmetic extractors.
streamsize readsome(char_type *__s, streamsize __n)
Extraction until the buffer is exhausted, but no more.
__istream_type & operator>>(float &__f)
Floating point arithmetic extractors.
__istream_type & seekg(pos_type)
Changing the current read position.
int_type peek()
Looking ahead in the stream.
__istream_type & operator>>(void *&__p)
Basic arithmetic extractors.
virtual ~basic_istream()
Base destructor.
__istream_type & operator>>(long long &__n)
Integer arithmetic extractors.
__istream_type & operator>>(ios_base &(*__pf)(ios_base &))
Interface for manipulators.
Template class basic_iostreamThis class multiply inherits from the input and output stream classes si...