Public Member Functions | Private Attributes | List of all members
multisense::legacy::BufferPool Class Reference

Object to handle the management and delivery of buffers to used to store incoming data without needing to continually reallocate internal memory. This class is threadsafe. More...

#include <storage.hh>

Public Member Functions

 BufferPool (BufferPool &&) noexcept=default
 
 BufferPool (const BufferPool &)=delete
 
 BufferPool (const BufferPoolConfig &config)
 
std::shared_ptr< std::vector< uint8_t > > get_buffer (size_t target_size)
 Get a buffer which will contain at least target_size bytes of storage. More...
 
BufferPoolConfig get_config () const
 Get the current active configuration. More...
 
BufferPooloperator= (BufferPool &&) noexcept=default
 
BufferPooloperator= (const BufferPool &)=delete
 
 ~BufferPool ()=default
 

Private Attributes

BufferPoolConfig m_config
 The configured numbers and sizes of our internal buffers. More...
 
std::vector< std::shared_ptr< std::vector< uint8_t > > > m_large_buffers
 The collection of large buffers. More...
 
std::vector< std::shared_ptr< std::vector< uint8_t > > > m_small_buffers
 The collection of small buffers. More...
 

Detailed Description

Object to handle the management and delivery of buffers to used to store incoming data without needing to continually reallocate internal memory. This class is threadsafe.

Definition at line 58 of file LibMultiSense/include/details/legacy/storage.hh.

Constructor & Destructor Documentation

◆ BufferPool() [1/3]

multisense::legacy::BufferPool::BufferPool ( const BufferPoolConfig config)

Definition at line 50 of file storage.cc.

◆ ~BufferPool()

multisense::legacy::BufferPool::~BufferPool ( )
default

◆ BufferPool() [2/3]

multisense::legacy::BufferPool::BufferPool ( const BufferPool )
delete

Non-copyable

◆ BufferPool() [3/3]

multisense::legacy::BufferPool::BufferPool ( BufferPool &&  )
defaultnoexcept

Movable

Member Function Documentation

◆ get_buffer()

std::shared_ptr< std::vector< uint8_t > > multisense::legacy::BufferPool::get_buffer ( size_t  target_size)

Get a buffer which will contain at least target_size bytes of storage.

Definition at line 98 of file storage.cc.

◆ get_config()

BufferPoolConfig multisense::legacy::BufferPool::get_config ( ) const
inline

Get the current active configuration.

Definition at line 86 of file LibMultiSense/include/details/legacy/storage.hh.

◆ operator=() [1/2]

BufferPool& multisense::legacy::BufferPool::operator= ( BufferPool &&  )
defaultnoexcept

◆ operator=() [2/2]

BufferPool& multisense::legacy::BufferPool::operator= ( const BufferPool )
delete

Member Data Documentation

◆ m_config

BufferPoolConfig multisense::legacy::BufferPool::m_config
private

The configured numbers and sizes of our internal buffers.

Definition at line 96 of file LibMultiSense/include/details/legacy/storage.hh.

◆ m_large_buffers

std::vector<std::shared_ptr<std::vector<uint8_t> > > multisense::legacy::BufferPool::m_large_buffers
private

The collection of large buffers.

Definition at line 106 of file LibMultiSense/include/details/legacy/storage.hh.

◆ m_small_buffers

std::vector<std::shared_ptr<std::vector<uint8_t> > > multisense::legacy::BufferPool::m_small_buffers
private

The collection of small buffers.

Definition at line 101 of file LibMultiSense/include/details/legacy/storage.hh.


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


multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:10