Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
swri_math_util::GenRingBuffer< T > Class Template Reference

#include <generic_ring_buffer.h>

Inheritance diagram for swri_math_util::GenRingBuffer< T >:
Inheritance graph
[legend]

Classes

struct  ctr
 

Public Member Functions

void clear ()
 
 GenRingBuffer ()
 
 GenRingBuffer (int NumElements2Alloc)
 
 GenRingBuffer (const GenRingBuffer< T > &src)
 
virtual T * get (int i=0) const
 
T * getLoad () const
 
T * getRaw (int i) const
 
T * getTail (int i=0) const
 
bool indexValid (int i)
 
void load (const T &newElem)
 
void load1 (T newElem)
 
int MaxSize () const
 
GenRingBuffer< T > & operator= (const GenRingBuffer< T > &src)
 
virtual T * operator[] (int i)
 
T * pop ()
 
void ResizeBuffer (int newSize)
 
int size () const
 
virtual ~GenRingBuffer ()
 

Protected Member Functions

void realloc_mem (int NumElements2Alloc)
 

Private Member Functions

ctralloc_mem (int NumElems)
 
bool copy_elems (ctr *dest, int MaxNum2Copy)
 
void copyRB (GenRingBuffer< T > &src)
 
void incConsumePtr ()
 
void incLoadPtr ()
 
void init_array ()
 
void push (const T &newElem)
 

Private Attributes

ctrconsumePtr
 
ctrHEAD
 
ctrloadPtr
 
int MaxNumElements
 
int NumElements
 
ctrTAIL
 
ctrtemp
 

Detailed Description

template<class T>
class swri_math_util::GenRingBuffer< T >

Definition at line 43 of file generic_ring_buffer.h.

Constructor & Destructor Documentation

◆ GenRingBuffer() [1/3]

template<class T>
swri_math_util::GenRingBuffer< T >::GenRingBuffer ( )
inline

Definition at line 47 of file generic_ring_buffer.h.

◆ GenRingBuffer() [2/3]

template<class T>
swri_math_util::GenRingBuffer< T >::GenRingBuffer ( int  NumElements2Alloc)
inlineexplicit

Definition at line 54 of file generic_ring_buffer.h.

◆ GenRingBuffer() [3/3]

template<class T>
swri_math_util::GenRingBuffer< T >::GenRingBuffer ( const GenRingBuffer< T > &  src)
inline

Definition at line 61 of file generic_ring_buffer.h.

◆ ~GenRingBuffer()

template<class T>
virtual swri_math_util::GenRingBuffer< T >::~GenRingBuffer ( )
inlinevirtual

Definition at line 75 of file generic_ring_buffer.h.

Member Function Documentation

◆ alloc_mem()

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::alloc_mem ( int  NumElems)
inlineprivate

Definition at line 249 of file generic_ring_buffer.h.

◆ clear()

template<class T>
void swri_math_util::GenRingBuffer< T >::clear ( )
inline

Definition at line 164 of file generic_ring_buffer.h.

◆ copy_elems()

template<class T>
bool swri_math_util::GenRingBuffer< T >::copy_elems ( ctr dest,
int  MaxNum2Copy 
)
inlineprivate

Definition at line 204 of file generic_ring_buffer.h.

◆ copyRB()

template<class T>
void swri_math_util::GenRingBuffer< T >::copyRB ( GenRingBuffer< T > &  src)
inlineprivate

Definition at line 271 of file generic_ring_buffer.h.

◆ get()

template<class T>
virtual T* swri_math_util::GenRingBuffer< T >::get ( int  i = 0) const
inlinevirtual

Definition at line 100 of file generic_ring_buffer.h.

◆ getLoad()

template<class T>
T* swri_math_util::GenRingBuffer< T >::getLoad ( ) const
inline

Definition at line 116 of file generic_ring_buffer.h.

◆ getRaw()

template<class T>
T* swri_math_util::GenRingBuffer< T >::getRaw ( int  i) const
inline

