14 inline HandleGuard<BufferBase>::HandleGuard(
void* handle) noexcept
15 : HandleGuard<BufferBase>(handle, [](
void* handle) { CVB_CALL_CAPI(ReleaseObject(handle)); })
25 using GuardType = HandleGuard<BufferBase>;
28 explicit BufferBase(HandleGuard<BufferBase>&& guard)
29 : handle_(std::move(guard))
31 if (!CVB_CALL_CAPI(CVCIsBuffer(
Handle())))
50 return handle_.Handle();
59 void* pBase =
nullptr;
60 CVB_CALL_CAPI(CVCBufferGetBasePtr(
Handle(), pBase));
71 size_t Size() const noexcept
74 CVB_CALL_CAPI(CVCBufferGetSize(
Handle(), size));
88 CVB_CALL_CAPI(CVCBufferGetCapacity(
Handle(), capacity));
93 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:71
std::uint8_t * BasePtr() const noexcept
Gets the pointer to the start of this buffer.
Definition: buffer_base.hpp:57
size_t Capacity() const noexcept
Gets the allocated size of this buffer in bytes.
Definition: buffer_base.hpp:85
void * Handle() const noexcept
Classic API buffer handle.
Definition: buffer_base.hpp:48
Root namespace for the Image Manager interface.
Definition: c_barcode.h:15