STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
basic_istream< _Elem, _Traits > Class Template Reference
Inheritance diagram for basic_istream< _Elem, _Traits >:
basic_ios< _Elem, _Traits > ios_base _Iosb< int > basic_ifstream< _Elem, _Traits > basic_iostream< _Elem, _Traits > basic_istringstream< _Elem, _Traits, _Alloc > istrstream basic_fstream< _Elem, _Traits > basic_stringstream< _Elem, _Traits, _Alloc > strstream

Classes

class  _Sentry_base
 
class  sentry
 

Public Types

typedef basic_istream< _Elem, _Traits > _Myt
 
typedef basic_ios< _Elem, _Traits > _Myios
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef istreambuf_iterator< _Elem, _Traits > _Iter
 
typedef ctype< _Elem > _Ctype
 
typedef num_get< _Elem, _Iter_Nget
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from basic_ios< _Elem, _Traits >
typedef basic_ios< _Elem, _Traits > _Myt
 
typedef basic_ostream< _Elem, _Traits > _Myos
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef ctype< _Elem > _Ctype
 
typedef _Elem char_type
 
typedef _Traits traits_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from ios_base
enum  event { erase_event, imbue_event, copyfmt_event }
 
typedef void(__CLRCALL_OR_CDECLevent_callback) (event, ios_base &, int)
 
- Public Types inherited from _Iosb< int >
enum  _Dummy_enum
 
enum  _Fmtflags
 
enum  _Iostate
 
enum  _Openmode
 
enum  _Seekdir
 
enum  
 

Public Member Functions

