14 LOG(
"buffer::buffer ("<<s<<
")");
20 LOG(
"buffer::grow " << f);
22 LOG(
"\tERROR: just tried to grow to a smaller size");
25 const size_t new_s =
size *
f;
26 char* new_b =
new char[new_s];
37 LOG(
"buffer::resize " << s);
39 LOG(
"\tdeleting buf");
48 LOG(
"buffer::~buffer");
59 LOG(
"~common_buffer");
debugging/logging support
common_buffer(std::streambuf *sb)
construct using a streambuf
static const size_t buffer_size
void resize(size_t size)
resets the size of the buffer
void grow(unsigned int factor=2)
increases the size of buffer
~buffer()
deallocates buffer
static const size_t out_buffer_size