std::istreambuf_iterator< _CharT, _Traits > Class Template Reference

Provides input iterator semantics for streambufs. More...

#include <streambuf_iterator.h>

Inheritance diagram for std::istreambuf_iterator< _CharT, _Traits >:

std::iterator< _Category, _Tp, _Distance, _Pointer, _Reference > List of all members.

Public Types

typedef _CharT char_type
 Public typedefs.

typedef _Traits traits_type
typedef _Traits::int_type int_type
typedef basic_streambuf< _CharT,
_Traits > 
streambuf_type
typedef basic_istream< _CharT,
_Traits > 
istream_type

Public Member Functions

 istreambuf_iterator () throw ()
 Construct end of input stream iterator.

 istreambuf_iterator (istream_type &__s) throw ()
 Construct start of input stream iterator.

 istreambuf_iterator (streambuf_type *__s) throw ()
 Construct start of streambuf iterator.

char_type operator * () const
istreambuf_iteratoroperator++ ()
 Advance the iterator. Calls streambuf.sbumpc().

istreambuf_iterator operator++ (int)
 Advance the iterator. Calls streambuf.sbumpc().

bool equal (const istreambuf_iterator &__b) const
 Return true both iterators are end or both are not end.


Private Member Functions

int_type _M_get () const
bool _M_at_eof () const

Private Attributes

streambuf_type_M_sbuf
int_type _M_c

Detailed Description

template<typename _CharT, typename _Traits>
class std::istreambuf_iterator< _CharT, _Traits >

Provides input iterator semantics for streambufs.

Definition at line 51 of file streambuf_iterator.h.


Member Typedef Documentation

template<typename _CharT, typename _Traits>
typedef _CharT std::istreambuf_iterator< _CharT, _Traits >::char_type
 

Public typedefs.

Definition at line 59 of file streambuf_iterator.h.

template<typename _CharT, typename _Traits>
typedef _Traits::int_type std::istreambuf_iterator< _CharT, _Traits >::int_type
 

Definition at line 61 of file streambuf_iterator.h.

template<typename _CharT, typename _Traits>
typedef basic_istream<_CharT, _Traits> std::istreambuf_iterator< _CharT, _Traits >::istream_type
 

Definition at line 63 of file streambuf_iterator.h.

template<typename _CharT, typename _Traits>
typedef basic_streambuf<_CharT, _Traits> std::istreambuf_iterator< _CharT, _Traits >::streambuf_type
 

Definition at line 62 of file streambuf_iterator.h.

Referenced by std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator().

template<typename _CharT, typename _Traits>
typedef _Traits std::istreambuf_iterator< _CharT, _Traits >::traits_type
 

Definition at line 60 of file streambuf_iterator.h.


Constructor & Destructor Documentation

template<typename _CharT, typename _Traits>
std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator  )  throw () [inline]
 

Construct end of input stream iterator.

Definition at line 79 of file streambuf_iterator.h.

template<typename _CharT, typename _Traits>
std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator istream_type __s  )  throw () [inline]
 

Construct start of input stream iterator.

Definition at line 83 of file streambuf_iterator.h.

template<typename _CharT, typename _Traits>
std::istreambuf_iterator< _CharT, _Traits >::istreambuf_iterator streambuf_type __s  )  throw () [inline]
 

Construct start of streambuf iterator.

Definition at line 87 of file streambuf_iterator.h.

References std::istreambuf_iterator< _CharT, _Traits >::streambuf_type.


Member Function Documentation

template<typename _CharT, typename _Traits>
bool std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof  )  const [inline, private]
 

Definition at line 170 of file streambuf_iterator.h.

References std::istreambuf_iterator< _CharT, _Traits >::_M_get().

Referenced by std::istreambuf_iterator< _CharT, _Traits >::equal(), std::istreambuf_iterator< _CharT, _Traits >::operator *(), and std::istreambuf_iterator< _CharT, _Traits >::operator++().

template<typename _CharT, typename _Traits>
int_type std::istreambuf_iterator< _CharT, _Traits >::_M_get  )  const [inline, private]
 

Definition at line 154 of file streambuf_iterator.h.

References std::istreambuf_iterator< _CharT, _Traits >::_M_sbuf, and std::basic_streambuf< _CharT, _Traits >::sgetc().

Referenced by std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof(), and std::istreambuf_iterator< _CharT, _Traits >::operator *().

template<typename _CharT, typename _Traits>
bool std::istreambuf_iterator< _CharT, _Traits >::equal const istreambuf_iterator< _CharT, _Traits > &  __b  )  const [inline]
 

Return true both iterators are end or both are not end.

Definition at line 145 of file streambuf_iterator.h.

References std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof().

Referenced by std::operator!=(), and std::operator==().

template<typename _CharT, typename _Traits>
char_type std::istreambuf_iterator< _CharT, _Traits >::operator *  )  const [inline]
 

Return the current character pointed to by iterator. This returns streambuf.sgetc(). It cannot be assigned. NB: The result of operator*() on an end of stream is undefined.

Definition at line 94 of file streambuf_iterator.h.

References __glibcxx_requires_cond, std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof(), and std::istreambuf_iterator< _CharT, _Traits >::_M_get().

template<typename _CharT, typename _Traits>
istreambuf_iterator std::istreambuf_iterator< _CharT, _Traits >::operator++ int   )  [inline]
 

Advance the iterator. Calls streambuf.sbumpc().

Definition at line 123 of file streambuf_iterator.h.

References __glibcxx_requires_cond, std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof(), std::istreambuf_iterator< _CharT, _Traits >::_M_c, std::istreambuf_iterator< _CharT, _Traits >::_M_sbuf, and std::basic_streambuf< _CharT, _Traits >::sbumpc().

template<typename _CharT, typename _Traits>
istreambuf_iterator& std::istreambuf_iterator< _CharT, _Traits >::operator++  )  [inline]
 

Advance the iterator. Calls streambuf.sbumpc().

Definition at line 108 of file streambuf_iterator.h.

References __glibcxx_requires_cond, std::istreambuf_iterator< _CharT, _Traits >::_M_at_eof(), std::istreambuf_iterator< _CharT, _Traits >::_M_sbuf, and std::basic_streambuf< _CharT, _Traits >::sbumpc().


Member Data Documentation

template<typename _CharT, typename _Traits>
int_type std::istreambuf_iterator< _CharT, _Traits >::_M_c [private]
 

Definition at line 75 of file streambuf_iterator.h.

Referenced by std::istreambuf_iterator< _CharT, _Traits >::operator++().

template<typename _CharT, typename _Traits>
streambuf_type* std::istreambuf_iterator< _CharT, _Traits >::_M_sbuf [mutable, private]
 

Definition at line 74 of file streambuf_iterator.h.

Referenced by std::istreambuf_iterator< _CharT, _Traits >::_M_get(), and std::istreambuf_iterator< _CharT, _Traits >::operator++().


The documentation for this class was generated from the following file:
Generated on Tue Jan 30 17:32:16 2007 for GNU C++ STL by doxygen 1.3.6