1#ifndef BYTEME_WRITER_HPP
2#define BYTEME_WRITER_HPP
29 virtual void write(
const unsigned char* buffer,
size_t n) = 0;
42 void write(
const std::string& x) {
43 write(
reinterpret_cast<const unsigned char*
>(x.c_str()), x.size());
52 write(
reinterpret_cast<const unsigned char*
>(x), std::strlen(x));
61 write(
reinterpret_cast<const unsigned char*
>(&x), 1);
Virtual class for writing bytes to a sink.
Definition Writer.hpp:18
void write(const std::string &x)
Definition Writer.hpp:42
void write(char x)
Definition Writer.hpp:60
virtual void write(const unsigned char *buffer, size_t n)=0
void write(const char *x)
Definition Writer.hpp:51
Simple byte readers and writers.