#include <Iguana/Utilities/classlib/iotools/WriteBuffer.h>
Public Types | |
enum | { DEFAULT_SIZE = 4096 } |
Public Member Functions | |
unsigned char * | buffer (void) const |
void | bump (IOSize n) |
IOSize | capacity (void) const |
unsigned char * | current (void) const |
unsigned char * | dirty (void) const |
unsigned char * | limit (void) const |
WriteBuffer & | operator= (const WriteBuffer &x) |
void | put (const void *data, IOSize n) |
void | reset (void) |
IOSize | size (void) const |
void | taken (IOSize n) |
WriteBuffer (const WriteBuffer &x) | |
WriteBuffer (IOSize bufsize=DEFAULT_SIZE) | |
~WriteBuffer (void) | |
Private Attributes | |
unsigned char * | m_buffer |
unsigned char * | m_current |
unsigned char * | m_dirty |
unsigned char * | m_limit |
Clients should use put() for buffered writes to the store. If capacity() returns zero to indicate the buffer is full, clients should write the section dirty() .. current () to the store. current() - dirty() is the number of bytes to write. Once the data has been written, the client should call taken() to move the buffer pointers.
Definition at line 25 of file WriteBuffer.h.
anonymous enum |
Definition at line 28 of file WriteBuffer.h.
00028 { DEFAULT_SIZE = 4096 }; //< Default buffer size.
lat::WriteBuffer::WriteBuffer | ( | IOSize | bufsize = DEFAULT_SIZE |
) |
lat::WriteBuffer::WriteBuffer | ( | const WriteBuffer & | x | ) |
lat::WriteBuffer::~WriteBuffer | ( | void | ) |
unsigned char* lat::WriteBuffer::buffer | ( | void | ) | const |
unsigned char* lat::WriteBuffer::current | ( | void | ) | const |
unsigned char* lat::WriteBuffer::dirty | ( | void | ) | const |
unsigned char* lat::WriteBuffer::limit | ( | void | ) | const |
WriteBuffer& lat::WriteBuffer::operator= | ( | const WriteBuffer & | x | ) |
unsigned char* lat::WriteBuffer::m_buffer [private] |
Definition at line 49 of file WriteBuffer.h.
unsigned char* lat::WriteBuffer::m_current [private] |
Definition at line 50 of file WriteBuffer.h.
unsigned char* lat::WriteBuffer::m_dirty [private] |
Definition at line 52 of file WriteBuffer.h.
unsigned char* lat::WriteBuffer::m_limit [private] |
Definition at line 51 of file WriteBuffer.h.