Definition at line 107 of file generic_ring_buffer.h.

◆ getTail()

template<class T>
T* swri_math_util::GenRingBuffer< T >::getTail ( int  i = 0) const
inline

Definition at line 122 of file generic_ring_buffer.h.

◆ incConsumePtr()

template<class T>
void swri_math_util::GenRingBuffer< T >::incConsumePtr ( )
inlineprivate

Definition at line 244 of file generic_ring_buffer.h.

◆ incLoadPtr()

template<class T>
void swri_math_util::GenRingBuffer< T >::incLoadPtr ( )
inlineprivate

Definition at line 239 of file generic_ring_buffer.h.

◆ indexValid()

template<class T>
bool swri_math_util::GenRingBuffer< T >::indexValid ( int  i)
inline

Definition at line 159 of file generic_ring_buffer.h.

◆ init_array()

template<class T>
void swri_math_util::GenRingBuffer< T >::init_array ( )
inlineprivate

Definition at line 259 of file generic_ring_buffer.h.

◆ load()

template<class T>
void swri_math_util::GenRingBuffer< T >::load ( const T &  newElem)
inline

Definition at line 133 of file generic_ring_buffer.h.

◆ load1()

template<class T>
void swri_math_util::GenRingBuffer< T >::load1 ( newElem)
inline

Definition at line 138 of file generic_ring_buffer.h.

◆ MaxSize()

template<class T>
int swri_math_util::GenRingBuffer< T >::MaxSize ( ) const
inline

Definition at line 90 of file generic_ring_buffer.h.

◆ operator=()

template<class T>
GenRingBuffer<T>& swri_math_util::GenRingBuffer< T >::operator= ( const GenRingBuffer< T > &  src)
inline

Definition at line 69 of file generic_ring_buffer.h.

◆ operator[]()

template<class T>
virtual T* swri_math_util::GenRingBuffer< T >::operator[] ( int  i)
inlinevirtual

Definition at line 95 of file generic_ring_buffer.h.

◆ pop()

template<class T>
T* swri_math_util::GenRingBuffer< T >::pop ( )
inline

Definition at line 143 of file generic_ring_buffer.h.

◆ push()

template<class T>
void swri_math_util::GenRingBuffer< T >::push ( const T &  newElem)
inlineprivate

Definition at line 223 of file generic_ring_buffer.h.

◆ realloc_mem()

template<class T>
void swri_math_util::GenRingBuffer< T >::realloc_mem ( int  NumElements2Alloc)
inlineprotected

Definition at line 170 of file generic_ring_buffer.h.

◆ ResizeBuffer()

template<class T>
void swri_math_util::GenRingBuffer< T >::ResizeBuffer ( int  newSize)
inline

Definition at line 80 of file generic_ring_buffer.h.

◆ size()

template<class T>
int swri_math_util::GenRingBuffer< T >::size ( ) const
inline

Definition at line 85 of file generic_ring_buffer.h.

Member Data Documentation

◆ consumePtr

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::consumePtr
private

Definition at line 198 of file generic_ring_buffer.h.

◆ HEAD

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::HEAD
private

Definition at line 195 of file generic_ring_buffer.h.

◆ loadPtr

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::loadPtr
private

Definition at line 197 of file generic_ring_buffer.h.

◆ MaxNumElements

template<class T>
int swri_math_util::GenRingBuffer< T >::MaxNumElements
private

Definition at line 201 of file generic_ring_buffer.h.

◆ NumElements

template<class T>
int swri_math_util::GenRingBuffer< T >::NumElements
private

Definition at line 200 of file generic_ring_buffer.h.

◆ TAIL

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::TAIL
private

Definition at line 196 of file generic_ring_buffer.h.

◆ temp

template<class T>
ctr* swri_math_util::GenRingBuffer< T >::temp
private

Definition at line 194 of file generic_ring_buffer.h.


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


swri_math_util
Author(s): Marc Alban
autogenerated on Sat Jan 21 2023 03:13:11