Loading...
Searching...
No Matches
pcl::io::Buffer< T > Class Template Referenceabstract
Module io

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.
virtual void | push (std::vector< T > &data)=0
| Insert a new chunk of data into the buffer.
std::size_t | size () const
| Get the size of the buffer.

## 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 | ( |  | ) |

virtual default

## Buffer()

template<typename T>

pcl::io::Buffer< T >::Buffer | ( | std::size_t | size | ) |

protected

Definition at line 75 of file buffers.hpp.

References size(), and size_.

Referenced by pcl::io::AverageBuffer< T >::AverageBuffer(), pcl::io::MedianBuffer< T >::MedianBuffer(), pcl::io::SingleBuffer< T >::SingleBuffer(), pcl::io::AverageBuffer< T >::~AverageBuffer(), pcl::io::MedianBuffer< T >::~MedianBuffer(), and pcl::io::SingleBuffer< T >::~SingleBuffer().

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

Referenced by pcl::io::AverageBuffer< T >::AverageBuffer(), Buffer(), pcl::io::MedianBuffer< T >::MedianBuffer(), and pcl::io::SingleBuffer< T >::SingleBuffer().

## Member Data Documentation

## size_

template<typename T>

const std::size_t pcl::io::Buffer< T >::size_

protected

Definition at line 95 of file buffers.h.

Referenced by pcl::io::AverageBuffer< T >::AverageBuffer(), Buffer(), pcl::io::MedianBuffer< T >::MedianBuffer(), pcl::io::AverageBuffer< T >::operator[](), pcl::io::MedianBuffer< T >::operator[](), pcl::io::SingleBuffer< T >::operator[](), pcl::io::AverageBuffer< T >::push(), pcl::io::MedianBuffer< T >::push(), pcl::io::SingleBuffer< T >::push(), size(), pcl::io::AverageBuffer< T >::~AverageBuffer(), pcl::io::MedianBuffer< T >::~MedianBuffer(), and pcl::io::SingleBuffer< T >::~SingleBuffer().

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

- pcl/io/buffers.h
- pcl/io/impl/buffers.hpp