13 inline HandleGuard<BufferBase>::HandleGuard(
void *handle) noexcept
14 : HandleGuard<BufferBase>(handle, [](
void *handle) { CVB_CALL_CAPI(
ReleaseObject(handle)); })
23 using GuardType = HandleGuard<BufferBase>;
26 explicit BufferBase(HandleGuard<BufferBase> &&guard)
29 if (!CVB_CALL_CAPI(CVCIsBuffer(
Handle())))
34 BufferBase(
const BufferBase &other) =
delete;
35 BufferBase &operator=(
const BufferBase &other) =
delete;
36 BufferBase(BufferBase &&other) =
delete;
37 BufferBase &operator=(BufferBase &&other) =
delete;
38 virtual ~BufferBase() =
default;
48 return handle_.Handle();
57 void *pBase =
nullptr;
58 CVB_CALL_CAPI(CVCBufferGetBasePtr(
Handle(), pBase));
69 size_t Size() const noexcept
72 CVB_CALL_CAPI(CVCBufferGetSize(
Handle(), size));
69 size_t Size() const noexcept {
…}
86 CVB_CALL_CAPI(CVCBufferGetCapacity(
Handle(), capacity));
91 HandleGuard<BufferBase> handle_;
Base class of all buffers.
Definition buffer_base.hpp:21
size_t Size() const noexcept
Gets the actual size of this buffer in bytes.
Definition buffer_base.hpp:69
std::uint8_t * BasePtr() const noexcept
Gets the pointer to the start of this buffer.
Definition buffer_base.hpp:55
size_t Capacity() const noexcept
Gets the allocated size of this buffer in bytes.
Definition buffer_base.hpp:83
void * Handle() const noexcept
Classic API buffer handle.
Definition buffer_base.hpp:46
cvbbool_t ReleaseObject(OBJ &Object)
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17