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 _Diff distance_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
621  : _Failed(false), _Strbuf(_Sb)
622  { // construct from stream buffer _Sb
623  }
streambuf_type * _Strbuf
Definition: streambuf:661
bool _Failed
Definition: streambuf:660
template<class _Elem , class _Traits >
ostreambuf_iterator< _Elem, _Traits >::ostreambuf_iterator ( ostream_type _Ostr)
inline
626  : _Failed(false), _Strbuf(_Ostr.rdbuf())
627  { // construct from stream buffer in _Ostr
628  }
streambuf_type * _Strbuf
Definition: streambuf:661
bool _Failed
Definition: streambuf:660

Member Function Documentation

template<class _Elem , class _Traits >
bool ostreambuf_iterator< _Elem, _Traits >::failed ( ) const
inline
655  { // return true if any stores failed
656  return (_Failed);
657  }
bool _Failed
Definition: streambuf:660
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator* ( )
inline
640  { // pretend to get designated element
641  return (*this);
642  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator++ ( )
inline
645  { // pretend to preincrement
646  return (*this);
647  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator++ ( int  )
inline
650  { // pretend to postincrement
651  return (*this);
652  }
template<class _Elem , class _Traits >
_Myt& ostreambuf_iterator< _Elem, _Traits >::operator= ( _Elem  _Right)
inline
631  { // store element and increment
632  if (_Strbuf == 0
633  || traits_type::eq_int_type(_Traits::eof(),
634  _Strbuf->sputc(_Right)))
635  _Failed = true;
636  return (*this);
637  }
streambuf_type * _Strbuf
Definition: streambuf:661
bool _Failed
Definition: streambuf:660
int_type __CLR_OR_THIS_CALL sputc(_Elem _Ch)
Definition: streambuf:192
const _Ty & _Right
Definition: algorithm:4087

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: