CHROMA
Classes | Public Member Functions | Private Attributes | List of all members

Circular buffer of arrays. More...

#include <circular_buffer.h>

Classes

struct  OutOfBoundsException
 
struct  SizeMismatchException
 

Public Member Functions

 CircularBufferArray (unsigned int n_max, unsigned int n5)
 Constructor. More...
 
 ~CircularBufferArray ()
 Destructor is automatic. More...
 
 CircularBufferArray (const CircularBufferArray< T > &c)
 Copy constructor. More...
 
void reset (void)
 Nuke it: More...
 
int sizeMax (void) const
 Get the maximum number of data items one can store. More...
 
int size (void) const
 Get the current number of items stored. More...
 
void get (const unsigned int i, multi1d< T > &x) const
 get the ith most recent item More...
 
bool isEmpty (void) const
 Is empty check. More...
 
void push (const multi1d< T > &e)
 push in an item as most recent. More...
 

Private Attributes

unsigned int size_max
 
unsigned int size_internal
 
multi2d< Tq
 
unsigned int start
 
unsigned int end
 
unsigned int N5
 

Detailed Description

template<typename T>
class Chroma::CircularBufferArray< T >

Circular buffer of arrays.

Definition at line 225 of file circular_buffer.h.

Constructor & Destructor Documentation

◆ CircularBufferArray() [1/2]

template<typename T >
Chroma::CircularBufferArray< T >::CircularBufferArray ( unsigned int  n_max,
unsigned int  n5 
)
inline

Constructor.

Definition at line 247 of file circular_buffer.h.

References q.

◆ ~CircularBufferArray()

template<typename T >
Chroma::CircularBufferArray< T >::~CircularBufferArray ( )
inline

Destructor is automatic.

Definition at line 252 of file circular_buffer.h.

◆ CircularBufferArray() [2/2]

template<typename T >
Chroma::CircularBufferArray< T >::CircularBufferArray ( const CircularBufferArray< T > &  c)
inline

Copy constructor.

Definition at line 255 of file circular_buffer.h.

Member Function Documentation

◆ get()

template<typename T >
void Chroma::CircularBufferArray< T >::get ( const unsigned int  i,
multi1d< T > &  x 
) const
inline

get the ith most recent item

Definition at line 283 of file circular_buffer.h.

References END_CODE, i, index, N5, q, s, START_CODE, and x.

◆ isEmpty()

template<typename T >
bool Chroma::CircularBufferArray< T >::isEmpty ( void  ) const
inline

Is empty check.

Definition at line 304 of file circular_buffer.h.

◆ push()

template<typename T >
void Chroma::CircularBufferArray< T >::push ( const multi1d< T > &  e)
inline

push in an item as most recent.

Definition at line 310 of file circular_buffer.h.

References END_CODE, N5, q, s, and START_CODE.

◆ reset()

template<typename T >
void Chroma::CircularBufferArray< T >::reset ( void  )
inline

Nuke it:

Definition at line 262 of file circular_buffer.h.

◆ size()

template<typename T >
int Chroma::CircularBufferArray< T >::size ( void  ) const
inline

Get the current number of items stored.

Definition at line 278 of file circular_buffer.h.

◆ sizeMax()

template<typename T >
int Chroma::CircularBufferArray< T >::sizeMax ( void  ) const
inline

Get the maximum number of data items one can store.

Definition at line 273 of file circular_buffer.h.

Member Data Documentation

◆ end

template<typename T >
unsigned int Chroma::CircularBufferArray< T >::end
private

Definition at line 402 of file circular_buffer.h.

◆ N5

template<typename T >
unsigned int Chroma::CircularBufferArray< T >::N5
private

Definition at line 403 of file circular_buffer.h.

◆ q

template<typename T >
multi2d<T> Chroma::CircularBufferArray< T >::q
private

Definition at line 400 of file circular_buffer.h.

◆ size_internal

template<typename T >
unsigned int Chroma::CircularBufferArray< T >::size_internal
private

Definition at line 399 of file circular_buffer.h.

◆ size_max

template<typename T >
unsigned int Chroma::CircularBufferArray< T >::size_max
private

Definition at line 398 of file circular_buffer.h.

◆ start

template<typename T >
unsigned int Chroma::CircularBufferArray< T >::start
private

Definition at line 401 of file circular_buffer.h.


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