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 _STD streamoff streamoff
 
typedef _STD streampos streampos
 
typedef void(__CLRCALL_OR_CDECLevent_callback) (event, ios_base &, int)
 
typedef unsigned int io_state
 
typedef unsigned int open_mode
 
typedef unsigned int seek_dir
 
- 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>> (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 clear (io_state _State)
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL setstate (io_state _State)
 
_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
 _BITMASK (_Fmtflags, fmtflags)
 
 _BITMASK (_Iostate, iostate)
 
 _BITMASK (_Openmode, openmode)
 
 _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)
 
void __CLR_OR_THIS_CALL clear (io_state _State)
 
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)
 
void __CLR_OR_THIS_CALL setstate (io_state _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)
 
void __CLR_OR_THIS_CALL exceptions (io_state _State)
 
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 const _Fmtflags skipws
 
static const _Fmtflags unitbuf
 
static const _Fmtflags uppercase
 
static const _Fmtflags showbase
 
static const _Fmtflags showpoint
 
static const _Fmtflags showpos
 
static const _Fmtflags left
 
static const _Fmtflags right
 
static const _Fmtflags internal
 
static const _Fmtflags dec
 
static const _Fmtflags oct
 
static const _Fmtflags hex
 
static const _Fmtflags scientific
 
static const _Fmtflags fixed
 
static const _Fmtflags hexfloat
 
static const _Fmtflags boolalpha
 
static const _Fmtflags _Stdio
 
static const _Fmtflags adjustfield
 
static const _Fmtflags basefield
 
static const _Fmtflags floatfield
 
static const _Iostate goodbit
 
static const _Iostate eofbit
 
static const _Iostate failbit
 
static const _Iostate badbit
 
static const _Iostate _Hardfail
 
static const _Openmode in
 
static const _Openmode out
 
static const _Openmode ate
 
static const _Openmode app
 
static const _Openmode trunc
 
static const _Openmode _Nocreate
 
static const _Openmode _Noreplace
 
static const _Openmode binary
 
static const _Seekdir beg
 
static const _Seekdir cur
 
