![]() |
Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
|
Fast logging of data in memory.

Classes | |
| class | elementa::utils::FastLog< Data > |
| A thread-safe circular buffer in memory to store logs. More... | |
Functions | |
| void | elementa::utils::FastLog< Data >::clear (void) |
| Clear the log. More... | |
| bool | elementa::utils::FastLog< Data >::empty (void) const |
| Return true if the log is empty. More... | |
| size_t | elementa::utils::FastLog< Data >::size (void) const |
| Return the number of logged items. More... | |
| void | elementa::utils::FastLog< Data >::add (const Data &data) |
| Add a log datum. More... | |
| void | elementa::utils::FastLog< Data >::extract (Datum &ld) |
| Extract the oldest datum or throw if none. More... | |
| class elementa::utils::FastLog |
A thread-safe circular buffer in memory to store logs.
Data must be default constructible and assignable.
Public Member Functions | |
| FastLog (size_t capacity) | |
| Create an empty log with the given capacity. More... | |
| void | clear (void) |
| Clear the log. More... | |
| bool | empty (void) const |
| Return true if the log is empty. More... | |
| size_t | size (void) const |
| Return the number of logged items. More... | |
| void | add (const Data &data) |
| Add a log datum. More... | |
| void | extract (Datum &ld) |
| Extract the oldest datum or throw if none. More... | |
|
inline |
| void elementa::utils::FastLog< Data >::clear | ( | void | ) |
| bool elementa::utils::FastLog< Data >::empty | ( | void | ) | const |
#include <elementa/utils/fastlog.h>
Return true if the log is empty.
| size_t elementa::utils::FastLog< Data >::size | ( | void | ) | const |
#include <elementa/utils/fastlog.h>
Return the number of logged items.
| void elementa::utils::FastLog< Data >::add | ( | const Data & | data | ) |
| void elementa::utils::FastLog< Data >::extract | ( | Datum & | ld | ) |
#include <elementa/utils/fastlog.h>
Extract the oldest datum or throw if none.