STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
ostreambuf_iterator< _Elem, _Traits > Class Template Reference
Inheritance diagram for ostreambuf_iterator< _Elem, _Traits >:
iterator< _Category, _Ty, _Diff, _Pointer, _Reference >

Public Types

typedef _Elem char_type
 
typedef _Traits traits_type
 
typedef basic_streambuf< _Elem, _Traits > streambuf_type
 
typedef basic_ostream< _Elem, _Traits > ostream_type
 
- Public Types inherited from iterator< _Category, _Ty, _Diff, _Pointer, _Reference >
typedef _Category iterator_category
 
typedef _Ty value_type
 
typedef _Diff difference_type
 
typedef _Pointer pointer
 
typedef _Reference reference
 

Public Member Functions

 ostreambuf_iterator (streambuf_type *_Sb) _THROW0()
 
 ostreambuf_iterator (ostream_type &_Ostr) _THROW0()
 
_Mytoperator= (_Elem _Right)
 
_Mytoperator* ()
 
_Mytoperator++ ()
 
_Mytoperator++ (int)
 
bool failed () const _THROW0()
 

Private Types

typedef ostreambuf_iterator< _Elem, _Traits > _Myt
 

Private Attributes

bool _Failed
 
streambuf_type_Strbuf
 

Member Typedef Documentation

template<class _Elem , class _Traits >
typedef ostreambuf_iterator<_Elem, _Traits> ostreambuf_iterator< _Elem, _Traits >::_Myt
private
template<class _Elem , class _Traits >
typedef _Elem ostreambuf_iterator< _Elem, _Traits >::char_type
template<class _Elem , class _Traits >
typedef basic_ostream<_Elem, _Traits> ostreambuf_iterator< _Elem, _Traits >::ostream_type
template<class _Elem , class _Traits >
typedef basic_streambuf<_Elem, _Traits> ostreambuf_iterator< _Elem, _Traits >::streambuf_type
template<class _Elem , class _Traits >
typedef _Traits ostreambuf_iterator< _Elem, _Traits >::traits_type

Constructor & Destructor Documentation

template<class _Elem , class _Traits >
ostreambuf_iterator< _Elem, _Traits >::ostreambuf_iterator ( streambuf_type _Sb)
inline
627  : _Failed(false), _Strbuf(_Sb)
628  { // construct from stream buffer _Sb
629  }
streambuf_type * _Strbuf
Definition: streambuf:667
bool _Failed
Definition: streambuf:666
template<class _Elem , class _Traits >
ostreambuf_iterator< _Elem, _Traits >::ostreambuf_iterator ( ostream_type _Ostr)
inline
632  : _Failed(false), _Strbuf(_Ostr.rdbuf())
633  { // construct from stream buffer in _Ostr
634  }
streambuf_type * _Strbuf
Definition: streambuf:667
bool _Failed
Definition: streambuf:666

Member Function Documentation

template<class _Elem , class _Traits >
bool ostreambuf_iterator< _Elem, _Traits >::failed ( ) const
inline
661  { // return true if any stores failed
662  return (_Failed);
663  }
bool _Failed
Definition: streambuf:666
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator* ( )
inline
646  { // pretend to get designated element
647  return (*this);
648  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator++ ( )
inline
651  { // pretend to preincrement
652  return (*this);
653  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator++ ( int  )
inline
656  { // pretend to postincrement
657  return (*this);
658  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator= ( _Elem  _Right)
inline
637  { // store element and increment
638  if (_Strbuf == 0
639  || traits_type::eq_int_type(_Traits::eof(),
640  _Strbuf->sputc(_Right)))
641  _Failed = true;
642  return (*this);
643  }
streambuf_type * _Strbuf
Definition: streambuf:667
bool _Failed
Definition: streambuf:666
int_type __CLR_OR_THIS_CALL sputc(_Elem _Ch)
Definition: streambuf:198
constexpr const _Ty &() _Right
Definition: algorithm:3591

Member Data Documentation

template<class _Elem , class _Traits >
bool ostreambuf_iterator< _Elem, _Traits >::_Failed
private
template<class _Elem , class _Traits >
streambuf_type* ostreambuf_iterator< _Elem, _Traits >::_Strbuf
private

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