33 #ifndef __H__UG__binary_buffer_impl__
34 #define __H__UG__binary_buffer_impl__
size_t read_pos() const
returns the current read-pos (in bytes)
Definition: binary_buffer_impl.h:48
char * buffer()
returns the raw buffer pointer or NULL if the buffer is empty (capacity() == 0)
Definition: binary_buffer_impl.h:94
size_t capacity() const
returns the capacity (reserved memory) of the buffer
Definition: binary_buffer_impl.h:43
size_t m_readPos
Definition: binary_buffer.h:106
void read(char *buf, size_t size)
reads data of the given size (in bytes)
Definition: binary_buffer_impl.h:58
size_t m_writePos
Definition: binary_buffer.h:107
size_t write_pos() const
returns the current write-pos (in bytes)
Definition: binary_buffer_impl.h:53
std::vector< char > m_data
Definition: binary_buffer.h:105
bool eof()
returns true if the read-position reached the write-position
Definition: binary_buffer_impl.h:99
void write(const char *buf, size_t size)
writes data of the given size (in bytes)
Definition: binary_buffer_impl.h:71
T * GetDataPtr(std::vector< T > &v)
Returns a pointer to the array which is managed by the std::vector.
Definition: vector_util.h:51