7 #ifndef _CircularBuffer_h_ 8 #define _CircularBuffer_h_ 52 bool write(
const ElementType * buffer,
unsigned long bufferSize,
unsigned long * newSize = 0,
53 unsigned long * previousSize = 0);
54 bool fill(ElementType value,
unsigned long count,
unsigned long * newSize = 0,
55 unsigned long * previousSize = 0);
56 unsigned long extract(ElementType * buffer,
unsigned long bufferSize);
74 const unsigned char mItemSize;
75 unsigned long mCapacity;
78 ElementType * mBufferBegin;
79 ElementType * mBufferEnd;
83 void pushBack(ElementType sample);
85 void eraseBegin(
unsigned long count);
89 #endif // _CircularBuffer_h_
unsigned long extract(ElementType *buffer, unsigned long bufferSize)
Definition: CircularBuffer.cpp:185
unsigned long getSize()
Definition: CircularBuffer.cpp:232
void initialize(unsigned long capacity)
Definition: CircularBuffer.cpp:51
Definition: CircularBuffer.h:26
char ElementType
Definition: CircularBuffer.h:30
CircularBuffer(unsigned long capacity=0)
Default constructor.
Definition: CircularBuffer.cpp:30
bool write(const ElementType *buffer, unsigned long bufferSize, unsigned long *newSize=0, unsigned long *previousSize=0)
Definition: CircularBuffer.cpp:72
bool fill(ElementType value, unsigned long count, unsigned long *newSize=0, unsigned long *previousSize=0)
Definition: CircularBuffer.cpp:136
~CircularBuffer()
Definition: CircularBuffer.cpp:43