48 DestroyBufferCallback destruction_callback);
63 virtual size_t size()
const = 0;
#define UExport
Definition Defines.h:65
A fixed-size byte container for passing data around.
Definition Buffer.h:28
virtual void * user_data()=0
Get the user data associated with this Buffer, if any.
static RefPtr< Buffer > CreateFromCopy(const void *data, size_t size)
Create a Buffer from existing data, a deep copy of data will be made.
virtual bool owns_data() const =0
Check whether this Buffer owns its own data (Buffer was created via CreateFromCopy).
void operator=(const Buffer &)
static RefPtr< Buffer > Create(void *data, size_t size, void *user_data, DestroyBufferCallback destruction_callback)
Create a Buffer from existing, user-owned data without any copies.
virtual size_t size() const =0
Get the size in bytes.
virtual void * data()=0
Get a pointer to the raw byte data.
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:47
A nullable smart pointer.
Definition RefPtr.h:79
void(* DestroyBufferCallback)(void *user_data, void *data)
Function signature for a user-defined destruction callback to be optionally called when Buffer is des...
Definition Buffer.h:23