nfd::ByteCounter Class Reference

represents a counter of number of bytes More...

#include <daemon/common/counter.hpp>

+ Inheritance diagram for nfd::ByteCounter:
+ Collaboration diagram for nfd::ByteCounter:

Public Types

typedef uint64_t rep

Public Member Functions

 operator rep () const noexcept
 observe the counter More...
ByteCounteroperator+= (rep n) noexcept
 increase the counter More...
void set (rep value) noexcept
 replace the counter value More...

Protected Attributes

rep m_value = 0

Detailed Description

represents a counter of number of bytes

The counter value may wrap after exceeding the range of underlying integer type.

Definition at line 84 of file counter.hpp.

Member Typedef Documentation

typedef uint64_t nfd::SimpleCounter::rep

Definition at line 41 of file counter.hpp.

Member Function Documentation

nfd::SimpleCounter::operator rep ( ) const

observe the counter

Definition at line 45 of file counter.hpp.

ByteCounter& nfd::ByteCounter::operator+= ( rep  n)

increase the counter

Definition at line 90 of file counter.hpp.

void nfd::SimpleCounter::set ( rep  value)

replace the counter value

Definition at line 53 of file counter.hpp.

Member Data Documentation

rep nfd::SimpleCounter::m_value = 0

Definition at line 59 of file counter.hpp.