#include <stream_iterator.h>
Inheritance diagram for std::ostream_iterator< Type, CharT, Traits >:
Public Types | |
typedef Category | iterator_category |
One of the tag types. | |
typedef Type | value_type |
The type "pointed to" by the iterator. | |
typedef Distance | difference_type |
Distance between iterators is represented as this type. | |
typedef Pointer | pointer |
This type represents a pointer-to-value_type. | |
typedef Reference | reference |
This type represents a reference-to-value_type. | |
typedef CharT | char_type |
Public typedef. | |
typedef Traits | traits_type |
Public typedef. | |
typedef basic_ostream< CharT, Traits > | ostream_type |
Public typedef. | |
Public Member Functions | |
ostream_iterator (ostream_type &s) | |
Construct from an ostream. | |
ostream_iterator (ostream_type &s, const CharT *c) | |
ostream_iterator (const ostream_iterator &__obj) | |
Copy constructor. | |
ostream_iterator & | operator= (const Type &value) |
constructed with delimiter string, writes delimiter to ostream. | |
ostream_iterator & | operator * () |
ostream_iterator & | operator++ () |
ostream_iterator & | operator++ (int) |
Private Attributes | |
ostream_type * | M_stream |
const CharT * | M_string |
This class provides an iterator to write to an ostream. The type Tp is the only type written by this iterator and there must be an operator<<(Tp) defined.
Tp | The type to write to the ostream. | |
CharT | The ostream char_type. | |
Traits | The ostream char_traits. |
Definition at line 152 of file stream_iterator.h.
typedef CharT std::ostream_iterator< Type, CharT, Traits >::char_type |
typedef Distance std::iterator< Category, Type, Distance, Pointer, Reference >::difference_type [inherited] |
Distance between iterators is represented as this type.
Reimplemented in std::reverse_iterator< Iterator >.
Definition at line 113 of file stl_iterator_base_types.h.
typedef Category std::iterator< Category, Type, Distance, Pointer, Reference >::iterator_category [inherited] |
typedef basic_ostream<CharT, Traits> std::ostream_iterator< Type, CharT, Traits >::ostream_type |
typedef Pointer std::iterator< Category, Type, Distance, Pointer, Reference >::pointer [inherited] |
This type represents a pointer-to-value_type.
Reimplemented in std::Bit_iterator, std::Bit_const_iterator, std::reverse_iterator< Iterator >, __gnu_cxx::Rope_const_iterator< CharT, Alloc >, and __gnu_cxx::Rope_iterator< CharT, Alloc >.
Definition at line 115 of file stl_iterator_base_types.h.
typedef Reference std::iterator< Category, Type, Distance, Pointer, Reference >::reference [inherited] |
This type represents a reference-to-value_type.
Reimplemented in std::Bit_iterator, std::Bit_const_iterator, std::reverse_iterator< Iterator >, __gnu_cxx::Rope_const_iterator< CharT, Alloc >, and __gnu_cxx::Rope_iterator< CharT, Alloc >.
Definition at line 117 of file stl_iterator_base_types.h.
typedef Traits std::ostream_iterator< Type, CharT, Traits >::traits_type |
typedef Type std::iterator< Category, Type, Distance, Pointer, Reference >::value_type [inherited] |
The type "pointed to" by the iterator.
Reimplemented in __gnu_cxx::sequence_buffer< Sequence, Buf_sz >.
Definition at line 111 of file stl_iterator_base_types.h.
std::ostream_iterator< Type, CharT, Traits >::ostream_iterator | ( | ostream_type & | s | ) | [inline] |
std::ostream_iterator< Type, CharT, Traits >::ostream_iterator | ( | ostream_type & | s, | |
const CharT * | c | |||
) | [inline] |
Construct from an ostream.
The delimiter string c is written to the stream after every Tp written to the stream. The delimiter is not copied, and thus must not be destroyed while this iterator is in use.
s | Underlying ostream to write to. | |
c | CharT delimiter string to insert. |
Definition at line 181 of file stream_iterator.h.
std::ostream_iterator< Type, CharT, Traits >::ostream_iterator | ( | const ostream_iterator< Type, CharT, Traits > & | __obj | ) | [inline] |
ostream_iterator& std::ostream_iterator< Type, CharT, Traits >::operator= | ( | const Type & | value | ) | [inline] |
constructed with delimiter string, writes delimiter to ostream.
Definition at line 191 of file stream_iterator.h.