NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::SizeCounter< T > Class Template Reference

provides a counter that observes the size of a table More...

#include <counter.hpp>

Inheritance diagram for nfd::SizeCounter< T >:
Collaboration diagram for nfd::SizeCounter< T >:

Public Types

typedef size_t Rep
 

Public Member Functions

constexpr SizeCounter (const T *table=nullptr) noexcept
 
void observe (const T *table) noexcept
 
 operator Rep () const
 observe the counter More...
 

Detailed Description

template<typename T>
class nfd::SizeCounter< T >

provides a counter that observes the size of a table

Template Parameters
Ta type that provides a size() const member function

if table not specified in constructor, it can be added later by invoking observe()

Definition at line 103 of file counter.hpp.

Member Typedef Documentation

◆ Rep

template<typename T>
typedef size_t nfd::SizeCounter< T >::Rep

Definition at line 106 of file counter.hpp.

Constructor & Destructor Documentation

◆ SizeCounter()

template<typename T>
constexpr nfd::SizeCounter< T >::SizeCounter ( const T *  table = nullptr)
inlineexplicitnoexcept

Definition at line 109 of file counter.hpp.

Member Function Documentation

◆ observe()

template<typename T>
void nfd::SizeCounter< T >::observe ( const T *  table)
inlinenoexcept

Definition at line 115 of file counter.hpp.

◆ operator Rep()

template<typename T>
nfd::SizeCounter< T >::operator Rep ( ) const
inline

observe the counter

Definition at line 122 of file counter.hpp.


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