Holds information about the messages received by all instances of LogEvent.
More...
|
| void | reset () noexcept |
| | Clear the log. More...
|
| |
| int32_t | totEntries () const noexcept |
| | The number of entries added to the log. More...
|
| |
| int32_t | totBuffered () const noexcept |
| | The number of buffered entries. More...
|
| |
| const Entry & | last () const noexcept |
| | The last buffered entry. More...
|
| |
| const Entry & | last (int32_t nBack) const noexcept |
| | The n-th last buffered entry. More...
|
| |
| template<class Pred > |
| int32_t | findEntry (Pred oPred) const noexcept |
| | Find for a specific entry. More...
|
| |
| void | dump () const noexcept |
| |
Holds information about the messages received by all instances of LogEvent.
Only the last MsgLog::s_nMaxLastBufferedEntries entries are buffered and can be accessed with MsgLog::last(int32_t nBack).
◆ dump()
| void stmg::LogEvent::MsgLog::dump |
( |
| ) |
const |
|
noexcept |
◆ findEntry()
template<class Pred >
| int32_t stmg::LogEvent::MsgLog::findEntry |
( |
Pred |
oPred | ) |
const |
|
inlinenoexcept |
Find for a specific entry.
Visits all buffered entries from the last backwards and stops at the first entry that satisfies the predicate.
- Parameters
-
| oPred | The predicate to check for. |
- Returns
- -1 if no entry satisfies oPred or the param to pass to last(nBack).
◆ last() [1/2]
| const Entry& stmg::LogEvent::MsgLog::last |
( |
| ) |
const |
|
noexcept |
The last buffered entry.
Corresponds to the last message received by any instance of LogEvent. Is the same as calling last(0).
- Returns
- The last entry or an empty entry if totBuffered() is 0.
◆ last() [2/2]
| const Entry& stmg::LogEvent::MsgLog::last |
( |
int32_t |
nBack | ) |
const |
|
noexcept |
The n-th last buffered entry.
- Parameters
-
- Returns
- The last entry or an empty entry if nBack not smaller than totBuffered().
◆ reset()
| void stmg::LogEvent::MsgLog::reset |
( |
| ) |
|
|
noexcept |
◆ totBuffered()
| int32_t stmg::LogEvent::MsgLog::totBuffered |
( |
| ) |
const |
|
inlinenoexcept |
The number of buffered entries.
- Returns
- The number of buffered entries.
◆ totEntries()
| int32_t stmg::LogEvent::MsgLog::totEntries |
( |
| ) |
const |
|
inlinenoexcept |
The number of entries added to the log.
Since creation or the last reset().
- Returns
- The number of entries.
◆ s_nMaxLastBufferedEntries
| const int32_t stmg::LogEvent::MsgLog::s_nMaxLastBufferedEntries |
|
static |
The maximum number of entries that can be buffered.