32 #ifndef FILTERS_REALTIME_CIRCULAR_BUFFER_H_ 33 #define FILTERS_REALTIME_CIRCULAR_BUFFER_H_ 39 #include <boost/circular_buffer.hpp> 56 for (
unsigned int i = 0; i <
cb_.capacity(); i++)
58 cb_.push_back(default_val);
64 if (
cb_.capacity() == 0)
return;
77 if (
cb_.capacity() == 0)
return;
97 T&
at(
size_t index){
return cb_.at(index);};
103 boost::circular_buffer<T>
cb_;
106 #endif //#ifndef REALTIME_CIRCULAR_BUFFER_H_ RealtimeCircularBuffer(int size, const T &default_val)
void push_front(const T &item)
A realtime safe circular (ring) buffer.
void push_back(const T &item)
T & operator[](size_t index)
void set_capacity(unsigned int order, const T &value)
boost::circular_buffer< T > cb_