MPD: SliceBuffer< T > Class Template Reference

MPD 0.20.15

Data Structures | Public Member Functions
SliceBuffer< T > Class Template Reference

This class pre-allocates a certain number of objects, and allows callers to allocate and free these objects ("slices"). More...

`#include <SliceBuffer.hxx>`

## Public Member Functions
| SliceBuffer (unsigned _count)
| ~SliceBuffer ()
| SliceBuffer (const SliceBuffer &other)=delete
SliceBuffer & | operator= (const SliceBuffer &other)=delete
unsigned | GetCapacity () const
bool | IsEmpty () const
bool | IsFull () const
template<typename... Args>
T * | Allocate (Args &&... args)
void | Free (T *value)

## Detailed Description

### template<typename T>
class SliceBuffer< T >

This class pre-allocates a certain number of objects, and allows callers to allocate and free these objects ("slices").

Definition at line 37 of file SliceBuffer.hxx.

## Constructor & Destructor Documentation

## ◆ SliceBuffer() [1/2]

template<typename T>

SliceBuffer< T >::SliceBuffer | ( | unsigned | _count | ) |
| inline

Definition at line 73 of file SliceBuffer.hxx.

## ◆ ~SliceBuffer()

template<typename T>

SliceBuffer< T >::~SliceBuffer | ( |  | ) |
| inline

Definition at line 80 of file SliceBuffer.hxx.

## ◆ SliceBuffer() [2/2]

template<typename T>

SliceBuffer< T >::SliceBuffer | ( | const SliceBuffer< T > & | other | ) |
| delete

## Member Function Documentation

## ◆ Allocate()

template<typename T>
template<typename... Args>

T* SliceBuffer< T >::Allocate | ( | Args &&... | args | ) |
| inline

Definition at line 104 of file SliceBuffer.hxx.

## ◆ Free()

template<typename T>

void SliceBuffer< T >::Free | ( | T * | value | ) |
| inline

Definition at line 128 of file SliceBuffer.hxx.

## ◆ GetCapacity()

template<typename T>

unsigned SliceBuffer< T >::GetCapacity | ( |  | ) | const
| inline

Definition at line 91 of file SliceBuffer.hxx.

## ◆ IsEmpty()

template<typename T>

bool SliceBuffer< T >::IsEmpty | ( |  | ) | const
| inline

Definition at line 95 of file SliceBuffer.hxx.

## ◆ IsFull()

template<typename T>

bool SliceBuffer< T >::IsFull | ( |  | ) | const
| inline

Definition at line 99 of file SliceBuffer.hxx.

## ◆ operator=()

template<typename T>

SliceBuffer& SliceBuffer< T >::operator= | ( | const SliceBuffer< T > & | other | ) |
| delete

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

- util/SliceBuffer.hxx