27 #ifndef CIRCULAR_BUFFER_H 28 #define CIRCULAR_BUFFER_H 134 for (
size_t i = 0; i < size_; i++)
135 mem_[i] = src.mem_[i];
157 mem_ =
new T[new_size];
158 for (
size_t i = 0; i < new_size; i++)
171 return mem_[get_index(at)];
198 size_t get_index(
size_t at)
const void resize(size_t new_size, T v)
Definition: circular_buffer.h:151
CircularBuffer(const CircularBuffer &src)
Definition: circular_buffer.h:127
T const & operator*() const
Definition: circular_buffer.h:92
An iterable circular buffer.
Definition: circular_buffer.h:42
const_iterator(const const_iterator &src)
Definition: circular_buffer.h:56
size_t size() const
Definition: circular_buffer.h:187
const_iterator & operator++()
Definition: circular_buffer.h:67
T & operator[](size_t at)
Definition: circular_buffer.h:168
Constant iterator class.
Definition: circular_buffer.h:49
CircularBuffer()
Definition: circular_buffer.h:118
Global namespace holding all classes of the SPORE NEST module.
Definition: circular_buffer.h:31
~CircularBuffer()
Definition: circular_buffer.h:142
const_iterator & operator--()
Definition: circular_buffer.h:78