Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::io::Buffer< T > Class Template Referenceabstract

An abstract base class for fixed-size data buffers. More...

#include <pcl/io/buffers.h>

+ Inheritance diagram for pcl::io::Buffer< T >:

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_
 

Detailed Description

template<typename T>
class pcl::io::Buffer< T >

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.

Author
Sergey Alexandrov

Definition at line 62 of file buffers.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using pcl::io::Buffer< T >::value_type = T

Definition at line 67 of file buffers.h.

Constructor & Destructor Documentation

◆ ~Buffer()

template<typename T >
pcl::io::Buffer< T >::~Buffer ( )
virtualdefault

◆ Buffer()

template<typename T >
pcl::io::Buffer< T >::Buffer ( std::size_t  size)
protected

Definition at line 75 of file buffers.hpp.

Member Function Documentation

◆ operator[]()

template<typename T >
virtual T pcl::io::Buffer< T >::operator[] ( std::size_t  idx) const
pure virtual

Access an element at a given index.

Implemented in pcl::io::AverageBuffer< T >, pcl::io::MedianBuffer< T >, and pcl::io::SingleBuffer< T >.

◆ push()

template<typename T >
virtual void pcl::io::Buffer< T >::push ( std::vector< T > &  data)
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 >.

◆ size()

template<typename T >
std::size_t pcl::io::Buffer< T >::size ( ) const
inline

Get the size of the buffer.

Definition at line 86 of file buffers.h.

References pcl::io::Buffer< T >::size_.

Member Data Documentation

◆ size_

template<typename T >
const std::size_t pcl::io::Buffer< T >::size_
protected

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