29 #ifndef HU_VARADIISTVAN_SCPL_IO_BUFFER_H
30 #define HU_VARADIISTVAN_SCPL_IO_BUFFER_H
40 namespace hu {
namespace varadiistvan {
namespace scpl {
namespace io {
85 const unsigned char*
getData()
const;
125 size_t append(
const void* src,
size_t size);
132 size_t extract(
void* dest,
size_t size,
size_t offset = 0)
const;
140 data(new unsigned char[capacity]),
225 size_t toCopy = (offset>=
length) ? 0 : std::min(size,
length - offset);
226 memcpy(dest,
data + offset, toCopy);
size_t addLength(size_t n)
const unsigned char * getData() const
size_t getCapacity() const
size_t extract(void *dest, size_t size, size_t offset=0) const
size_t getAvailable() const
size_t append(const void *src, size_t size)