ostreambuf_iterator Class
The template class ostreambuf_iterator describes an output iterator object that writes successive character elements onto the output stream with the extraction operator>>. The ostreambuf_iterators differ from those of the ostream_iterator Class in having characters instead of a generic type at the type of object being inserted into the output stream.
template <
class CharType = char
class Traits = char_traits<CharType>
>
Parameters
CharType
The type that represents the character type for the ostreambuf_iterator. This argument is optional and the default value is char*.*Traits
The type that represents the character type for the ostreambuf_iterator. This argument is optional and the default value is char_traits<CharType>.
Remarks
The ostreambuf_iterator class must satisfy the requirements for an output iterator. Algorithms can be written directly to output streams using an ostreambuf_iterator. The class provides a low-level stream iterator that allows access to the raw (unformatted) I/O stream in the form of characters and the ability to bypass the buffering and character translations associated with the high-level stream iterators.
Constructors
Constructs an ostreambuf_iterator that is initialized to write characters to the output stream. |
Typedefs
A type that provides for the character type of the ostreambuf_iterator. |
|
A type that provides for the stream type of the ostream_iterator. |
|
A type that provides for the stream type of the ostreambuf_iterator. |
|
A type that provides for the character traits type of the ostream_iterator. |
Member Functions
Tests for failure of an insertion into the output stream buffer. |
Operators
Dereferencing operator used to implement the output iterator expression *i = x. |
|
A nonfunctional increment operator that returns an ostreambuf_iterator to the same object it addressed before the operation was called. |
|
The operator inserts a character into the associated stream buffer. |
Requirements
Header: <iterator>
Namespace: std