0.2.0
|
A buffer which is overwriting itself from the start when full. More...
Classes | |
class | ConstIterator |
Const iterator. More... | |
class | ConstReverseIterator |
Const reverse iterator. More... | |
class | Iterator |
Iterator. More... | |
class | ReverseIterator |
Reverse Iterator. More... | |
Public Member Functions | |
T & | at (size_t pos) |
Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown. | |
const T & | at (size_t pos) const |
Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown. | |
T & | back () |
Returns a reference to the last element in the container. Calling back on an empty container causes undefined behavior. | |
const T & | back () const |
Returns a reference to the last element in the container. Calling back on an empty container causes undefined behavior.Reference to the last element. | |
Iterator | begin () |
Returns an iterator to the first element of the vector. | |
ConstIterator | begin () const |
Returns an iterator to the first element of the vector. | |
size_t | capacity () const |
Returns the number of elements that can be held in currently allocated storage. | |
ConstIterator | cbegin () const |
Returns an iterator to the first element of the vector. | |
ConstIterator | cend () const |
Returns an iterator to the element following the last element of the vector. | |
void | clear () |
Erases all elements from the container. After this call, size() returns zero. | |
ConstReverseIterator | crbegin () const |
Returns a reverse iterator to the first element of the reversed vector. | |
ConstReverseIterator | crend () const |
Returns a reverse iterator to the element following the last element of the reversed vector. | |
T * | data () |
Returns a pointer to the raw data array (not in scrolled order) | |
const T * | data () const |
Returns a pointer to the raw data array (not in scrolled order) | |
bool | empty () const |
Checks if the container has no elements. | |
Iterator | end () |
Returns an iterator to the element following the last element of the vector. | |
ConstIterator | end () const |
Returns an iterator to the element following the last element of the vector. | |
T & | front () |
Returns a reference to the first element in the container. Calling front on an empty container is undefined. | |
const T & | front () const |
Returns a reference to the first element in the container. Calling front on an empty container is undefined. | |
bool | full () const |
Checks if the container is full (never full when infinite buffer) | |
std::string | getRawString () const |
Converts the raw buffer to a string. | |
bool | isInfiniteBuffer () const |
Returns whether the buffer is infinite and growing. | |
T | max () const |
Returns the largest value in the buffer. | |
T | min () const |
Returns the smallest value in the buffer. | |
int | offset () const |
Returns the data index of the first element in the buffer. | |
void | pop_front () |
Removes the first element of the container. | |
void | push_back (const T &value) |
Appends the given element value to the end of the container. | |
ReverseIterator | rbegin () |
Returns a reverse iterator to the first element of the reversed vector. | |
ConstReverseIterator | rbegin () const |
Returns a reverse iterator to the first element of the reversed vector. | |
ReverseIterator | rend () |
Returns a reverse iterator to the element following the last element of the reversed vector. | |
ConstReverseIterator | rend () const |
Returns a reverse iterator to the element following the last element of the reversed vector. | |
void | reserve (size_t new_cap) |
Increase the capacity of the vector to a value that's greater or equal to new_cap. | |
void | resize (size_t targetSize) |
Resizes the buffer to the specified size. | |
ScrollingBuffer (size_t maxSize=0) | |
Reserves space for the buffer but does not fill the buffer with values. | |
ScrollingBuffer (std::initializer_list< T > init) | |
Constructs a new container with the contents of the initializer list init. | |
size_t | size () const |
Returns the number of elements in the container. | |
A buffer which is overwriting itself from the start when full.
T | Type of data stored in the buffer |
_Padding | The padding are empty values at the start of the buffer to prevent overriding the start value in multithreaded applications |
|
inlineexplicit |
Reserves space for the buffer but does not fill the buffer with values.
[in] | maxSize | The maximum size of the scrolling buffer |
|
inline |
Constructs a new container with the contents of the initializer list init.
[in] | init | initializer list to initialize the elements of the container with |
|
inline |
Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.
[in] | pos | position of the element to return |
|
inline |
Returns a reference to the element at specified location pos, with bounds checking. If pos is not within the range of the container, an exception of type std::out_of_range is thrown.
[in] | pos | position of the element to return |
|
inline |
Returns a reference to the last element in the container. Calling back on an empty container causes undefined behavior.
|
inline |
Returns a reference to the last element in the container. Calling back on an empty container causes undefined behavior.Reference to the last element.
|
inline |
Returns an iterator to the first element of the vector.
If the buffer is empty, the returned iterator will be equal to end().
|
inline |
Returns an iterator to the first element of the vector.
If the buffer is empty, the returned iterator will be equal to end().
|
inline |
Returns an iterator to the first element of the vector.
If the buffer is empty, the returned iterator will be equal to end().
|
inline |
Returns an iterator to the element following the last element of the vector.
This element acts as a placeholder; attempting to access it results in undefined behavior.
|
inline |
Returns a reverse iterator to the first element of the reversed vector.
It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to rend().
|
inline |
Returns a reverse iterator to the element following the last element of the reversed vector.
It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inline |
Returns an iterator to the element following the last element of the vector.
This element acts as a placeholder; attempting to access it results in undefined behavior.
|
inline |
Returns an iterator to the element following the last element of the vector.
This element acts as a placeholder; attempting to access it results in undefined behavior.
|
inline |
Returns a reference to the first element in the container. Calling front on an empty container is undefined.
|
inline |
Returns a reference to the first element in the container. Calling front on an empty container is undefined.
|
inline |
Appends the given element value to the end of the container.
[in] | value | the value of the element to append |
|
inline |
Returns a reverse iterator to the first element of the reversed vector.
It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to rend().
|
inline |
Returns a reverse iterator to the first element of the reversed vector.
It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to rend().
|
inline |
Returns a reverse iterator to the element following the last element of the reversed vector.
It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inline |
Returns a reverse iterator to the element following the last element of the reversed vector.
It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
inline |
Increase the capacity of the vector to a value that's greater or equal to new_cap.
new_cap | New capacity of the vector, in number of elements |
|
inline |
Resizes the buffer to the specified size.
[in] | targetSize | The new buffer size (0 for infinite buffer) |