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)
25 : handle_(std::move(guard))
27 if (!CVB_CALL_CAPI(CVCIsBuffer(
Handle())))
46 return handle_.Handle();
55 void* pBase =
nullptr;
56 CVB_CALL_CAPI(CVCBufferGetBasePtr(
Handle(), pBase));
67 size_t Size() const noexcept
70 CVB_CALL_CAPI(CVCBufferGetSize(
Handle(), size));
84 CVB_CALL_CAPI(CVCBufferGetCapacity(
Handle(), capacity));
89 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:67
std::uint8_t * BasePtr() const noexcept
Gets the pointer to the start of this buffer.
Definition: buffer_base.hpp:53
size_t Capacity() const noexcept
Gets the allocated size of this buffer in bytes.
Definition: buffer_base.hpp:81
void * Handle() const noexcept
Classic API buffer handle.
Definition: buffer_base.hpp:44
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24