Point Cloud Library (PCL)  1.8.1-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

typedef T value_type
 

Public Member Functions

virtual ~Buffer ()
 
virtual T operator[] (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...
 
size_t size () const
 Get the size of the buffer. More...
 

Protected Member Functions

 Buffer (size_t size)
 

Protected Attributes

const 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 67 of file buffers.h.

Member Typedef Documentation

template<typename T >
typedef T pcl::io::Buffer< T >::value_type

Definition at line 72 of file buffers.h.

Constructor & Destructor Documentation

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

Definition at line 74 of file buffers.hpp.

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

Definition at line 68 of file buffers.hpp.

Member Function Documentation

template<typename T >
virtual T pcl::io::Buffer< T >::operator[] ( 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 >.

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 >.

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

Get the size of the buffer.

Definition at line 91 of file buffers.h.

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

Member Data Documentation

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

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