14 inline HandleGuard<BufferBase>::HandleGuard(
void* handle) noexcept
15 : HandleGuard<BufferBase>(handle, [](
void* handle) { CVB_CALL_CAPI(ReleaseObject(handle)); })
24 explicit BufferBase(HandleGuard<BufferBase>&& guard) noexcept
25 : handle_(std::move(guard))
27 assert(CVB_CALL_CAPI(CVCIsBuffer(
Handle())) &&
"buffer handle must be a buffer");
41 return handle_.Handle();
50 void* pBase =
nullptr;
51 CVB_CALL_CAPI(CVCBufferGetBasePtr(
Handle(), pBase));
62 size_t Size() const noexcept
65 CVB_CALL_CAPI(CVCBufferGetSize(
Handle(), size));
79 CVB_CALL_CAPI(CVCBufferGetCapacity(
Handle(), capacity));
84 HandleGuard<BufferBase> handle_;
Base class of all buffers.
Definition: buffer_base.hpp:22
size_t Size() const noexcept
Gets the actual size of this buffer in bytes.
Definition: buffer_base.hpp:62
std::uint8_t * BasePtr() const noexcept
Gets the pointer to the start of this buffer.
Definition: buffer_base.hpp:48
size_t Capacity() const noexcept
Gets the allocated size of this buffer in bytes.
Definition: buffer_base.hpp:76
void * Handle() const noexcept
Classic API buffer handle.
Definition: buffer_base.hpp:39
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24