|
Open Model Railroad Network (OpenMRN)
|
Create an instance of this type for each object whose age needs to be measured with the GlobalLruCounter. More...
#include <LruCounter.hxx>
Public Member Functions | |
| unsigned | value () |
| void | tick (const GlobalLruCounter &global) |
| Increments the local counter. | |
| void | touch () |
| Signals that the object has been used now. | |
Private Attributes | |
| T | counter_ {0} |
| Internal counter. | |
Create an instance of this type for each object whose age needs to be measured with the GlobalLruCounter.
For further details, see { }. T is the storage type, typically uint8_t or uint16_t.
Definition at line 126 of file LruCounter.hxx.
|
inline |
Increments the local counter.
| global | reference to the global tick counter. All calls must use the same global counter. |
Definition at line 138 of file LruCounter.hxx.
|
inline |
Signals that the object has been used now.
Definition at line 159 of file LruCounter.hxx.
|
inline |
Definition at line 130 of file LruCounter.hxx.
|
private |
Internal counter.
Definition at line 166 of file LruCounter.hxx.