![]() |
libfilezilla
|
Read and modify a contiguous sequence of buffered bytes. More...
#include <buffer.hpp>

Public Member Functions | |
Direct access | |
get() exposes the active bytes. get(n) prepares space after them without changing size(); fill that space, then commit it with add(n). | |
| virtual unsigned char const * | get () const =0 |
| virtual unsigned char * | get ()=0 |
| virtual unsigned char * | get (size_t write_size)=0 |
| virtual void | add (size_t added)=0 |
Contents and extent | |
consume(n) requires n <= size(). clear() retains storage. capacity() includes consumed space that can be reclaimed. Initialize bytes exposed by resize() before reading them. | |
| virtual void | consume (size_t consumed)=0 |
| virtual size_t | size () const =0 |
| virtual void | clear ()=0 |
| virtual void | append (unsigned char const *data, size_t len)=0 |
| virtual size_t | capacity () const =0 |
| virtual void | resize (size_t size)=0 |
Protected Member Functions | |
| buffer_access_interface (buffer_access_interface const &)=default | |
| buffer_access_interface & | operator= (buffer_access_interface const &)=default |
Read and modify a contiguous sequence of buffered bytes.
Preparing space, appending, or resizing can move the data and invalidate pointers.
|
pure virtual |
Implemented in nonowning_buffer.
|
pure virtual |
Implemented in nonowning_buffer.