ReactOS 0.4.15-dev-8145-ga541a46
istream_iterator< _Tp, _CharT, _Traits, _Dist > Class Template Reference

#include <_stream_iterator.h>

Inheritance diagram for istream_iterator< _Tp, _CharT, _Traits, _Dist >:
Collaboration diagram for istream_iterator< _Tp, _CharT, _Traits, _Dist >:

Public Types

typedef _CharT char_type
 
typedef _Traits traits_type
 
typedef basic_istream< _CharT, _Traits > istream_type
 
typedef input_iterator_tag iterator_category
 
typedef _Tp value_type
 
typedef _Dist difference_type
 
typedef const _Tp * pointer
 
typedef const _Tp & reference
 
- Public Types inherited from iterator< _Category, _Tp,,, >
typedef _Category iterator_category
 
typedef _Tp value_type
 
typedef _Distance difference_type
 
typedef _Pointer pointer
 
typedef _Reference reference
 

Public Member Functions

 istream_iterator ()
 
 istream_iterator (istream_type &__s)
 
reference operator* () const
 
_STLP_DEFINE_ARROW_OPERATOR _Selfoperator++ ()
 
_Self operator++ (int)
 
bool _M_equal (const _Self &__x) const
 

Private Types

typedef istream_iterator< __ISI_TMPL_ARGUMENTS_Self
 

Private Member Functions

void _M_read () const
 

Private Attributes

istream_type_M_stream
 
_Tp _M_value
 
bool _M_ok
 
bool _M_read_done
 

Detailed Description

template<class _Tp, class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
class istream_iterator< _Tp, _CharT, _Traits, _Dist >

Definition at line 70 of file _stream_iterator.h.

Member Typedef Documentation

◆ _Self

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef istream_iterator< __ISI_TMPL_ARGUMENTS > istream_iterator< _Tp, _CharT, _Traits, _Dist >::_Self
private

Definition at line 96 of file _stream_iterator.h.

◆ char_type

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef _CharT istream_iterator< _Tp, _CharT, _Traits, _Dist >::char_type

Definition at line 98 of file _stream_iterator.h.

◆ difference_type

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef _Dist istream_iterator< _Tp, _CharT, _Traits, _Dist >::difference_type

Definition at line 104 of file _stream_iterator.h.

◆ istream_type

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef basic_istream<_CharT, _Traits> istream_iterator< _Tp, _CharT, _Traits, _Dist >::istream_type

Definition at line 100 of file _stream_iterator.h.

◆ iterator_category

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef input_iterator_tag istream_iterator< _Tp, _CharT, _Traits, _Dist >::iterator_category

Definition at line 102 of file _stream_iterator.h.

◆ pointer

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef const _Tp* istream_iterator< _Tp, _CharT, _Traits, _Dist >::pointer

Definition at line 105 of file _stream_iterator.h.

◆ reference

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef const _Tp& istream_iterator< _Tp, _CharT, _Traits, _Dist >::reference

Definition at line 106 of file _stream_iterator.h.

◆ traits_type

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef _Traits istream_iterator< _Tp, _CharT, _Traits, _Dist >::traits_type

Definition at line 99 of file _stream_iterator.h.

◆ value_type

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
typedef _Tp istream_iterator< _Tp, _CharT, _Traits, _Dist >::value_type

Definition at line 103 of file _stream_iterator.h.

Constructor & Destructor Documentation

◆ istream_iterator() [1/2]

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
istream_iterator< _Tp, _CharT, _Traits, _Dist >::istream_iterator ( )
inline

Definition at line 108 of file _stream_iterator.h.

108: _M_stream(0), _M_ok(false), _M_read_done(true) {}
istream_type * _M_stream

◆ istream_iterator() [2/2]

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
istream_iterator< _Tp, _CharT, _Traits, _Dist >::istream_iterator ( istream_type __s)
inline

Definition at line 109 of file _stream_iterator.h.

109: _M_stream(&__s), _M_ok(false), _M_read_done(false) {}

Member Function Documentation

◆ _M_equal()

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
bool istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_equal ( const _Self __x) const
inline

Definition at line 130 of file _stream_iterator.h.

130 {
131 if (!_M_read_done) {
132 _M_read();
133 }
134 if (!__x._M_read_done) {
135 __x._M_read();
136 }
137 return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);
138 }
void _M_read() const

Referenced by operator==().

◆ _M_read()

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
void istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_read ( ) const
inlineprivate

◆ operator*()

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
reference istream_iterator< _Tp, _CharT, _Traits, _Dist >::operator* ( ) const
inline

Definition at line 111 of file _stream_iterator.h.

111 {
112 if (!_M_read_done) {
113 _M_read();
114 }
115 return _M_value;
116 }

◆ operator++() [1/2]

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
_STLP_DEFINE_ARROW_OPERATOR _Self & istream_iterator< _Tp, _CharT, _Traits, _Dist >::operator++ ( )
inline

Definition at line 120 of file _stream_iterator.h.

120 {
121 _M_read();
122 return *this;
123 }

◆ operator++() [2/2]

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
_Self istream_iterator< _Tp, _CharT, _Traits, _Dist >::operator++ ( int  )
inline

Definition at line 124 of file _stream_iterator.h.

124 {
125 _Self __tmp = *this;
126 _M_read();
127 return __tmp;
128 }

Member Data Documentation

◆ _M_ok

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
bool istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_ok
mutableprivate

◆ _M_read_done

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
bool istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_read_done
mutableprivate

◆ _M_stream

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
istream_type* istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_stream
private

◆ _M_value

template<class _Tp , class _CharT = char, class _Traits = char_traits<_CharT>, class _Dist = ptrdiff_t>
_Tp istream_iterator< _Tp, _CharT, _Traits, _Dist >::_M_value
mutableprivate

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