static const _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:164
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:164
void __CLR_OR_THIS_CALL move(_Myt &_Right)
Definition: ios:131
streamsize _Chcount
Definition: istream:890
const _Ty & _Right
Definition: algorithm:4087
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
135  { // test stream state and skip whitespace as needed
136  if (this->good())
137  { // state okay, flush tied stream and skip whitespace
138  if (_Myios::tie() != 0)
139  _Myios::tie()->flush();
140 
141  if (!_Noskip && this->flags() & ios_base::skipws)
142  { // skip whitespace
143  const _Ctype& _Ctype_fac = _USE(this->getloc(), _Ctype);
144 
146  int_type _Meta = _Myios::rdbuf()->sgetc();
147 
148  for (; ; _Meta = _Myios::rdbuf()->snextc())
149  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
150  { // end of file, quit
152  break;
153  }
154  else if (!_Ctype_fac.is(_Ctype::space,
155  _Traits::to_char_type(_Meta)))
156  break; // not whitespace, quit
158  }
159 
160  if (this->good())
161  return (true);
162  }
164  return (false);
165  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _Iostate failbit
Definition: xiosbase:89
_Myt &__CLR_OR_THIS_CALL flush()
Definition: ostream:580
#define _USE(loc, fac)
Definition: xlocale:555
bool __CLR_OR_THIS_CALL good() const
Definition: xiosbase:328
static const _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:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:365
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:162
Definition: xlocale:2095
#define _CATCH_IO_END
Definition: ostream:31
_Myos *__CLR_OR_THIS_CALL tie() const
Definition: ios:74
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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
521  { // extract a metacharacter
522  int_type _Meta = 0;
523  ios_base::iostate _State = ios_base::goodbit;
524  _Chcount = 0;
525  const sentry _Ok(*this, true);
526 
527  if (!_Ok)
528  _Meta = _Traits::eof(); // state not okay, return EOF
529  else
530  { // state okay, extract a character
532  _Meta = _Myios::rdbuf()->sgetc();
533 
534  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
535  _State |= ios_base::eofbit | ios_base::failbit; // end of file
536  else
537  { // got a character, count it
538  _Myios::rdbuf()->sbumpc();
539  ++_Chcount;
540  }
542  }
543 
544  _Myios::setstate(_State);
545  return (_Meta);
546  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _Iostate failbit
Definition: xiosbase:89
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:144
_Traits::int_type int_type
Definition: istream:84
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem *  _Str,
streamsize  _Count 
)
inline
549  { // get up to _Count characters into NTCS
550  return (get(_Str, _Count, _Myios::widen('\n')));
551  }
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:125
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem *  _Str,
streamsize  _Count,
_Elem  _Delim 
)
inline
555  { // get up to _Count characters into NTCS, stop before _Delim
556  _DEBUG_POINTER(_Str);
557  ios_base::iostate _State = ios_base::goodbit;
558  _Chcount = 0;
559  const sentry _Ok(*this, true);
560 
561  if (_Ok && 0 < _Count)
562  { // state okay, extract characters
564  int_type _Meta = _Myios::rdbuf()->sgetc();
565 
566  for (; 0 < --_Count; _Meta = _Myios::rdbuf()->snextc())
567  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
568  { // end of file, quit
569  _State |= ios_base::eofbit;
570  break;
571  }
572  else if (_Traits::to_char_type(_Meta) == _Delim)
573  break; // got a delimiter, quit
574  else
575  { // got a character, add it to string
576  *_Str++ = _Traits::to_char_type(_Meta);
577  ++_Chcount;
578  }
580  }
581 
583  ? _State | ios_base::failbit : _State);
584  *_Str = _Elem(); // add terminating null character
585  return (*this);
586  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _CRTIMP _In_z_ const unsigned char * _Delim
Definition: mbstring.h:214
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:162
#define _DEBUG_POINTER(first)
Definition: xutility:465
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_Diff _Count
Definition: algorithm:1941
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Elem &  _Ch)
inline
589  { // get a character
590  int_type _Meta = get();
591  if (!_Traits::eq_int_type(_Traits::eof(), _Meta))
592  _Ch = _Traits::to_char_type(_Meta);
593  return (*this);
594  }
_Traits::int_type int_type
Definition: istream:84
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Mysb _Strbuf)
inline
597  { // extract up to newline and insert into stream buffer
598  return (get(_Strbuf, _Myios::widen('\n')));
599  }
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:125
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::get ( _Mysb _Strbuf,
_Elem  _Delim 
)
inline
602  { // extract up to delimiter and insert into stream buffer
603  ios_base::iostate _State = ios_base::goodbit;
604  _Chcount = 0;
605  const sentry _Ok(*this, true);
606 
607  if (_Ok)
608  { // state okay, use facet to extract
610  int_type _Meta = _Myios::rdbuf()->sgetc();
611 
612  for (; ; _Meta = _Myios::rdbuf()->snextc())
613  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
614  { // end of file, quit
615  _State |= ios_base::eofbit;
616  break;
617  }
618  else
619  { // got a character, insert it into stream buffer
620  _TRY_BEGIN
621  _Elem _Ch = _Traits::to_char_type(_Meta);
622  if (_Ch == _Delim
623  || _Traits::eq_int_type(_Traits::eof(),
624  _Strbuf.sputc(_Ch)))
625  break;
626  _CATCH_ALL
627  break;
628  _CATCH_END
629  ++_Chcount;
630  }
632  }
633 
634  if (_Chcount == 0)
635  _State |= ios_base::failbit;
636  _Myios::setstate(_State);
637  return (*this);
638  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _Iostate failbit
Definition: xiosbase:89
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
_Check_return_ _CRTIMP _In_z_ const unsigned char * _Delim
Definition: mbstring.h:214
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:162
#define _CATCH_ALL
Definition: xstddef:62
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::getline ( _Elem *  _Str,
streamsize  _Count 
)
inline
641  { // get up to _Count characters into NTCS, discard newline
642  return (getline(_Str, _Count, _Myios::widen('\n')));
643  }
_Myt &__CLR_OR_THIS_CALL getline(_Elem *_Str, streamsize _Count)
Definition: istream:640
_Elem __CLR_OR_THIS_CALL widen(char _Byte) const
Definition: ios:125
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::getline ( _Elem *  _Str,
streamsize  _Count,
_Elem  _Delim 
)
inline
647  { // get up to _Count characters into NTCS, discard _Delim
648  _DEBUG_POINTER(_Str);
649  ios_base::iostate _State = ios_base::goodbit;
650  _Chcount = 0;
651  const sentry _Ok(*this, true);
652 
653  if (_Ok && 0 < _Count)
654  { // state okay, use facet to extract
655  int_type _Metadelim = _Traits::to_int_type(_Delim);
656 
658  int_type _Meta = _Myios::rdbuf()->sgetc();
659 
660  for (; ; _Meta = _Myios::rdbuf()->snextc())
661  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
662  { // end of file, quit
663  _State |= ios_base::eofbit;
664  break;
665  }
666  else if (_Meta == _Metadelim)
667  { // got a delimiter, discard it and quit
668  ++_Chcount;
669  _Myios::rdbuf()->sbumpc();
670  break;
671  }
672  else if (--_Count <= 0)
673  { // buffer full, quit
674  _State |= ios_base::failbit;
675  break;
676  }
677  else
678  { // got a character, add it to string
679  ++_Chcount;
680  *_Str++ = _Traits::to_char_type(_Meta);
681  }
683  }
684 
685  *_Str = _Elem(); // add terminating null character
686  _Myios::setstate(_Chcount == 0 ? _State | ios_base::failbit : _State);
687  return (*this);
688  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _Iostate failbit
Definition: xiosbase:89
_Check_return_ _CRTIMP _In_z_ const unsigned char * _Delim
Definition: mbstring.h:214
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:144
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:162
#define _DEBUG_POINTER(first)
Definition: xutility:465
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_Diff _Count
Definition: algorithm:1941
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::ignore ( streamsize  _Count = 1,
int_type  _Metadelim = _Traits::eof() 
)
inline
692  { // ignore up to _Count characters, discarding delimiter
693  ios_base::iostate _State = ios_base::goodbit;
694  _Chcount = 0;
695  const sentry _Ok(*this, true);
696 
697  if (_Ok && 0 < _Count)
698  { // state okay, use facet to extract
700  for (; ; )
701  { // get a metacharacter if more room in buffer
702  int_type _Meta;
703  if (_Count != INT_MAX && --_Count < 0)
704  break; // buffer full, quit
705  else if (_Traits::eq_int_type(_Traits::eof(),
706  _Meta = _Myios::rdbuf()->sbumpc()))
707  { // end of file, quit
708  _State |= ios_base::eofbit;
709  break;
710  }
711  else
712  { // got a character, count it
713  ++_Chcount;
714  if (_Meta == _Metadelim)
715  break; // got a delimiter, quit
716  }
717  }
719  }
720 
721  _Myios::setstate(_State);
722  return (*this);
723  }
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Traits::int_type int_type
Definition: istream:84
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_Diff _Count
Definition: algorithm:1941
#define INT_MAX
Definition: limits.h:40
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
bool __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::ipfx ( bool  _Noskip = false)
inline
168  { // test stream state and skip whitespace as needed (retained)
169  return (_Ipfx(_Noskip));
170  }
bool __CLR_OR_THIS_CALL _Ipfx(bool _Noskip=false)
Definition: istream:134
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::isfx ( )
inline
173  { // perform any wrapup (retained)
174  }
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
const _Ty & _Right
Definition: algorithm:4087
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
199  { // call basic_istream manipulator
200  _DEBUG_POINTER(_Pfn);
201  return ((*_Pfn)(*this));
202  }
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Myios __cdecl *_Pfn)(_Myios &)
inline
205  { // call basic_ios manipulator
206  _DEBUG_POINTER(_Pfn);
207  (*_Pfn)(*(_Myios *)this);
208  return (*this);
209  }
basic_ios< _Elem, _Traits > _Myios
Definition: istream:26
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( ios_base __cdecl *_Pfn)(ios_base &)
inline
212  { // call ios_base manipulator
213  _DEBUG_POINTER(_Pfn);
214  (*_Pfn)(*(ios_base *)this);
215  return (*this);
216  }
Definition: xiosbase:199
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Bool &  _Val)
inline
219  { // extract a boolean
220  ios_base::iostate _State = ios_base::goodbit;
221  const sentry _Ok(*this);
222 
223  if (_Ok)
224  { // state okay, use facet to extract
225  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
226 
228  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
229  *this, _State, _Val);
231  }
232 
233  _Myios::setstate(_State);
234  return (*this);
235  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( short &  _Val)
inline
238  { // extract a short
239  ios_base::iostate _State = ios_base::goodbit;
240  const sentry _Ok(*this);
241 
242  if (_Ok)
243  { // state okay, use facet to extract
244  long _Tmp = 0;
245  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
246 
248  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
249  *this, _State, _Tmp);
251 
252  if (_State & ios_base::failbit
253  || _Tmp < SHRT_MIN || SHRT_MAX < _Tmp)
254  _State |= ios_base::failbit;
255  else
256  _Val = (short)_Tmp;
257  }
258 
259  _Myios::setstate(_State);
260  return (*this);
261  }
static const _Iostate failbit
Definition: xiosbase:89
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
#define SHRT_MIN
Definition: limits.h:36
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
#define SHRT_MAX
Definition: limits.h:37
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned short &  _Val)
inline
273  { // extract an unsigned short
274  ios_base::iostate _State = ios_base::goodbit;
275  const sentry _Ok(*this);
276 
277  if (_Ok)
278  { // state okay, use facet to extract
279  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
280 
282  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
283  *this, _State, _Val);
285  }
286 
287  _Myios::setstate(_State);
288  return (*this);
289  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( int _Val)
inline
292  { // extract an int
293  ios_base::iostate _State = ios_base::goodbit;
294  const sentry _Ok(*this);
295 
296  if (_Ok)
297  { // state okay, use facet to extract
298  long _Tmp = 0;
299  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
300 
302  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
303  *this, _State, _Tmp);
305 
306  if (_State & ios_base::failbit
307  || _Tmp < INT_MIN || INT_MAX < _Tmp)
308  _State |= ios_base::failbit;
309  else
310  _Val = _Tmp;
311  }
312 
313  _Myios::setstate(_State);
314  return (*this);
315  }
static const _Iostate failbit
Definition: xiosbase:89
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
#define INT_MIN
Definition: limits.h:39
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
#define INT_MAX
Definition: limits.h:40
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned int _Val)
inline
318  { // extract an unsigned int
319  ios_base::iostate _State = ios_base::goodbit;
320  const sentry _Ok(*this);
321  if (_Ok)
322  { // state okay, use facet to extract
323  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
324 
326  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
327  *this, _State, _Val);
329  }
330 
331  _Myios::setstate(_State);
332  return (*this);
333  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( long &  _Val)
inline
336  { // extract a long
337  ios_base::iostate _State = ios_base::goodbit;
338  const sentry _Ok(*this);
339 
340  if (_Ok)
341  { // state okay, use facet to extract
342  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
344  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
345  *this, _State, _Val);
347  }
348 
349  _Myios::setstate(_State);
350  return (*this);
351  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( unsigned long &  _Val)
inline
354  { // extract an unsigned long
355  ios_base::iostate _State = ios_base::goodbit;
356  const sentry _Ok(*this);
357 
358  if (_Ok)
359  { // state okay, use facet to extract
360  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
361 
363  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
364  *this, _State, _Val);
366  }
367 
368  _Myios::setstate(_State);
369  return (*this);
370  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( float &  _Val)
inline
412  { // extract a float
413  ios_base::iostate _State = ios_base::goodbit;
414  const sentry _Ok(*this);
415 
416  if (_Ok)
417  { // state okay, use facet to extract
418  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
419 
421  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
422  *this, _State, _Val);
424  }
425 
426  _Myios::setstate(_State);
427  return (*this);
428  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( double &  _Val)
inline
431  { // extract a double
432  ios_base::iostate _State = ios_base::goodbit;
433  const sentry _Ok(*this);
434  if (_Ok)
435  { // state okay, use facet to extract
436  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
437 
439  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
440  *this, _State, _Val);
442  }
443 
444  _Myios::setstate(_State);
445  return (*this);
446  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( long double &  _Val)
inline
449  { // extract a long double
450  ios_base::iostate _State = ios_base::goodbit;
451  const sentry _Ok(*this);
452 
453  if (_Ok)
454  { // state okay, use facet to extract
455  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
457  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
458  *this, _State, _Val);
460  }
461 
462  _Myios::setstate(_State);
463  return (*this);
464  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( void *&  _Val)
inline
467  { // extract a void pointer
468  ios_base::iostate _State = ios_base::goodbit;
469  const sentry _Ok(*this);
470 
471  if (_Ok)
472  { // state okay, use facet to extract
473  const _Nget& _Nget_fac = _USE(this->getloc(), _Nget);
474 
476  _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0),
477  *this, _State, _Val);
479  }
480 
481  _Myios::setstate(_State);
482  return (*this);
483  }
#define _USE(loc, fac)
Definition: xlocale:555
num_get< _Elem, _Iter > _Nget
Definition: istream:30
#define _TRY_IO_BEGIN
Definition: ostream:30
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
istreambuf_iterator< _Elem, _Traits > _Iter
Definition: istream:28
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::operator>> ( _Mysb _Strbuf)
inline
486  { // extract until end-of-file into a stream buffer
487  ios_base::iostate _State = ios_base::goodbit;
488  bool _Copied = false;
489  const sentry _Ok(*this);
490 
491  if (_Ok && _Strbuf != 0)
492  { // state okay, extract characters
494  int_type _Meta = _Myios::rdbuf()->sgetc();
495 
496  for (; ; _Meta = _Myios::rdbuf()->snextc())
497  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
498  { // end of file, quit
499  _State |= ios_base::eofbit;
500  break;
501  }
502  else
503  { // got a character, insert it into buffer
504  _TRY_BEGIN
505  if (_Traits::eq_int_type(_Traits::eof(),
506  _Strbuf->sputc(_Traits::to_char_type(_Meta))))
507  break;
508  _CATCH_ALL
509  break;
510  _CATCH_END
511  _Copied = true;
512  }
514  }
515 
516  _Myios::setstate(!_Copied ? _State | ios_base::failbit : _State);
517  return (*this);
518  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
static const _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:86
_Traits::int_type int_type
Definition: istream:84
int_type __CLR_OR_THIS_CALL snextc()
Definition: streambuf:162
#define _CATCH_ALL
Definition: xstddef:62
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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  }
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
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:86
_Traits::int_type int_type
Definition: istream:84
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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:306
#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:86
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::read ( _Elem *  _Str,
streamsize  _Count 
)
inline
726  { // read up to _Count characters into buffer
727  _DEBUG_POINTER(_Str);
728  ios_base::iostate _State = ios_base::goodbit;
729  _Chcount = 0;
730  const sentry _Ok(*this, true);
731 
732  if (_Ok)
733  { // state okay, use facet to extract
735  const streamsize _Num = _Myios::rdbuf()->sgetn(_Str, _Count);
736  _Chcount += _Num;
737  if (_Num != _Count)
738  _State |= ios_base::eofbit | ios_base::failbit; // short read
740  }
741 
742  _Myios::setstate(_State);
743  return (*this);
744  }
_Longlong streamsize
Definition: iosfwd:22
static const _Iostate failbit
Definition: xiosbase:89
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
#define _DEBUG_POINTER(first)
Definition: xutility:465
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_Diff _Count
Definition: algorithm:1941
streamsize __CLR_OR_THIS_CALL sgetn(_Elem *_Ptr, streamsize _Count)
Definition: streambuf:156
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_istream< _Elem, _Traits >::readsome ( _Elem *  _Str,
streamsize  _Count 
)
inline
748  { // read up to _Count characters into buffer, without blocking
749  _DEBUG_POINTER(_Str);
750  ios_base::iostate _State = ios_base::goodbit;
751  _Chcount = 0;
752  const sentry _Ok(*this, true);
753  streamsize _Num;
754 
755  if (!_Ok)
756  _State |= ios_base::failbit; // no buffer, fail
757  else if ((_Num = _Myios::rdbuf()->in_avail()) < 0)
758  _State |= ios_base::eofbit; // no characters available
759  else if (0 < _Num)
760  read(_Str, _Num < _Count ? _Num : _Count); // read available
761 
762  _Myios::setstate(_State);
763  return (gcount());
764  }
_Longlong streamsize
Definition: iosfwd:22
static const _Iostate failbit
Definition: xiosbase:89
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
streamsize __CLR_OR_THIS_CALL gcount() const
Definition: istream:830
_Myt &__CLR_OR_THIS_CALL read(_Elem *_Str, streamsize _Count)
Definition: istream:725
#define _DEBUG_POINTER(first)
Definition: xutility:465
static const _Iostate goodbit
Definition: xiosbase:87
_Diff _Count
Definition: algorithm:1941
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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:306
static const _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:86
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
static const _Iostate goodbit
Definition: xiosbase:87
_Traits::off_type off_type
Definition: istream:86
static const _Openmode in
Definition: xiosbase:97
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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:306
static const _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:86
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
static const _Iostate goodbit
Definition: xiosbase:87
_Traits::off_type off_type
Definition: istream:86
static const _Openmode in
Definition: xiosbase:97
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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:151
streamsize _Chcount
Definition: istream:890
const _Ty & _Right
Definition: algorithm:4087
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:86
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
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 const _Seekdir cur
Definition: xiosbase:111
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
_Traits::pos_type pos_type
Definition: istream:85
static const _Openmode in
Definition: xiosbase:97
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:306
#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:86
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
streamsize _Chcount
Definition: istream:890
static const _Iostate eofbit
Definition: xiosbase:88
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54

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: