CVB++ 15.0
BufferBase Class Reference

Base class of all buffers. More...

#include <cvb/buffer_base.hpp>

Inherited by Buffer, and PFNCBuffer.

Public Member Functions

void * Handle () const noexcept
 Classic API buffer handle. More...
 
std::uint8_tBasePtr () const noexcept
 Gets the pointer to the start of this buffer. More...
 
size_t Size () const noexcept
 Gets the actual size of this buffer in bytes. More...
 
size_t Capacity () const noexcept
 Gets the allocated size of this buffer in bytes. More...
 

Detailed Description

Base class of all buffers.

Member Function Documentation

◆ BasePtr()

std::uint8_t * BasePtr ( ) const
inlinenoexcept

Gets the pointer to the start of this buffer.

Returns
Pointer to the first element in the buffer.

◆ Capacity()

size_t Capacity ( ) const
inlinenoexcept

Gets the allocated size of this buffer in bytes.

This value is a constant and resembles the allocated number of bytes in this buffer.

Returns
Full size of this buffer in bytes.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Classic API buffer handle.

Returns
Classic API handle.

It is normally not necessary to work with this handle.

◆ Size()

size_t Size ( ) const
inlinenoexcept

Gets the actual size of this buffer in bytes.

The actual size is the currently filled size of the buffer. For the allocated size see GetBufferCapacity().

Returns
Filled size of this buffer in bytes.