Read bytes from a std::ostream
.
More...
#include <OstreamWriter.hpp>
Public Member Functions | |
OstreamWriter (Pointer_ output) | |
void | write (const unsigned char *buffer, size_t n) |
void | finish () |
void | write (const std::string &x) |
void | write (const char *x) |
void | write (char x) |
Public Member Functions inherited from byteme::Writer | |
void | write (const std::string &x) |
void | write (const char *x) |
void | write (char x) |
Read bytes from a std::ostream
.
Pointer_ | A (possibly smart) pointer to an std::ostream object. |
This is just a wrapper around std::ostream::write
for compatibility.
|
inline |
output | Pointer to an output stream. This is assumed to live until finish() is called. |
|
inlinevirtual |
Indicate that the writing has finished and that the relevant clean-up (buffer flushing, file closing, etc.) should be performed. This should be called exactly once, after which no further calls to write()
or finish()
should be performed.
Implements byteme::Writer.
|
inline |
Write a single character to the output sink.
x | Character to be written. |
|
inline |
Write a null-terminated C-string to the output sink.
[in] | x | Pointer to the string to be written. |
|
inline |
Write a string to the output sink.
x | String to be written. |
|
inlinevirtual |
Write the next chunk of bytes to the output sink. This may or may not be internally buffered at the discretion of the concrete class.
[in] | buffer | Pointer to the start of an array containing the bytes to be written. |
n | Length of the array in buffer . |
Implements byteme::Writer.