nfd::ByteCounter Class Reference

represents a counter of number of bytes More...

#include <counter.hpp>

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

Public Types

typedef uint64_t rep
 

Public Member Functions

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

Protected Attributes

rep m_value
 

Detailed Description

represents a counter of number of bytes

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

Definition at line 95 of file counter.hpp.

Member Typedef Documentation

typedef uint64_t nfd::SimpleCounter::rep
inherited

Definition at line 41 of file counter.hpp.

Member Function Documentation

nfd::SimpleCounter::operator rep ( ) const
inlineinherited

observe the counter

Definition at line 56 of file counter.hpp.

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

increase the counter

Definition at line 101 of file counter.hpp.

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

replace the counter value

Definition at line 64 of file counter.hpp.

Member Data Documentation

rep nfd::SimpleCounter::m_value
protectedinherited

Definition at line 70 of file counter.hpp.