EMANE  1.2.1
EMANE::Utils::StatisticHistogramTable< Key, Counter > Class Template Reference

Utility class to make a two column statistic table where the first column is the table key and the second column is a count of key instances. More...

#include <statistichistogramtable.h>

Public Member Functions

 StatisticHistogramTable (StatisticRegistrar &registrar, const std::string &sTableName, const StatisticTableLabels &labels, const std::string &sDescription="")
 
void increment (const Key &key, Counter amount=1)
 

Detailed Description

template<typename Key, typename Counter = std::size_t>
class EMANE::Utils::StatisticHistogramTable< Key, Counter >

Utility class to make a two column statistic table where the first column is the table key and the second column is a count of key instances.

Definition at line 53 of file statistichistogramtable.h.

Constructor & Destructor Documentation

◆ StatisticHistogramTable()

template<typename Key , typename Counter >
EMANE::Utils::StatisticHistogramTable< Key, Counter >::StatisticHistogramTable ( StatisticRegistrar registrar,
const std::string &  sTableName,
const StatisticTableLabels labels,
const std::string &  sDescription = "" 
)

Creates a StatisticHistogramTable table

Parameters
registrarStatisticRegistrar reference
sTableNameTable name
labelsTable column names
sDescriptionTable description
Exceptions
RegistrarExceptionwhen a error occurs during registration.

Definition at line 34 of file statistichistogramtable.inl.

Member Function Documentation

◆ increment()

template<typename Key , typename Counter >
void EMANE::Utils::StatisticHistogramTable< Key, Counter >::increment ( const Key &  key,
Counter  amount = 1 
)

Increments a table key count

Parameters
keyTable key (row) to increment
amountAmount to increment by
Exceptions
StatisticTableExceptionwhen the row key is invalid

Definition at line 51 of file statistichistogramtable.inl.


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