STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
istream_iterator< _Ty, _Elem, _Traits, _Diff > Class Template Reference
Inheritance diagram for istream_iterator< _Ty, _Elem, _Traits, _Diff >:
iterator< input_iterator_tag, _Ty, _Diff, const _Ty *, const _Ty & >

Public Types

using char_type = _Elem
 
using traits_type = _Traits
 
using istream_type = basic_istream< _Elem, _Traits >
 
using pointer = const _Ty *
 
- Public Types inherited from iterator< input_iterator_tag, _Ty, _Diff, const _Ty *, const _Ty & >
typedef input_iterator_tag iterator_category
 
typedef _Ty value_type
 
typedef _Diff difference_type
 
typedef const _Ty * pointer
 
typedef const _Ty & reference
 

Public Member Functions

constexpr istream_iterator ()
 
 istream_iterator (istream_type &_Istr)
 
const _Ty & operator* () const
 
const _Ty * operator-> () const
 
istream_iteratoroperator++ ()
 
istream_iterator operator++ (int)
 
bool _Equal (const istream_iterator &_Right) const
 

Protected Member Functions

void _Getval ()
 

Protected Attributes

istream_type_Myistr
 
_Ty _Myval
 

Member Typedef Documentation

template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
using istream_iterator< _Ty, _Elem, _Traits, _Diff >::char_type = _Elem
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
using istream_iterator< _Ty, _Elem, _Traits, _Diff >::istream_type = basic_istream<_Elem, _Traits>
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
using istream_iterator< _Ty, _Elem, _Traits, _Diff >::pointer = const _Ty *
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
using istream_iterator< _Ty, _Elem, _Traits, _Diff >::traits_type = _Traits

Constructor & Destructor Documentation

template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
constexpr istream_iterator< _Ty, _Elem, _Traits, _Diff >::istream_iterator ( )
inline
154  : _Myistr(0), _Myval()
155  { // construct singular iterator
156  }
istream_type * _Myistr
Definition: iterator:201
_Ty _Myval
Definition: iterator:202
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
istream_iterator< _Ty, _Elem, _Traits, _Diff >::istream_iterator ( istream_type _Istr)
inline
159  : _Myistr(_STD addressof(_Istr))
160  { // construct with input stream
161  _Getval();
162  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
istream_type * _Myistr
Definition: iterator:201
void _Getval()
Definition: iterator:193

Member Function Documentation

template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
bool istream_iterator< _Ty, _Elem, _Traits, _Diff >::_Equal ( const istream_iterator< _Ty, _Elem, _Traits, _Diff > &  _Right) const
inline
188  { // test for iterator equality
189  return (_Myistr == _Right._Myistr);
190  }
istream_type * _Myistr
Definition: iterator:201
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
void istream_iterator< _Ty, _Elem, _Traits, _Diff >::_Getval ( )
inlineprotected
194  { // get a _Ty value if possible
195  if (_Myistr != 0 && !(*_Myistr >> _Myval))
196  {
197  _Myistr = 0;
198  }
199  }
istream_type * _Myistr
Definition: iterator:201
_Ty _Myval
Definition: iterator:202
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
const _Ty& istream_iterator< _Ty, _Elem, _Traits, _Diff >::operator* ( ) const
inline
165  { // return designated value
166  return (_Myval);
167  }
_Ty _Myval
Definition: iterator:202
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
istream_iterator& istream_iterator< _Ty, _Elem, _Traits, _Diff >::operator++ ( )
inline
175  { // preincrement
176  _Getval();
177  return (*this);
178  }
void _Getval()
Definition: iterator:193
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
istream_iterator istream_iterator< _Ty, _Elem, _Traits, _Diff >::operator++ ( int  )
inline
181  { // postincrement
182  istream_iterator _Tmp = *this;
183  ++*this;
184  return (_Tmp);
185  }
Definition: iterator:143
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
const _Ty* istream_iterator< _Ty, _Elem, _Traits, _Diff >::operator-> ( ) const
inline
170  { // return pointer to class object
171  return (_STD addressof(_Myval));
172  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_Ty _Myval
Definition: iterator:202

Member Data Documentation

template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
istream_type* istream_iterator< _Ty, _Elem, _Traits, _Diff >::_Myistr
protected
template<class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>, class _Diff = ptrdiff_t>
_Ty istream_iterator< _Ty, _Elem, _Traits, _Diff >::_Myval
protected

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