__CLR_OR_THIS_CALL basic_istream (_Mysb *_Strbuf, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_istream (_Uninitialized)
 
__CLR_OR_THIS_CALL basic_istream (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
virtual __CLR_OR_THIS_CALL ~basic_istream () _NOEXCEPT
 
bool __CLR_OR_THIS_CALL _Ipfx (bool _Noskip=false)
 
bool __CLR_OR_THIS_CALL ipfx (bool _Noskip=false)
 
void __CLR_OR_THIS_CALL isfx ()
 
_Myt &__CLR_OR_THIS_CALL operator>> (_Myt &(__cdecl *_Pfn)(_Myt &))
 
_Myt &__CLR_OR_THIS_CALL operator>> (_Myios &(__cdecl *_Pfn)(_Myios &))
 
_Myt &__CLR_OR_THIS_CALL operator>> (ios_base &(__cdecl *_Pfn)(ios_base &))
 
_Myt &__CLR_OR_THIS_CALL operator>> (bool &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (short &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (unsigned short &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (int &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (unsigned int &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (long &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (unsigned long &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (_LONGLONG &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (_ULONGLONG &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (float &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (double &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (long double &_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (void *&_Val)
 
_Myt &__CLR_OR_THIS_CALL operator>> (_Mysb *_Strbuf)
 
int_type __CLR_OR_THIS_CALL get ()
 
_Myt &__CLR_OR_THIS_CALL get (_Elem *_Str, streamsize _Count)
 
_Myt &__CLR_OR_THIS_CALL get (_Elem *_Str, streamsize _Count, _Elem _Delim)
 
_Myt &__CLR_OR_THIS_CALL get (_Elem &_Ch)
 
_Myt &__CLR_OR_THIS_CALL get (_Mysb &_Strbuf)
 
_Myt &__CLR_OR_THIS_CALL get (_Mysb &_Strbuf, _Elem _Delim)
 
_Myt &__CLR_OR_THIS_CALL getline (_Elem *_Str, streamsize _Count)
 
_Myt &__CLR_OR_THIS_CALL getline (_Elem *_Str, streamsize _Count, _Elem _Delim)
 
_Myt &__CLR_OR_THIS_CALL ignore (streamsize _Count=1, int_type _Metadelim=_Traits::eof())
 
_Myt &__CLR_OR_THIS_CALL read (_Elem *_Str, streamsize _Count)
 
streamsize __CLR_OR_THIS_CALL readsome (_Elem *_Str, streamsize _Count)
 
int_type __CLR_OR_THIS_CALL peek ()
 
_Myt &__CLR_OR_THIS_CALL putback (_Elem _Ch)
 
_Myt &__CLR_OR_THIS_CALL unget ()
 
streamsize __CLR_OR_THIS_CALL gcount () const
 
int __CLR_OR_THIS_CALL sync ()
 
_Myt &__CLR_OR_THIS_CALL seekg (pos_type _Pos)
 
_Myt &__CLR_OR_THIS_CALL seekg (off_type _Off, ios_base::seekdir _Way)
 
pos_type __CLR_OR_THIS_CALL tellg ()
 
template<>
basic_istream< unsigned short, char_traits< unsigned short > > &__CLR_OR_THIS_CALL operator>> (unsigned short &_Ch)
 
- Public Member Functions inherited from basic_ios< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_ios (_Mysb *_Strbuf)
 
virtual __CLR_OR_THIS_CALL ~basic_ios () _NOEXCEPT
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Reraise=false)
 
_Myt &__CLR_OR_THIS_CALL copyfmt (const _Myt &_Right)
 
_Myos *__CLR_OR_THIS_CALL tie () const
 
_Myos *__CLR_OR_THIS_CALL tie (_Myos *_Newtie)
 
_Mysb *__CLR_OR_THIS_CALL rdbuf () const
 
_Mysb *__CLR_OR_THIS_CALL rdbuf (_Mysb *_Strbuf)
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
_Elem __CLR_OR_THIS_CALL fill () const
 
_Elem __CLR_OR_THIS_CALL fill (_Elem _Newfill)
 
char __CLR_OR_THIS_CALL narrow (_Elem _Ch, char _Dflt= '\0') const
 
_Elem __CLR_OR_THIS_CALL widen (char _Byte) const
 
void __CLR_OR_THIS_CALL move (_Myt &_Right)
 
void __CLR_OR_THIS_CALL move (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right) _NOEXCEPT
 
void __CLR_OR_THIS_CALL set_rdbuf (_Mysb *_Strbuf)
 
__CLR_OR_THIS_CALL basic_ios (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
- Public Member Functions inherited from ios_base
 _IOS_BITMASK (_Fmtflags, fmtflags)
 
 _IOS_BITMASK (_Iostate, iostate)
 
 _IOS_BITMASK (_Openmode, openmode)
 
 _IOS_BITMASK (_Seekdir, seekdir)
 
__CLR_OR_THIS_CALL operator bool () const
 
bool __CLR_OR_THIS_CALL operator! () const
 
void __CLR_OR_THIS_CALL clear (iostate _State, bool _Reraise)
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit)
 
iostate __CLR_OR_THIS_CALL rdstate () const
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Exreraise)
 
void __CLR_OR_THIS_CALL setstate (iostate _State)
 
bool __CLR_OR_THIS_CALL good () const
 
bool __CLR_OR_THIS_CALL eof () const
 
bool __CLR_OR_THIS_CALL fail () const
 
bool __CLR_OR_THIS_CALL bad () const
 
iostate __CLR_OR_THIS_CALL exceptions () const
 
void __CLR_OR_THIS_CALL exceptions (iostate _Newexcept)
 
fmtflags __CLR_OR_THIS_CALL flags () const
 
fmtflags __CLR_OR_THIS_CALL flags (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags, fmtflags _Mask)
 
void __CLR_OR_THIS_CALL unsetf (fmtflags _Mask)
 
streamsize __CLR_OR_THIS_CALL precision () const
 
streamsize __CLR_OR_THIS_CALL precision (streamsize _Newprecision)
 
streamsize __CLR_OR_THIS_CALL width () const
 
streamsize __CLR_OR_THIS_CALL width (streamsize _Newwidth)
 
locale __CLR_OR_THIS_CALL getloc () const
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
long &__CLR_OR_THIS_CALL iword (int _Idx)
 
void *&__CLR_OR_THIS_CALL pword (int _Idx)
 
void __CLR_OR_THIS_CALL register_callback (event_callback _Pfn, int _Idx)
 
ios_base &__CLR_OR_THIS_CALL copyfmt (const ios_base &_Other)
 
void __CLR_OR_THIS_CALL swap (ios_base &_Right)
 
virtual __CLR_OR_THIS_CALL ~ios_base () _NOEXCEPT
 
 ios_base (const ios_base &)=delete
 
ios_baseoperator= (const ios_base &)=delete
 

Protected Member Functions

__CLR_OR_THIS_CALL basic_istream (_Myt &&_Right)
 
_Myt &__CLR_OR_THIS_CALL operator= (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right)
 
- Protected Member Functions inherited from basic_ios< _Elem, _Traits >
void __CLR_OR_THIS_CALL init (_Mysb *_Strbuf=0, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_ios ()
 
- Protected Member Functions inherited from ios_base
__CLR_OR_THIS_CALL ios_base ()
 
void __CLR_OR_THIS_CALL _Init ()
 

Private Attributes

streamsize _Chcount
 

Additional Inherited Members

- Static Public Member Functions inherited from ios_base
static int __CLRCALL_OR_CDECL xalloc ()
 
static bool __CLRCALL_OR_CDECL sync_with_stdio (bool _Newsync=true)
 
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL _Addstd (ios_base *)
 
- Public Attributes inherited from ios_base
size_t _Stdstr
 
- Static Public Attributes inherited from _Iosb< int >
static constexpr _Fmtflags skipws
 
static constexpr _Fmtflags unitbuf
 
static constexpr _Fmtflags uppercase
 
static constexpr _Fmtflags showbase
 
static constexpr _Fmtflags showpoint
 
static constexpr _Fmtflags showpos
 
static constexpr _Fmtflags left
 
static constexpr _Fmtflags right
 
static constexpr _Fmtflags internal
 
static constexpr _Fmtflags dec
 
static constexpr _Fmtflags oct
 
static constexpr _Fmtflags hex
 
static constexpr _Fmtflags scientific
 
static constexpr _Fmtflags fixed
 
static constexpr _Fmtflags hexfloat
 
static constexpr _Fmtflags boolalpha
 
static constexpr _Fmtflags _Stdio
 
static constexpr _Fmtflags adjustfield
 
static constexpr _Fmtflags basefield
 
static constexpr _Fmtflags floatfield
 
static constexpr _Iostate goodbit
 
static constexpr _Iostate eofbit
 
static constexpr _Iostate failbit
 
static constexpr _Iostate badbit
 
static constexpr _Openmode in
 
static constexpr _Openmode out
 
static constexpr _Openmode ate
 
static constexpr _Openmode app
 
static constexpr _Openmode trunc
 
static constexpr _Openmode _Nocreate
 
static constexpr _Openmode _Noreplace
 
static constexpr _Openmode binary
 
static constexpr _Seekdir beg
 
static constexpr _Seekdir cur
 
static constexpr _Seekdir end
 

Member Typedef Documentation

template<class _Elem, class _Traits>
typedef ctype<_Elem> basic_istream< _Elem, _Traits >::_Ctype
template<class _Elem, class _Traits>
typedef istreambuf_iterator<_Elem, _Traits> basic_istream< _Elem, _Traits >::_Iter
template<class _Elem, class _Traits>
typedef basic_ios<_Elem, _Traits> basic_istream< _Elem, _Traits >::_Myios
template<class _Elem, class _Traits>
typedef basic_streambuf<_Elem, _Traits> basic_istream< _Elem, _Traits >::_Mysb
template<class _Elem, class _Traits>
typedef basic_istream<_Elem, _Traits> basic_istream< _Elem, _Traits >::_Myt
template<class _Elem, class _Traits>
typedef num_get<_Elem, _Iter> basic_istream< _Elem, _Traits >::_Nget
template<class _Elem, class _Traits>
typedef _Traits::int_type basic_istream< _Elem, _Traits >::int_type
template<class _Elem, class _Traits>
typedef _Traits::off_type basic_istream< _Elem, _Traits >::off_type
template<class _Elem, class _Traits>
typedef _Traits::pos_type basic_istream< _Elem, _Traits >::pos_type

Constructor & Destructor Documentation

template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::basic_istream ( _Mysb _Strbuf,
bool  _Isstd = false 
)
inlineexplicit
45  : _Chcount(0)
46  { // construct from stream buffer pointer
47  _Myios::init(_Strbuf, _Isstd);
48  }
void __CLR_OR_THIS_CALL init(_Mysb *_Strbuf=0, bool _Isstd=false)
Definition: ios:168
streamsize _Chcount
Definition: istream:890
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::basic_istream ( _Uninitialized  )
inline
51  { // construct uninitialized
52  this->_Addstd(this);
53  }
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL _Addstd(ios_base *)
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::basic_istream ( _Myt &&  _Right)
inlineprotected
57  : _Chcount(_Right._Chcount)
58  { // construct by moving _Right
59  _Myios::init();
61  _Right._Chcount = 0;
62  }
void __CLR_OR_THIS_CALL init(_Mysb *_Strbuf=0, bool _Isstd=false)
Definition: ios:168
void __CLR_OR_THIS_CALL move(_Myt &_Right)
Definition: ios:135
streamsize _Chcount
Definition: istream:890
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::basic_istream ( const _Myt )
delete
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::~basic_istream ( )
inlinevirtual
81  { // destroy the object
82  }

Member Function Documentation

template<class _Elem, class _Traits>
bool __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::_Ipfx ( bool  _Noskip = false)
inline
134  { // test stream state and skip whitespace as needed
135  if (this->good())
136  { // state okay, flush tied stream and skip whitespace
137  if (_Myios::tie() != 0)
138  _Myios::tie()->flush();
139 
140  if (!_Noskip && this->flags() & ios_base::skipws)
141  { // skip whitespace
142  const _Ctype& _Ctype_fac = _USE(this->getloc(), _Ctype);
143 
145  int_type _Meta = _Myios::rdbuf()->sgetc();
146 
147  for (; ; _Meta = _Myios::rdbuf()->snextc())
148  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
149  { // end of file, quit
151  break;
152  }
153  else if (!_Ctype_fac.is(_Ctype::space,
154  _Traits::to_char_type(_Meta)))
155  break; // not whitespace, quit
157  }
158 
159  if (this->good())
160  return (true);
161  }
163  return (false);
164  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
_Myt &__CLR_OR_THIS_CALL flush()
Definition: ostream:573
#define _USE(loc, fac)
Definition: xlocale:547
bool __CLR_OR_THIS_CALL good() const
Definition: xiosbase:337
static constexpr _Fmtflags skipws
Definition: xiosbase:56
#define _TRY_IO_BEGIN
Definition: ostream:30
ctype< _Elem > _Ctype
Definition: istream:29
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:376
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:166
#define _CATCH_IO_END
Definition: ostream:31
Definition: xlocale:2097
_Myos *__CLR_OR_THIS_CALL tie() const
Definition: ios:78
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::gcount ( ) const
inline
831  { // get count from last extraction
832  return (_Chcount);
833  }
streamsize _Chcount
Definition: istream:890
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( )
inline
518  { // extract a metacharacter
519  int_type _Meta = 0;
520  ios_base::iostate _State = ios_base::goodbit;
521  _Chcount = 0;
522  const sentry _Ok(*this, true);
523 
524  if (!_Ok)
525  _Meta = _Traits::eof(); // state not okay, return EOF
526  else
527  { // state okay, extract a character
529  _Meta = _Myios::rdbuf()->sgetc();
530 
531  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
532  _State |= ios_base::eofbit | ios_base::failbit; // end of file
533  else
534  { // got a character, count it
535  _Myios::rdbuf()->sbumpc();
536  ++_Chcount;
537  }
539  }
540 
541  _Myios::setstate(_State);
542  return (_Meta);
543  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:148
_Traits::int_type int_type
Definition: istream:84
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem *  _Str,
streamsize  _Count 
)
inline
546  { // get up to _Count characters into NTCS
547  return (get(_Str, _Count, _Myios::widen('\n')));
548  }
unsigned int _Count
Definition: xcomplex:668
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:129
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem *  _Str,
streamsize  _Count,
_Elem  _Delim 
)
inline
552  { // get up to _Count characters into NTCS, stop before _Delim
553  ios_base::iostate _State = ios_base::goodbit;
554  _Chcount = 0;
555  const sentry _Ok(*this, true);
556 
557  if (_Ok && 0 < _Count)
558  { // state okay, extract characters
560  int_type _Meta = _Myios::rdbuf()->sgetc();
561 
562  for (; 0 < --_Count; _Meta = _Myios::rdbuf()->snextc())
563  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
564  { // end of file, quit
565  _State |= ios_base::eofbit;
566  break;
567  }
568  else if (_Traits::to_char_type(_Meta) == _Delim)
569  break; // got a delimiter, quit
570  else
571  { // got a character, add it to string
572  _DEBUG_POINTER(_Str);
573  *_Str++ = _Traits::to_char_type(_Meta);
574  ++_Chcount;
575  }
577  }
578 
580  ? _State | ios_base::failbit : _State);
581  *_Str = _Elem(); // add terminating null character
582  return (*this);
583  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
unsigned int _Count
Definition: xcomplex:668
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:166
#define _DEBUG_POINTER(first)
Definition: xutility:819
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem &  _Ch)
inline
586  { // get a character
587  int_type _Meta = get();
588  if (!_Traits::eq_int_type(_Traits::eof(), _Meta))
589  _Ch = _Traits::to_char_type(_Meta);
590  return (*this);
591  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Traits::int_type int_type
Definition: istream:84
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Mysb _Strbuf)
inline
594  { // extract up to newline and insert into stream buffer
595  return (get(_Strbuf, _Myios::widen('\n')));
596  }
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:129
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Mysb _Strbuf,
_Elem  _Delim 
)
inline
599  { // extract up to delimiter and insert into stream buffer
600  ios_base::iostate _State = ios_base::goodbit;
601  _Chcount = 0;
602  const sentry _Ok(*this, true);
603 
604  if (_Ok)
605  { // state okay, use facet to extract
607  int_type _Meta = _Myios::rdbuf()->sgetc();
608 
609  for (; ; _Meta = _Myios::rdbuf()->snextc())
610  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
611  { // end of file, quit
612  _State |= ios_base::eofbit;
613  break;
614  }
615  else
616  { // got a character, insert it into stream buffer
617  _TRY_BEGIN
618  _Elem _Ch = _Traits::to_char_type(_Meta);
619  if (_Ch == _Delim
620  || _Traits::eq_int_type(_Traits::eof(),
621  _Strbuf.sputc(_Ch)))
622  break;
623  _CATCH_ALL
624  break;
625  _CATCH_END
626  ++_Chcount;
627  }
629  }
630 
631  if (_Chcount == 0)
632  _State |= ios_base::failbit;
633  _Myios::setstate(_State);
634  return (*this);
635  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
#define _TRY_IO_BEGIN
Definition: ostream:30
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:166
#define _CATCH_ALL
Definition: xstddef:62
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::getline ( _Elem *  _Str,
streamsize  _Count 
)
inline
638  { // get up to _Count characters into NTCS, discard newline
639  return (getline(_Str, _Count, _Myios::widen('\n')));
640  }
unsigned int _Count
Definition: xcomplex:668
_Myt &__CLR_OR_THIS_CALL getline(_Elem *_Str, streamsize _Count)
Definition: istream:637
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:129
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::getline ( _Elem *  _Str,
streamsize  _Count,
_Elem  _Delim 
)
inline
644  { // get up to _Count characters into NTCS, discard _Delim
645  ios_base::iostate _State = ios_base::goodbit;
646  _Chcount = 0;
647  const sentry _Ok(*this, true);
648 
649  if (_Ok && 0 < _Count)
650  { // state okay, use facet to extract
651  int_type _Metadelim = _Traits::to_int_type(_Delim);
652 
654  int_type _Meta = _Myios::rdbuf()->sgetc();
655 
656  for (; ; _Meta = _Myios::rdbuf()->snextc())
657  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
658  { // end of file, quit
659  _State |= ios_base::eofbit;
660  break;
661  }
662  else if (_Meta == _Metadelim)
663  { // got a delimiter, discard it and quit
664  ++_Chcount;
665  _Myios::rdbuf()->sbumpc();
666  break;
667  }
668  else if (--_Count <= 0)
669  { // buffer full, quit
670  _State |= ios_base::failbit;
671  break;
672  }
673  else
674  { // got a character, add it to string
675  _DEBUG_POINTER(_Str);
676  *_Str++ = _Traits::to_char_type(_Meta);
677  ++_Chcount;
678  }
680  }
681 
682  *_Str = _Elem(); // add terminating null character
683  _Myios::setstate(_Chcount == 0 ? _State | ios_base::failbit : _State);
684  return (*this);
685  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
unsigned int _Count
Definition: xcomplex:668
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:148
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:166
#define _DEBUG_POINTER(first)
Definition: xutility:819
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::ignore ( streamsize  _Count = 1,
int_type  _Metadelim = _Traits::eof() 
)
inline
689  { // ignore up to _Count characters, discarding delimiter
690  ios_base::iostate _State = ios_base::goodbit;
691  _Chcount = 0;
692  const sentry _Ok(*this, true);
693 
694  if (_Ok && 0 < _Count)
695  { // state okay, use facet to extract
697  for (; ; )
698  { // get a metacharacter if more room in buffer
699  int_type _Meta;
701  && --_Count < 0)
702  break; // buffer full, quit
703  else if (_Traits::eq_int_type(_Traits::eof(),
704  _Meta = _Myios::rdbuf()->sbumpc()))
705  { // end of file, quit
706  _State |= ios_base::eofbit;
707  break;
708  }
709  else
710  { // got a character, count it
711  ++_Chcount;
712  if (_Meta == _Metadelim)
713  break; // got a delimiter, quit
714  }
715  }
717  }
718 
719  _Myios::setstate(_State);
720  return (*this);
721  }
unsigned int _Count
Definition: xcomplex:668
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_Traits::int_type int_type
Definition: istream:84
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
Definition: limits:101
template<class _Elem, class _Traits>
bool __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::ipfx ( bool  _Noskip = false)
inline
167  { // test stream state and skip whitespace as needed (retained)
168  return (_Ipfx(_Noskip));
169  }
bool __CLR_OR_THIS_CALL _Ipfx(bool _Noskip=false)
Definition: istream:133
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::isfx ( )
inline
172  { // perform any wrapup (retained)
173  }
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator= ( _Myt &&  _Right)
inlineprotected
65  { // move from _Right
66  this->swap(_Right);
67  return (*this);
68  }
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: istream:70
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator= ( const _Myt )
delete
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Myt __cdecl *_Pfn)(_Myt &)
inline
198  { // call basic_istream manipulator
199  _DEBUG_POINTER(_Pfn);
200  return ((*_Pfn)(*this));
201  }
#define _DEBUG_POINTER(first)
Definition: xutility:819
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Myios __cdecl *_Pfn)(_Myios &)
inline
204  { // call basic_ios manipulator
205  _DEBUG_POINTER(_Pfn);
206  (*_Pfn)(*(_Myios *)this);
207  return (*this);
208  }
basic_ios< _Elem, _Traits > _Myios
Definition: istream:26
#define _DEBUG_POINTER(first)
Definition: xutility:819
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( ios_base __cdecl *_Pfn)(ios_base &)
inline
211  { // call ios_base manipulator
212  _DEBUG_POINTER(_Pfn);
213  (*_Pfn)(*(ios_base *)this);
214  return (*this);
215  }
Definition: xiosbase:199
#define _DEBUG_POINTER(first)
Definition: xutility:819
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( bool _Val)
inline
218  { // extract a boolean
219  ios_base::iostate _State = ios_base::goodbit;
220  const sentry _Ok(*this);
221 
222  if (_Ok)
223  { // state okay, use facet to extract
224  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
225 
227  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
228  *this, _State, _Val);
230  }
231 
232  _Myios::setstate(_State);
233  return (*this);
234  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( short &  _Val)
inline
237  { // extract a short
238  ios_base::iostate _State = ios_base::goodbit;
239  const sentry _Ok(*this);
240 
241  if (_Ok)
242  { // state okay, use facet to extract
243  long _Tmp = 0;
244  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
245 
247  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
248  *this, _State, _Tmp);
250 
251  if (_State & ios_base::failbit
252  || _Tmp < SHRT_MIN || SHRT_MAX < _Tmp)
253  _State |= ios_base::failbit;
254  else
255  _Val = (short)_Tmp;
256  }
257 
258  _Myios::setstate(_State);
259  return (*this);
260  }
static constexpr _Iostate failbit
Definition: xiosbase:89
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
#define SHRT_MIN
Definition: limits.h:31
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
#define SHRT_MAX
Definition: limits.h:32
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned short &  _Val)
inline
272  { // extract an unsigned short
273  ios_base::iostate _State = ios_base::goodbit;
274  const sentry _Ok(*this);
275 
276  if (_Ok)
277  { // state okay, use facet to extract
278  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
279 
281  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
282  *this, _State, _Val);
284  }
285 
286  _Myios::setstate(_State);
287  return (*this);
288  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( int &  _Val)
inline
291  { // extract an int
292  ios_base::iostate _State = ios_base::goodbit;
293  const sentry _Ok(*this);
294 
295  if (_Ok)
296  { // state okay, use facet to extract
297  long _Tmp = 0;
298  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
299 
301  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
302  *this, _State, _Tmp);
304 
305  if (_State & ios_base::failbit
306  || _Tmp < INT_MIN || INT_MAX < _Tmp)
307  _State |= ios_base::failbit;
308  else
309  _Val = _Tmp;
310  }
311 
312  _Myios::setstate(_State);
313  return (*this);
314  }
static constexpr _Iostate failbit
Definition: xiosbase:89
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
#define INT_MIN
Definition: limits.h:34
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
#define INT_MAX
Definition: limits.h:35
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned int &  _Val)
inline
317  { // extract an unsigned int
318  ios_base::iostate _State = ios_base::goodbit;
319  const sentry _Ok(*this);
320  if (_Ok)
321  { // state okay, use facet to extract
322  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
323 
325  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
326  *this, _State, _Val);
328  }
329 
330  _Myios::setstate(_State);
331  return (*this);
332  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( long &  _Val)
inline
335  { // extract a long
336  ios_base::iostate _State = ios_base::goodbit;
337  const sentry _Ok(*this);
338 
339  if (_Ok)
340  { // state okay, use facet to extract
341  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
343  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
344  *this, _State, _Val);
346  }
347 
348  _Myios::setstate(_State);
349  return (*this);
350  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned long &  _Val)
inline
353  { // extract an unsigned long
354  ios_base::iostate _State = ios_base::goodbit;
355  const sentry _Ok(*this);
356 
357  if (_Ok)
358  { // state okay, use facet to extract
359  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
360 
362  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
363  *this, _State, _Val);
365  }
366 
367  _Myios::setstate(_State);
368  return (*this);
369  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _LONGLONG _Val)
inline
372  { // extract a long long
373  ios_base::iostate _State = ios_base::goodbit;
374  const sentry _Ok(*this);
375 
376  if (_Ok)
377  { // state okay, use facet to extract
378  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
379 
381  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
382  *this, _State, _Val);
384  }
385 
386  _Myios::setstate(_State);
387  return (*this);
388  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _ULONGLONG _Val)
inline
391  { // extract an unsigned long long
392  ios_base::iostate _State = ios_base::goodbit;
393  const sentry _Ok(*this);
394  if (_Ok)
395  { // state okay, use facet to extract
396  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
397 
399  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
400  *this, _State, _Val);
402  }
403 
404  _Myios::setstate(_State);
405  return (*this);
406  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( float &  _Val)
inline
409  { // extract a float
410  ios_base::iostate _State = ios_base::goodbit;
411  const sentry _Ok(*this);
412 
413  if (_Ok)
414  { // state okay, use facet to extract
415  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
416 
418  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
419  *this, _State, _Val);
421  }
422 
423  _Myios::setstate(_State);
424  return (*this);
425  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( double &  _Val)
inline
428  { // extract a double
429  ios_base::iostate _State = ios_base::goodbit;
430  const sentry _Ok(*this);
431  if (_Ok)
432  { // state okay, use facet to extract
433  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
434 
436  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
437  *this, _State, _Val);
439  }
440 
441  _Myios::setstate(_State);
442  return (*this);
443  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( long double &  _Val)
inline
446  { // extract a long double
447  ios_base::iostate _State = ios_base::goodbit;
448  const sentry _Ok(*this);
449 
450  if (_Ok)
451  { // state okay, use facet to extract
452  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
454  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
455  *this, _State, _Val);
457  }
458 
459  _Myios::setstate(_State);
460  return (*this);
461  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( void *&  _Val)
inline
464  { // extract a void pointer
465  ios_base::iostate _State = ios_base::goodbit;
466  const sentry _Ok(*this);
467 
468  if (_Ok)
469  { // state okay, use facet to extract
470  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
471 
473  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
474  *this, _State, _Val);
476  }
477 
478  _Myios::setstate(_State);
479  return (*this);
480  }
#define _USE(loc, fac)
Definition: xlocale:547
num_get< _Elem, _Iter > _Nget
Definition: istream:30
_In_ int _Val
Definition: vcruntime_string.h:62
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:433
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Mysb _Strbuf)
inline
483  { // extract until end-of-file into a stream buffer
484  ios_base::iostate _State = ios_base::goodbit;
485  bool _Copied = false;
486  const sentry _Ok(*this);
487 
488  if (_Ok && _Strbuf != 0)
489  { // state okay, extract characters
491  int_type _Meta = _Myios::rdbuf()->sgetc();
492 
493  for (; ; _Meta = _Myios::rdbuf()->snextc())
494  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
495  { // end of file, quit
496  _State |= ios_base::eofbit;
497  break;
498  }
499  else
500  { // got a character, insert it into buffer
501  _TRY_BEGIN
502  if (_Traits::eq_int_type(_Traits::eof(),
503  _Strbuf->sputc(_Traits::to_char_type(_Meta))))
504  break;
505  _CATCH_ALL
506  break;
507  _CATCH_END
508  _Copied = true;
509  }
511  }
512 
513  _Myios::setstate(!_Copied ? _State | ios_base::failbit : _State);
514  return (*this);
515  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
static constexpr _Iostate failbit
Definition: xiosbase:89
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:166
#define _CATCH_ALL
Definition: xstddef:62
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<>
basic_istream< unsigned short, char_traits< unsigned short > > &__CLR_OR_THIS_CALL basic_istream< unsigned short, char_traits< unsigned short > >::operator>> ( unsigned short &  _Ch)
inline
915  { // extract a character
916  return (_STD operator>>(*this, _Ch));
917  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::peek ( )
inline
767  { // return next character, unconsumed
768  ios_base::iostate _State = ios_base::goodbit;
769  _Chcount = 0;
770  int_type _Meta = 0;
771  const sentry _Ok(*this, true);
772 
773  if (!_Ok)
774  _Meta = _Traits::eof(); // state not okay, return EOF
775  else
776  { // state okay, read a character
778  if (_Traits::eq_int_type(_Traits::eof(),
779  _Meta = _Myios::rdbuf()->sgetc()))
780  _State |= ios_base::eofbit;
782  }
783 
784  _Myios::setstate(_State);
785  return (_Meta);
786  }
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_Traits::int_type int_type
Definition: istream:84
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::putback ( _Elem  _Ch)
inline
789  { // put back a character
790  _Chcount = 0;
791  ios_base::iostate _State = ios_base::goodbit;
792  ios_base::iostate _Oldstate = _Myios::rdstate();
793  _Myios::clear(_Oldstate & ~ios_base::eofbit);
794  const sentry _Ok(*this, true);
795 
796  if (_Ok)
797  { // state okay, put character back
799  if (_Traits::eq_int_type(_Traits::eof(),
800  _Myios::rdbuf()->sputbackc(_Ch)))
801  _State |= ios_base::badbit | _Oldstate;
803  }
804 
805  _Myios::setstate(_State);
806  return (*this);
807  }
iostate __CLR_OR_THIS_CALL rdstate() const
Definition: xiosbase:313
#define _TRY_IO_BEGIN
Definition: ostream:30
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static constexpr _Iostate badbit
Definition: xiosbase:90
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::read ( _Elem *  _Str,
streamsize  _Count 
)
inline
724  { // read up to _Count characters into buffer
725  ios_base::iostate _State = ios_base::goodbit;
726  _Chcount = 0;
727  const sentry _Ok(*this, true);
728 
729  if (_Ok && 0 < _Count)
730  { // state okay, use facet to extract
732  _DEBUG_POINTER(_Str);
733  const streamsize _Num = _Myios::rdbuf()->sgetn(_Str, _Count);
734  _Chcount += _Num;
735  if (_Num != _Count)
736  _State |= ios_base::eofbit | ios_base::failbit; // short read
738  }
739 
740  _Myios::setstate(_State);
741  return (*this);
742  }
_Longlong streamsize
Definition: iosfwd:22
static constexpr _Iostate failbit
Definition: xiosbase:89
unsigned int _Count
Definition: xcomplex:668
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
#define _DEBUG_POINTER(first)
Definition: xutility:819
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize __CLR_OR_THIS_CALL sgetn(_Elem *_Ptr, streamsize _Count)
Definition: streambuf:160
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::readsome ( _Elem *  _Str,
streamsize  _Count 
)
inline
746  { // read up to _Count characters into buffer, without blocking
747  ios_base::iostate _State = ios_base::goodbit;
748  _Chcount = 0;
749  const sentry _Ok(*this, true);
750  streamsize _Num;
751 
752  if (!_Ok)
753  _State |= ios_base::failbit; // no buffer, fail
754  else if ((_Num = _Myios::rdbuf()->in_avail()) < 0)
755  _State |= ios_base::eofbit; // no characters available
756  else if (0 < _Count && 0 < _Num)
757  { // validate _Str and read
758  _DEBUG_POINTER(_Str);
759  read(_Str, _Num < _Count ? _Num : _Count); // read available
760  }
761 
762  _Myios::setstate(_State);
763  return (gcount());
764  }
_Longlong streamsize
Definition: iosfwd:22
static constexpr _Iostate failbit
Definition: xiosbase:89
unsigned int _Count
Definition: xcomplex:668
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
streamsize __CLR_OR_THIS_CALL gcount() const
Definition: istream:830
_Myt &__CLR_OR_THIS_CALL read(_Elem *_Str, streamsize _Count)
Definition: istream:723
#define _DEBUG_POINTER(first)
Definition: xutility:819
static constexpr _Iostate goodbit
Definition: xiosbase:87
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::seekg ( pos_type  _Pos)
inline
851  { // set input stream position to _Pos
852  ios_base::iostate _State = ios_base::goodbit;
853  ios_base::iostate _Oldstate = _Myios::rdstate();
854  _Myios::clear(_Oldstate & ~ios_base::eofbit);
855  const sentry _Ok(*this, true);
856 
857  if (!this->fail()
858  && (off_type)_Myios::rdbuf()->pubseekpos(_Pos,
859  ios_base::in) == _BADOFF)
861  return (*this);
862  }
iostate __CLR_OR_THIS_CALL rdstate() const
Definition: xiosbase:313
static constexpr _Iostate failbit
Definition: xiosbase:89
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:347
static constexpr _Iostate goodbit
Definition: xiosbase:87
_Traits::off_type off_type
Definition: istream:86
static constexpr _Openmode in
Definition: xiosbase:96
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::seekg ( off_type  _Off,
ios_base::seekdir  _Way 
)
inline
865  { // change input stream position by _Off, according to _Way
866  ios_base::iostate _State = ios_base::goodbit;
867  ios_base::iostate _Oldstate = _Myios::rdstate();
868  _Myios::clear(_Oldstate & ~ios_base::eofbit);
869  const sentry _Ok(*this, true);
870 
871  if (!this->fail()
872  && (off_type)_Myios::rdbuf()->pubseekoff(_Off, _Way,
873  ios_base::in) == _BADOFF)
875  return (*this);
876  }
iostate __CLR_OR_THIS_CALL rdstate() const
Definition: xiosbase:313
static constexpr _Iostate failbit
Definition: xiosbase:89
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:347
static constexpr _Iostate goodbit
Definition: xiosbase:87
_Traits::off_type off_type
Definition: istream:86
static constexpr _Openmode in
Definition: xiosbase:96
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::swap ( _Myt _Right)
inlineprotected
71  { // swap with _Right
73  _STD swap(_Chcount, _Right._Chcount);
74  }
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: istream:70
void __CLR_OR_THIS_CALL swap(_Myt &_Right) _NOEXCEPT
Definition: ios:155
streamsize _Chcount
Definition: istream:890
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Elem, class _Traits>
int __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::sync ( )
inline
836  { // synchronize with input source
837  const sentry _Ok(*this, true);
838 
839  if (_Myios::rdbuf() == 0)
840  return (-1);
841  else if (_Myios::rdbuf()->pubsync() == -1)
842  { // sync failed
844  return (-1);
845  }
846  else
847  return (0);
848  }
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
static constexpr _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::tellg ( )
inline
879  { // return input stream position
880  const sentry _Ok(*this, true);
881 
882  if (!this->fail())
883  return (_Myios::rdbuf()->pubseekoff(0,
885  else
886  return (pos_type(_BADOFF));
887  }
static constexpr _Seekdir cur
Definition: xiosbase:113
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:347
_Traits::pos_type pos_type
Definition: istream:85
static constexpr _Openmode in
Definition: xiosbase:96
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::unget ( )
inline
810  { // put back last read character
811  _Chcount = 0;
812  ios_base::iostate _State = ios_base::goodbit;
813  ios_base::iostate _Oldstate = _Myios::rdstate();
814  _Myios::clear(_Oldstate & ~ios_base::eofbit);
815  const sentry _Ok(*this, true);
816 
817  if (_Ok)
818  { // state okay, put character back
820  if (_Traits::eq_int_type(_Traits::eof(),
821  _Myios::rdbuf()->sungetc()))
822  _State |= ios_base::badbit | _Oldstate;
824  }
825 
826  _Myios::setstate(_State);
827  return (*this);
828  }
iostate __CLR_OR_THIS_CALL rdstate() const
Definition: xiosbase:313
#define _TRY_IO_BEGIN
Definition: ostream:30
void __CLR_OR_THIS_CALL clear(iostate _State=goodbit, bool _Reraise=false)
Definition: ios:42
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:90
static constexpr _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static constexpr _Iostate badbit
Definition: xiosbase:90
streamsize _Chcount
Definition: istream:890
static constexpr _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:56

Member Data Documentation

template<class _Elem, class _Traits>
streamsize basic_istream< _Elem, _Traits >::_Chcount
private

The documentation for this class was generated from the following files: