1 #ifndef CARMA_UTIL_BYTEBUFFER_H
2 #define CARMA_UTIL_BYTEBUFFER_H
53 void internalDestructiveReserve(
size_t count );
88 ::std::swap( ptr_, rhs.ptr_ );
89 ::std::swap( allocSize_, rhs.allocSize_ );
90 ::std::swap( presentSize_, rhs.presentSize_ );
118 if ( count > allocSize_ )
119 internalDestructiveReserve( count );
126 if ( count > allocSize_ )
127 internalDestructiveReserve( count );
129 presentSize_ = count;
ByteBuffer()
Construct an empty buffer.
size_t reserve() const
Get the reserved size of the buffer.
char * get() const
Get the present pointer to the buffer.
~ByteBuffer()
Destruct a ByteBuffer.
void swap(ByteBuffer &rhs)
Swap this instance with another ByteBuffer instance.
size_t size() const
Get the present size of the buffer.
void destructiveReserve(size_t count)
Reserve space in the buffer.
void destructiveResize(size_t count)
Resize the buffer.
Manages a (possibly destructively) resizable buffer of raw bytes.