#include <ringbuffer.h>

Ring buffer array template. This class implements a ring buffer using your preferred ARRAY type.
| ARRAYTYPE | Type of the array. | 
| RINGSIZE | Maximum number of elements in the ring buffer. | 
Classes | |
| class | IteratorTemplate | 
Public Types | |
| using | T = typename ARRAYTYPE::ValueType | 
| using | Iterator = IteratorTemplate< false > | 
| using | ConstIterator = IteratorTemplate< true > | 
Public Member Functions | |
| ResultRef< T > | Append (const T &t) | 
| ResultRef< T > | Append (T &&t) | 
| MAXON_ATTRIBUTE_FORCE_INLINE ResultPtr< T > | Append (const std::initializer_list< T > &values) | 
| const MAXON_ATTRIBUTE_FORCE_INLINE T & | operator[] (Int idx) const | 
| MAXON_ATTRIBUTE_FORCE_INLINE T & | operator[] (Int idx) | 
| const MAXON_ATTRIBUTE_FORCE_INLINE T * | GetFirst () const | 
| MAXON_ATTRIBUTE_FORCE_INLINE T * | GetFirst () | 
| const MAXON_ATTRIBUTE_FORCE_INLINE T * | GetLast () const | 
| MAXON_ATTRIBUTE_FORCE_INLINE T * | GetLast () | 
| void | Reset () | 
| void | Flush () | 
| ConstIterator | Begin () const | 
| Iterator | Begin () | 
| ConstIterator | End () const | 
| Iterator | End () | 
Private Attributes | |
| Int | _ringPos | 
| using T = typename ARRAYTYPE::ValueType | 
| using Iterator = IteratorTemplate<false> | 
| using ConstIterator = IteratorTemplate<true> | 
Adds a new element at the end of the buffer and initializes it with a copy of x.
| [in] | t | Value to be copied. | 
Adds a new element at the end of the buffer and moves the content of x to it.
| [in] | t | Value to be moved. | 
| MAXON_ATTRIBUTE_FORCE_INLINE ResultPtr<T> Append | ( | const std::initializer_list< T > & | values | ) | 
Appends new elements at the end of the array.
| [in] | values | Initializer list with values to be copied. | 
| const MAXON_ATTRIBUTE_FORCE_INLINE T& operator[] | ( | Int | idx | ) | const | 
Array (subscript) operator for non-const objects. Index 0 is the oldest entry.
| [in] | idx | Element index (if it's out of bounds you will get an error in debug code only, otherwise it will crash). | 
| MAXON_ATTRIBUTE_FORCE_INLINE T& operator[] | ( | Int | idx | ) | 
Array (subscript) operator for non-const objects. Index 0 is the oldest entry.
| [in] | idx | Element index (if it's out of bounds you will get an error in debug code only, otherwise it will crash). | 
| const MAXON_ATTRIBUTE_FORCE_INLINE T* GetFirst | ( | ) | const | 
Returns a pointer to the first element in the ring buffer (which is different from the first element in the array).
| MAXON_ATTRIBUTE_FORCE_INLINE T* GetFirst | ( | ) | 
Returns a pointer to the first element in the ring buffer (which is different from the first element in the array).
| const MAXON_ATTRIBUTE_FORCE_INLINE T* GetLast | ( | ) | const | 
Returns a pointer to the last element in the ring buffer (which is different from the last element in the array).
| MAXON_ATTRIBUTE_FORCE_INLINE T* GetLast | ( | ) | 
Returns a pointer to the last element in the ring buffer (which is different from the last element in the array).
| void Reset | ( | void | ) | 
Deletes all elements (calls destructors and frees memory).
| void Flush | ( | void | ) | 
Deletes all elements, but doesn't free memory (calls destructors though).
| ConstIterator Begin | ( | ) | const | 
| Iterator Begin | ( | ) | 
| ConstIterator End | ( | ) | const | 
| Iterator End | ( | ) | 
      
  | 
  private |