Point Cloud Library (PCL)
1.14.1-dev
|
An abstract base class for fixed-size data buffers. More...
#include <pcl/io/buffers.h>
Public Types | |
using | value_type = T |
Public Member Functions | |
virtual | ~Buffer () |
virtual T | operator[] (std::size_t idx) const =0 |
Access an element at a given index. More... | |
virtual void | push (std::vector< T > &data)=0 |
Insert a new chunk of data into the buffer. More... | |
std::size_t | size () const |
Get the size of the buffer. More... | |
Protected Member Functions | |
Buffer (std::size_t size) | |
Protected Attributes | |
const std::size_t | size_ |
An abstract base class for fixed-size data buffers.
A new chunk of data can be inserted using the push() method; the data elements stored in the buffer can be accessed using operator[]().
Concrete implementations of this interface (such as AverageBuffer or MedianBuffer) may perform arbitrary data processing under the hood and provide access to certain quantities computed based on the input data rather than the data themselves.
using pcl::io::Buffer< T >::value_type = T |
|
virtualdefault |
|
protected |
Definition at line 75 of file buffers.hpp.
|
pure virtual |
Access an element at a given index.
Implemented in pcl::io::AverageBuffer< T >, pcl::io::MedianBuffer< T >, and pcl::io::SingleBuffer< T >.
|
pure virtual |
Insert a new chunk of data into the buffer.
Note that the data parameter is not const
-qualified. This is done to allow deriving classes to implement no-copy data insertion, where the data is "stolen" from the input argument.
Implemented in pcl::io::AverageBuffer< T >, pcl::io::MedianBuffer< T >, and pcl::io::SingleBuffer< T >.
|
inline |
Get the size of the buffer.
Definition at line 86 of file buffers.h.
References pcl::io::Buffer< T >::size_.
|
protected |
Definition at line 95 of file buffers.h.
Referenced by pcl::io::AverageBuffer< T >::AverageBuffer(), pcl::io::MedianBuffer< T >::MedianBuffer(), and pcl::io::Buffer< T >::size().