CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace utils {
51 constexpr
size_t size()
const {
void push_back(const T &element)
Appends element to the end of the buffer, possibly overwriting existing elements.
Definition: CircularBuffer.h:40
size_t incrementNext()
Definition: CircularBuffer.h:72
size_t m_next
Definition: CircularBuffer.h:85
const size_t m_capacity
Definition: CircularBuffer.h:83
constexpr size_t truncateIndex(size_t index) const
Definition: CircularBuffer.h:78
A fixed size circular buffer.
Definition: CircularBuffer.h:29
T & operator[](size_t index)
Gets the element at index.
Definition: CircularBuffer.h:62
const T & operator[](size_t index) const
Gets the element at index.
Definition: CircularBuffer.h:67
std::vector< T > m_buffer
Definition: CircularBuffer.h:84
constexpr size_t size() const
Gets the size of the buffer.
Definition: CircularBuffer.h:51
Definition: AddressExtractionExtension.cpp:28
void push_back(T &&element)
Appends element to the end of the buffer, possibly overwriting existing elements.
Definition: CircularBuffer.h:45
constexpr size_t capacity() const
Gets the capacity of the buffer.
Definition: CircularBuffer.h:56
CircularBuffer(size_t size)
Creates a circular buffer with the specified size.
Definition: CircularBuffer.h:32