Skip to content

Pylon::CSharedByteBuffer#

Module: Low Level API

Byte buffer with smart pointer semantics. Not thread safe.

#include <pylon/SharedByteBuffer.h>

Public Functions#

Name
CSharedByteBuffer()
default constructer for shared buffer
CSharedByteBuffer(size_t nBytes)
constructer for shared buffer form buffer size
CSharedByteBuffer(const CSharedByteBuffer & other)
copy constructor
~CSharedByteBuffer()
destructor
CSharedByteBuffer & operator=(const CSharedByteBuffer & rhs)
copy assignment operator
operator bool() const
pointer like test if nullptr
void Release()
release the referenz on buffer and memory if last referenzing object.
size_t GetSize() const
return size of buffer in bytes
uint8_t * GetBuffer()
get pointer to buffer memory
const uint8_t * GetBuffer() const
get pointer to buffer memory
bool IsNull() const
test if buffer references memory

Public Functions Documentation#

function CSharedByteBuffer#

CSharedByteBuffer()

default constructer for shared buffer

function CSharedByteBuffer#

explicit CSharedByteBuffer(
    size_t nBytes
)

constructer for shared buffer form buffer size

function CSharedByteBuffer#

CSharedByteBuffer(
    const CSharedByteBuffer & other
)

copy constructor

function ~CSharedByteBuffer#

~CSharedByteBuffer()

destructor

function operator=#

CSharedByteBuffer & operator=(
    const CSharedByteBuffer & rhs
)

copy assignment operator

function operator bool#

explicit operator bool() const

pointer like test if nullptr

function Release#

void Release()

release the referenz on buffer and memory if last referenzing object.

function GetSize#

size_t GetSize() const

return size of buffer in bytes

function GetBuffer#

uint8_t * GetBuffer()

get pointer to buffer memory

Return: nullptr if buffer references no memory

function GetBuffer#

const uint8_t * GetBuffer() const

get pointer to buffer memory

Return: nullptr if buffer references no memory

function IsNull#

bool IsNull() const

test if buffer references memory