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

Public Types

typedef _Elem char_type
 
typedef _Traits traits_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

 ostream_iterator (ostream_type &_Ostr, const _Elem *_Delim=0)
 
ostream_iterator< _Ty, _Elem, _Traits > & operator= (const _Ty &_Val)
 
ostream_iterator< _Ty, _Elem, _Traits > & operator* ()
 
ostream_iterator< _Ty, _Elem, _Traits > & operator++ ()
 
ostream_iterator< _Ty, _Elem, _Traits > & operator++ (int)
 

Protected Attributes

const _Elem * _Mydelim
 
ostream_type_Myostr
 

Member Typedef Documentation

template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
typedef _Elem ostream_iterator< _Ty, _Elem, _Traits >::char_type
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
typedef basic_ostream<_Elem, _Traits> ostream_iterator< _Ty, _Elem, _Traits >::ostream_type
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
typedef _Traits ostream_iterator< _Ty, _Elem, _Traits >::traits_type

Constructor & Destructor Documentation

template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_iterator< _Ty, _Elem, _Traits >::ostream_iterator ( ostream_type _Ostr,
const _Elem *  _Delim = 0 
)
inline
311  : _Myostr(&_Ostr), _Mydelim(_Delim)
312  { // construct from output stream and delimiter
313  }
const _Elem * _Mydelim
Definition: iterator:339
_Check_return_ _CRTIMP _In_z_ const unsigned char * _Delim
Definition: mbstring.h:214
ostream_type * _Myostr
Definition: iterator:340

Member Function Documentation

template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_iterator<_Ty, _Elem, _Traits>& ostream_iterator< _Ty, _Elem, _Traits >::operator* ( )
inline
324  { // pretend to return designated value
325  return (*this);
326  }
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_iterator<_Ty, _Elem, _Traits>& ostream_iterator< _Ty, _Elem, _Traits >::operator++ ( )
inline
329  { // pretend to preincrement
330  return (*this);
331  }
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_iterator<_Ty, _Elem, _Traits>& ostream_iterator< _Ty, _Elem, _Traits >::operator++ ( int  )
inline
334  { // pretend to postincrement
335  return (*this);
336  }
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_iterator<_Ty, _Elem, _Traits>& ostream_iterator< _Ty, _Elem, _Traits >::operator= ( const _Ty &  _Val)
inline
316  { // insert value into output stream, followed by delimiter
317  *_Myostr << _Val;
318  if (_Mydelim != 0)
319  *_Myostr << _Mydelim;
320  return (*this);
321  }
const _Elem * _Mydelim
Definition: iterator:339
ostream_type * _Myostr
Definition: iterator:340
_FwdIt const _Ty _Val
Definition: algorithm:1938

Member Data Documentation

template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
const _Elem* ostream_iterator< _Ty, _Elem, _Traits >::_Mydelim
protected
template<class _Ty , class _Elem = char, class _Traits = char_traits<_Elem>>
ostream_type* ostream_iterator< _Ty, _Elem, _Traits >::_Myostr
protected

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