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
56 template<
typename _CharT,
typename _Traits>
57 class basic_istream :
virtual public basic_ios<_CharT, _Traits>
61 typedef _CharT char_type;
62 typedef typename _Traits::int_type int_type;
63 typedef typename _Traits::pos_type pos_type;
64 typedef typename _Traits::off_type off_type;
65 typedef _Traits traits_type;
68 typedef basic_streambuf<_CharT, _Traits> __streambuf_type;
69 typedef basic_ios<_CharT, _Traits> __ios_type;
70 typedef basic_istream<_CharT, _Traits> __istream_type;
71 typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> >
73 typedef ctype<_CharT> __ctype_type;
123 {
return __pf(*
this); }
170 {
return _M_extract(__n); }
177 {
return _M_extract(__n); }
184 {
return _M_extract(__n); }
188 {
return _M_extract(__n); }
192 {
return _M_extract(__n); }
194 #ifdef _GLIBCXX_USE_LONG_LONG
197 {
return _M_extract(__n); }
201 {
return _M_extract(__n); }
206 {
return _M_extract(__f); }
210 {
return _M_extract(__f); }
214 {
return _M_extract(__f); }
218 {
return _M_extract(__p); }
324 get(char_type* __s,
streamsize __n, char_type __delim);
336 {
return this->
get(__s, __n, this->
widen(
'\n')); }
358 get(__streambuf_type& __sb, char_type __delim);
369 {
return this->
get(__sb, this->
widen(
'\n')); }
583 seekg(off_type, ios_base::seekdir);
591 template<
typename _ValueT>
593 _M_extract(_ValueT& __v);
612 #ifdef _GLIBCXX_USE_WCHAR_T
614 basic_istream<wchar_t>&
619 basic_istream<wchar_t>&
624 basic_istream<wchar_t>&
637 template<
typename _CharT,
typename _Traits>
649 typedef typename _Traits::int_type __int_type;
683 #ifdef __GXX_EXPERIMENTAL_CXX0X__
686 operator bool()
const
703 template<
typename _CharT,
typename _Traits>
707 template<
class _Traits>
710 {
return (__in >> reinterpret_cast<char&>(__c)); }
712 template<
class _Traits>
713 inline basic_istream<char, _Traits>&
715 {
return (__in >> reinterpret_cast<char&>(__c)); }
745 template<
typename _CharT,
typename _Traits>
746 basic_istream<_CharT, _Traits>&
747 operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
752 operator>>(basic_istream<char>& __in,
char* __s);
754 template<
class _Traits>
755 inline basic_istream<char, _Traits>&
757 {
return (__in >> reinterpret_cast<char*>(__s)); }
759 template<
class _Traits>
760 inline basic_istream<char, _Traits>&
762 {
return (__in >> reinterpret_cast<char*>(__s)); }
773 template<
typename _CharT,
typename _Traits>
775 :
public basic_istream<_CharT, _Traits>,
776 public basic_ostream<_CharT, _Traits>
782 typedef _CharT char_type;
783 typedef typename _Traits::int_type int_type;
784 typedef typename _Traits::pos_type pos_type;
785 typedef typename _Traits::off_type off_type;
786 typedef _Traits traits_type;
789 typedef basic_istream<_CharT, _Traits> __istream_type;
790 typedef basic_ostream<_CharT, _Traits> __ostream_type;
810 : __istream_type(), __ostream_type() { }
834 template<
typename _CharT,
typename _Traits>
835 basic_istream<_CharT, _Traits>&
836 ws(basic_istream<_CharT, _Traits>& __is);
838 #ifdef __GXX_EXPERIMENTAL_CXX0X__
850 template<
typename _CharT,
typename _Traits,
typename _Tp>
851 inline basic_istream<_CharT, _Traits>&
853 {
return (__is >> __x); }
854 #endif // __GXX_EXPERIMENTAL_CXX0X__
856 _GLIBCXX_END_NAMESPACE_VERSION
The base of the I/O class hierarchy.This class defines everything that can be defined about I/O that ...
__istream_type & operator>>(unsigned int &__n)
Basic arithmetic extractors.
virtual ~basic_iostream()
Destructor does nothing.
basic_iostream(basic_streambuf< _CharT, _Traits > *__sb)
Constructor does nothing.
__istream_type & operator>>(void *&__p)
Basic arithmetic extractors.
_Traits traits_type
Easy access to dependant types.
__istream_type & operator>>(__ios_type &(*__pf)(__ios_type &))
Interface for manipulators.
__istream_type & operator>>(unsigned short &__n)
Basic arithmetic extractors.
ptrdiff_t streamsize
Integral type for I/O operation counts and buffer sizes.
__istream_type & operator>>(double &__f)
Basic arithmetic extractors.
int sync()
Synchronizing the stream buffer.
__istream_type & getline(char_type *__s, streamsize __n, char_type __delim)
String extraction.
Primary class template ctype facet.This template class defines classification and conversion function...
__istream_type & operator>>(unsigned long &__n)
Basic arithmetic extractors.
__istream_type & getline(char_type *__s, streamsize __n)
String extraction.
bitset< _Nb > operator>>(size_t __position) const
Self-explanatory.
__istream_type & operator>>(long &__n)
Basic arithmetic extractors.
streamsize gcount() const
Character counting.
__istream_type & ignore()
Discarding characters.
__istream_type & unget()
Unextracting the previous character.
pos_type tellg()
Getting the current read position.
basic_istream< _CharT, _Traits > & ws(basic_istream< _CharT, _Traits > &__is)
Quick and easy way to eat whitespace.
__istream_type & operator>>(float &__f)
Basic arithmetic extractors.
__istream_type & operator>>(ios_base &(*__pf)(ios_base &))
Interface for manipulators.
Merging istream and ostream capabilities.This class multiply inherits from the input and output strea...
streamsize readsome(char_type *__s, streamsize __n)
Extraction until the buffer is exhausted, but no more.
int_type peek()
Looking ahead in the stream.
__istream_type & operator>>(long double &__f)
Basic arithmetic extractors.
__istream_type & operator>>(bool &__n)
Basic arithmetic extractors.
void init(basic_streambuf< _CharT, _Traits > *__sb)
All setup is performed here.
__istream_type & operator>>(long long &__n)
Basic arithmetic extractors.
__istream_type & putback(char_type __c)
Unextracting a single character.
Performs setup work for input streams.
virtual ~basic_istream()
Base destructor.
__istream_type & operator>>(__istream_type &(*__pf)(__istream_type &))
Interface for manipulators.
char_type widen(char __c) const
Widens characters.
__istream_type & seekg(pos_type)
Changing the current read position.
basic_istream(__streambuf_type *__sb)
Base constructor.
__istream_type & read(char_type *__s, streamsize __n)
Extraction without delimiters.
__istream_type & operator>>(unsigned long long &__n)
Basic arithmetic extractors.