# std::ostreambuf_iterator< CharT, Traits > Class Template Reference

Provides output iterator semantics for streambufs. More...

`#include <streambuf_iterator.h>`

Inheritance diagram for std::ostreambuf_iterator< CharT, Traits >:

[legend]
Collaboration diagram for std::ostreambuf_iterator< CharT, Traits >:

[legend]
List of all members.

## Public Types
typedef output_iterator_tag | iterator_category
| One of the tag types.
typedef void | value_type
| The type "pointed to" by the iterator.
typedef void | difference_type
| Distance between iterators is represented as this type.
typedef void | pointer
| This type represents a pointer-to-value_type.
typedef void | reference
| This type represents a reference-to-value_type.
typedef CharT | char_type
| Public typedefs.
typedef Traits | traits_type
| Public typedefs.
typedef basic_streambuf< CharT, Traits > | streambuf_type
| Public typedefs.
typedef basic_ostream< CharT, Traits > | ostream_type
| Public typedefs.
## Public Member Functions
| ostreambuf_iterator (ostream_type &s) throw ()
| Construct output iterator from ostream.
| ostreambuf_iterator (streambuf_type *s) throw ()
| Construct output iterator from streambuf.
ostreambuf_iterator & | operator= (CharT c)
| Write character to streambuf. Calls streambuf.sputc().
ostreambuf_iterator & | operator * ()
| Return *this.
ostreambuf_iterator & | operator++ (int)
| Return *this.
ostreambuf_iterator & | operator++ ()
| Return *this.
bool | failed () const throw ()
| Return true if previous operator=() failed.

## Detailed Description

### template<typename CharT, typename Traits>
class std::ostreambuf_iterator< CharT, Traits >

Provides output iterator semantics for streambufs.

Definition at line 191 of file streambuf_iterator.h.

## Member Typedef Documentation

template<typename CharT, typename Traits>
typedef CharT std::ostreambuf_iterator< CharT, Traits >::char_type

| Public typedefs. Definition at line 198 of file streambuf_iterator.h.

typedef void std::iterator< output_iterator_tag , void , void , void , void >::difference_type`[inherited]`

| Distance between iterators is represented as this type. Definition at line 113 of file stl_iterator_base_types.h.

typedef output_iterator_tag std::iterator< output_iterator_tag , void , void , void , void >::iterator_category`[inherited]`

| One of the tag types. Definition at line 109 of file stl_iterator_base_types.h.

template<typename CharT, typename Traits>
typedef basic_ostream<CharT, Traits> std::ostreambuf_iterator< CharT, Traits >::ostream_type

| Public typedefs. Definition at line 201 of file streambuf_iterator.h.

typedef void std::iterator< output_iterator_tag , void , void , void , void >::pointer`[inherited]`

| This type represents a pointer-to-value_type. Definition at line 115 of file stl_iterator_base_types.h.

typedef void std::iterator< output_iterator_tag , void , void , void , void >::reference`[inherited]`

| This type represents a reference-to-value_type. Definition at line 117 of file stl_iterator_base_types.h.

template<typename CharT, typename Traits>
typedef basic_streambuf<CharT, Traits> std::ostreambuf_iterator< CharT, Traits >::streambuf_type

| Public typedefs. Definition at line 200 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
typedef Traits std::ostreambuf_iterator< CharT, Traits >::traits_type

| Public typedefs. Definition at line 199 of file streambuf_iterator.h.

typedef void std::iterator< output_iterator_tag , void , void , void , void >::value_type`[inherited]`

| The type "pointed to" by the iterator. Definition at line 111 of file stl_iterator_base_types.h.

## Constructor & Destructor Documentation

template<typename CharT, typename Traits>
std::ostreambuf_iterator< CharT, Traits >::ostreambuf_iterator | ( | ostream_type & | s | ) | throw ()`[inline]`

| Construct output iterator from ostream. Definition at line 210 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
std::ostreambuf_iterator< CharT, Traits >::ostreambuf_iterator | ( | streambuf_type * | s | ) | throw ()`[inline]`

| Construct output iterator from streambuf. Definition at line 214 of file streambuf_iterator.h.

## Member Function Documentation

template<typename CharT, typename Traits>
bool std::ostreambuf_iterator< CharT, Traits >::failed | ( |  | ) | const throw ()`[inline]`

| Return true if previous operator=() failed. Definition at line 244 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
ostreambuf_iterator& std::ostreambuf_iterator< CharT, Traits >::operator * | ( |  | ) | `[inline]`

| Return *this. Definition at line 229 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
ostreambuf_iterator& std::ostreambuf_iterator< CharT, Traits >::operator++ | ( |  | ) | `[inline]`

| Return *this. Definition at line 239 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
ostreambuf_iterator& std::ostreambuf_iterator< CharT, Traits >::operator++ | ( | int |  | ) | `[inline]`

| Return *this. Definition at line 234 of file streambuf_iterator.h.

template<typename CharT, typename Traits>
ostreambuf_iterator& std::ostreambuf_iterator< CharT, Traits >::operator= | ( | CharT | c | ) | `[inline]`

| Write character to streambuf. Calls streambuf.sputc(). Definition at line 219 of file streambuf_iterator.h. References std::ostreambuf_iterator< CharT, Traits >::operator=(). Referenced by std::ostreambuf_iterator< CharT, Traits >::operator=().

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

- streambuf_iterator.h