38 void*
const _data =
nullptr;
52 operator void*
const ()
const;
59 operator bool ()
const;
Result
Result flags returned by Iris as part of API calls.
Definition IrisTypes.hpp:25
BufferReferenceStrength
Iris Buffer ownership strength to underlying data. A weak reference only wraps data blocks by referen...
Definition IrisTypes.hpp:43
@ REFERENCE_STRONG
Full ownership. Will free data on buffer destruction. Can resize underlying pointer.
Definition IrisTypes.hpp:47
Private implementation of the reference counted data object used to wrap datablocks.
Definition IrisBuffer.hpp:34
void * end() const
Returns a pointer to the next unwritten location in the buffer.
void * data() const
Returns pointer to the beginning of the underlying data block.
void * append(size_t append_by_bytes)
Expands the size of the buffer without writing data into the expanded space.
Result shrink_to_fit()
Shrinks the underlying data block to fit the used space.
Result set_size(size_t buffer_valid_size_bytes)
Set the size object.
Result prepare(size_t amount_of_bytes_to_prepare)
Extends the capacity of the buffer without affecting the size.
Result append(void *data, size_t size)
Appends the end of the buffer by copying data into the buffer.
size_t available_bytes() const
Returns the remaining bytes within the buffer that are unused.
Result resize(size_t expected_size_bytes)
Resize the underlying datablock.
Result change_strength(BufferReferenceStrength strength_to_assign)
Change the strength of the underlying reference.
BufferReferenceStrength get_strength() const
Get the reference strength to the underlying data wrapped by the buffer.
size_t capacity() const
Returns the total capacity of the buffer (used and unused)
size_t size() const
Returns the current size of the buffer.