byteme
C++ wrappers for buffered inputs
|
Virtual class for writing bytes to a sink. More...
#include <Writer.hpp>
Public Member Functions | |
virtual void | write (const unsigned char *buffer, size_t n)=0 |
virtual void | finish ()=0 |
void | write (const std::string &x) |
void | write (const char *x) |
void | write (char x) |
Virtual class for writing bytes to a sink.
|
pure virtual |
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.
Implemented in byteme::GzipFileWriter, byteme::OstreamWriter< Pointer_ >, byteme::RawBufferWriter, byteme::RawFileWriter, and byteme::ZlibBufferWriter.
|
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. |
|
pure virtual |
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 . |
Implemented in byteme::GzipFileWriter, byteme::OstreamWriter< Pointer_ >, byteme::RawBufferWriter, byteme::RawFileWriter, and byteme::ZlibBufferWriter.