NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::SimpleCounter Class Reference

represents a counter that encloses an integer value More...

#include <counter.hpp>

Inheritance diagram for nfd::SimpleCounter:

Public Types

typedef uint64_t rep
 

Public Member Functions

constexpr SimpleCounter ()
 
 SimpleCounter (const SimpleCounter &)=delete
 
SimpleCounteroperator= (const SimpleCounter &)=delete
 
 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 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 38 of file counter.hpp.

Member Typedef Documentation

§ rep

typedef uint64_t nfd::SimpleCounter::rep

Definition at line 41 of file counter.hpp.

Constructor & Destructor Documentation

§ SimpleCounter() [1/2]

constexpr nfd::SimpleCounter::SimpleCounter ( )
inline

Definition at line 44 of file counter.hpp.

References operator=().

§ SimpleCounter() [2/2]

nfd::SimpleCounter::SimpleCounter ( const SimpleCounter )
delete

Member Function Documentation

§ operator=()

SimpleCounter& nfd::SimpleCounter::operator= ( const SimpleCounter )
delete

§ operator rep()

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

observe the counter

Definition at line 56 of file counter.hpp.

References m_value.

§ set()

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

replace the counter value

Definition at line 64 of file counter.hpp.

References m_value.

Member Data Documentation

§ m_value

rep nfd::SimpleCounter::m_value
protected

The documentation for this class was generated from the following file: