Represents a counter that encloses an integer value. More...
#include <daemon/common/counter.hpp>
Public Types | |
using | rep = uint64_t |
Public Member Functions | |
operator rep () const noexcept | |
Return the counter's value. More... | |
void | set (rep value) noexcept |
Replace the counter's value. More... | |
Protected Attributes | |
rep | m_value = 0 |
Represents a counter that encloses an integer value.
SimpleCounter is noncopyable, because increment should be called on the counter, not a copy of it. It's implicitly convertible to an integral type to be observed.
Definition at line 39 of file counter.hpp.
using nfd::SimpleCounter::rep = uint64_t |
Definition at line 42 of file counter.hpp.
|
inlinenoexcept |
Return the counter's value.
Definition at line 47 of file counter.hpp.
|
inlinenoexcept |
Replace the counter's value.
Definition at line 56 of file counter.hpp.
|
protected |
Definition at line 62 of file counter.hpp.