cohtml::DataBuffer
A reference counted data buffer.
#include <Library.h>
Public Types
Section titled “Public Types”| Name | |
|---|---|
| typedef void(*)(unsigned char *data, void *userData) | CallbackOnDestruction |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| DataBuffer * | CreateDataBuffer(unsigned char * data, size_t size, CallbackOnDestruction callback, void * userData) Constructs new object from provided data, size and callback. |
| virtual unsigned char * | GetData() const =0 |
| virtual size_t | GetSize() const =0 |
| virtual void | Release() =0 Releases the currently held reference. |
Protected Functions
Section titled “Protected Functions”| Name | |
|---|---|
| virtual | ~DataBuffer() |
Public Types Documentation
Section titled “Public Types Documentation”typedef CallbackOnDestruction
Section titled “typedef CallbackOnDestruction”typedef void(* cohtml::DataBuffer::CallbackOnDestruction) (unsigned char *data, void *userData);Public Functions Documentation
Section titled “Public Functions Documentation”function CreateDataBuffer
Section titled “function CreateDataBuffer”static DataBuffer * CreateDataBuffer( unsigned char * data, size_t size, CallbackOnDestruction callback, void * userData)Constructs new object from provided data, size and callback.
Note: Data is adopted, but the memory is not copied, you should let this buffer free the memory via the provided destruction callback
function GetData
Section titled “function GetData”virtual unsigned char * GetData() const =0function GetSize
Section titled “function GetSize”virtual size_t GetSize() const =0function Release
Section titled “function Release”virtual void Release() =0Releases the currently held reference.
Note: CallbackOnDestruction will be called when all references are released
Protected Functions Documentation
Section titled “Protected Functions Documentation”function ~DataBuffer
Section titled “function ~DataBuffer”virtual ~DataBuffer()© 2026 Coherent Labs. All rights reserved.