nfd::PacketCounter Class Reference

represents a counter of number of packets More...

#include <core/counter.hpp>

+ Inheritance diagram for nfd::PacketCounter:
+ Collaboration diagram for nfd::PacketCounter:

Public Types

typedef uint64_t rep
 

Public Member Functions

 operator rep () const
 observe the counter More...
 
PacketCounteroperator++ ()
 increment the counter by one More...
 
void set (rep value)
 replace the counter value More...
 

Protected Attributes

rep m_value
 

Detailed Description

represents a counter of number of packets

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

Definition at line 77 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.

PacketCounter& nfd::PacketCounter::operator++ ( )
inline

increment the counter by one

Definition at line 83 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.