unilink  0.4.3
A simple C++ library for unified async communication
unilink::memory::PooledBuffer Class Reference

RAII wrapper for memory pool buffers with enhanced safety. More...

#include <memory_pool.hpp>

Public Member Functions

 PooledBuffer (size_t size)
 
 PooledBuffer (MemoryPool::BufferSize buffer_size)
 
 ~PooledBuffer ()
 
 PooledBuffer (const PooledBuffer &)=delete
 
PooledBufferoperator= (const PooledBuffer &)=delete
 
 PooledBuffer (PooledBuffer &&other) noexcept
 
PooledBufferoperator= (PooledBuffer &&other) noexcept
 
uint8_t * data () const
 
size_t size () const
 
bool valid () const
 
uint8_t & operator[] (size_t index)
 
const uint8_t & operator[] (size_t index) const
 
uint8_t & at (size_t index)
 
const uint8_t & at (size_t index) const
 
uint8_t * get () const
 
 operator bool () const
 

Detailed Description

RAII wrapper for memory pool buffers with enhanced safety.

Definition at line 149 of file memory_pool.hpp.

Constructor & Destructor Documentation

◆ PooledBuffer() [1/4]

unilink::memory::PooledBuffer::PooledBuffer ( size_t  size)
explicit

Definition at line 227 of file memory_pool.cc.

◆ PooledBuffer() [2/4]

unilink::memory::PooledBuffer::PooledBuffer ( MemoryPool::BufferSize  buffer_size)
explicit

Definition at line 231 of file memory_pool.cc.

◆ ~PooledBuffer()

unilink::memory::PooledBuffer::~PooledBuffer ( )

Definition at line 236 of file memory_pool.cc.

◆ PooledBuffer() [3/4]

unilink::memory::PooledBuffer::PooledBuffer ( const PooledBuffer )
delete

◆ PooledBuffer() [4/4]

unilink::memory::PooledBuffer::PooledBuffer ( PooledBuffer &&  other)
noexcept

Definition at line 242 of file memory_pool.cc.

Member Function Documentation

◆ at() [1/2]

uint8_t & unilink::memory::PooledBuffer::at ( size_t  index)

Definition at line 280 of file memory_pool.cc.

◆ at() [2/2]

const uint8_t & unilink::memory::PooledBuffer::at ( size_t  index) const

Definition at line 287 of file memory_pool.cc.

◆ data()

uint8_t * unilink::memory::PooledBuffer::data ( ) const

Definition at line 270 of file memory_pool.cc.

◆ get()

uint8_t* unilink::memory::PooledBuffer::get ( ) const
inline

Definition at line 175 of file memory_pool.hpp.

◆ operator bool()

unilink::memory::PooledBuffer::operator bool ( ) const
inlineexplicit

Definition at line 176 of file memory_pool.hpp.

◆ operator=() [1/2]

PooledBuffer& unilink::memory::PooledBuffer::operator= ( const PooledBuffer )
delete

◆ operator=() [2/2]

PooledBuffer & unilink::memory::PooledBuffer::operator= ( PooledBuffer &&  other)
noexcept

Definition at line 249 of file memory_pool.cc.

◆ operator[]() [1/2]

uint8_t & unilink::memory::PooledBuffer::operator[] ( size_t  index)

Definition at line 276 of file memory_pool.cc.

◆ operator[]() [2/2]

const uint8_t & unilink::memory::PooledBuffer::operator[] ( size_t  index) const

Definition at line 278 of file memory_pool.cc.

◆ size()

size_t unilink::memory::PooledBuffer::size ( ) const

Definition at line 272 of file memory_pool.cc.

◆ valid()

bool unilink::memory::PooledBuffer::valid ( ) const

Definition at line 274 of file memory_pool.cc.


The documentation for this class was generated from the following files: