|
|
The single bounded buffer holding every log line the viewer retains. More...
#include <ArmarXGui/gui-plugins/LoggingPlugin/ArmarXLogViewer/LogStore.h>
Public Member Functions | |
| LogSeq | append (const LogMessage &message) |
Append message, deriving its display data, and return its sequence number. | |
| const StoredLogEntry & | at (LogSeq seq) const |
| Only valid if contains(seq). | |
| void | clear () |
| Drop everything. | |
| bool | contains (LogSeq seq) const |
| LogSeq | endSeq () const |
| One past the sequence number of the newest retained entry. | |
| LogSeq | firstSeq () const |
| Sequence number of the oldest retained entry. | |
| LogStore (std::size_t maxEntries) | |
| std::size_t | size () const |
| bool | trim () |
| Drop the oldest entries until the bound is met. | |
The single bounded buffer holding every log line the viewer retains.
Filters do not own their messages: each LogTableModel keeps a vector of LogSeq into this store. A message accepted by "All Messages", by its logging group filter and by its component filter is therefore stored – and has its display data derived – once instead of three times.
GUI thread only, like the rest of the viewer's model state. LogViewer::writeLog runs on an Ice dispatch thread but only appends to its own staging queue; everything reaching the store goes through insertPendingEntries on the GUI thread.
Definition at line 62 of file LogStore.h.
|
explicit |
Definition at line 79 of file LogStore.cpp.
| LogSeq append | ( | const LogMessage & | message | ) |
Append message, deriving its display data, and return its sequence number.
Definition at line 84 of file LogStore.cpp.
Here is the call graph for this function:| const StoredLogEntry & at | ( | LogSeq | seq | ) | const |
Only valid if contains(seq).
Definition at line 129 of file LogStore.cpp.
| void clear | ( | ) |
Drop everything.
Sequence numbers keep counting up, so references to the discarded entries stay invalid rather than aliasing new ones.
Definition at line 141 of file LogStore.cpp.
Here is the call graph for this function:| bool contains | ( | LogSeq | seq | ) | const |
| LogSeq endSeq | ( | ) | const |
One past the sequence number of the newest retained entry.
Definition at line 117 of file LogStore.cpp.
Here is the caller graph for this function:| LogSeq firstSeq | ( | ) | const |
Sequence number of the oldest retained entry.
Definition at line 111 of file LogStore.cpp.
| std::size_t size | ( | ) | const |
| bool trim | ( | ) |
Drop the oldest entries until the bound is met.
Returns true if anything was dropped, in which case firstSeq() has advanced and every model has to discard the rows below it (see LogTableModel::dropRowsBefore).
Definition at line 97 of file LogStore.cpp.