EMANE  1.2.1
EMANE::StatisticService Class Reference

#include <statisticservice.h>

Inheritance diagram for EMANE::StatisticService:
EMANE::Utils::Singleton< StatisticService >

Public Member Functions

void registerStatistic (BuildId buildId, const std::string &sName, Any::Type type, const StatisticProperties &properties, const std::string &sDescription, Statistic *pStatistic)
 
void registerTable (BuildId buildId, const std::string &sName, const StatisticProperties &properties, const std::string &sDescription, StatisticTablePublisher *pStatisticTablePublisher, std::function< void(StatisticTablePublisher *)> clearFunc)
 
std::map< std::string, EMANE::AnyqueryStatistic (BuildId, const std::vector< std::string > &names) const
 
void clearStatistic (BuildId, const std::vector< std::string > &names) const
 
std::map< std::string, std::pair< StatisticTableLabels, StatisticTableValues > > queryTable (BuildId, const std::vector< std::string > &names) const
 
void clearTable (BuildId, const std::vector< std::string > &names) const
 
StatisticManifest getStatisticManifest (BuildId id) const
 
StatisticTableManifest getTableManifest (BuildId id) const
 

Static Public Member Functions

static StatisticServiceinstance ()
 
static void destroy ()
 

Protected Member Functions

 StatisticService ()=default
 

Detailed Description

Definition at line 56 of file statisticservice.h.

Constructor & Destructor Documentation

◆ StatisticService()

EMANE::StatisticService::StatisticService ( )
protecteddefault

Member Function Documentation

◆ clearStatistic()

void EMANE::StatisticService::clearStatistic ( BuildId  buildId,
const std::vector< std::string > &  names 
) const

Definition at line 166 of file statisticservice.cc.

◆ clearTable()

void EMANE::StatisticService::clearTable ( BuildId  buildId,
const std::vector< std::string > &  names 
) const

Definition at line 325 of file statisticservice.cc.

◆ destroy()

static void EMANE::Utils::Singleton< StatisticService >::destroy ( )
inlinestaticinherited

Destroys the single instance of type T. Once destroyed it cannot be used or recreated. This is not a thread-safe method.

Definition at line 67 of file singleton.h.

◆ getStatisticManifest()

EMANE::StatisticManifest EMANE::StatisticService::getStatisticManifest ( BuildId  id) const

Definition at line 284 of file statisticservice.cc.

◆ getTableManifest()

EMANE::StatisticTableManifest EMANE::StatisticService::getTableManifest ( BuildId  id) const

Definition at line 304 of file statisticservice.cc.

◆ instance()

static StatisticService * EMANE::Utils::Singleton< StatisticService >::instance ( )
inlinestaticinherited

Provides thread-safe access to a single instance of type T. It does not provide thread-safety for T methods.

Returns
A pointer to T

Definition at line 56 of file singleton.h.

◆ queryStatistic()

std::map< std::string, EMANE::Any > EMANE::StatisticService::queryStatistic ( BuildId  buildId,
const std::vector< std::string > &  names 
) const

Definition at line 118 of file statisticservice.cc.

◆ queryTable()

std::map< std::string, std::pair< EMANE::StatisticTableLabels, EMANE::StatisticTableValues > > EMANE::StatisticService::queryTable ( BuildId  buildId,
const std::vector< std::string > &  names 
) const

Definition at line 229 of file statisticservice.cc.

◆ registerStatistic()

void EMANE::StatisticService::registerStatistic ( BuildId  buildId,
const std::string &  sName,
Any::Type  type,
const StatisticProperties properties,
const std::string &  sDescription,
Statistic pStatistic 
)

Register a statistic and take ownership

Parameters
buildIdBuild Id of the registering component
sNameName of the statistic
typeAny type of the statistic
propertiesStatistic properties
sDescriptionStatistic description
pStatisticPointer to the statistic
Exceptions
RegistrarExceptionwhen a error occurs during registration.

Definition at line 38 of file statisticservice.cc.

◆ registerTable()

void EMANE::StatisticService::registerTable ( BuildId  buildId,
const std::string &  sName,
const StatisticProperties properties,
const std::string &  sDescription,
StatisticTablePublisher pStatisticTablePublisher,
std::function< void(StatisticTablePublisher *)>  clearFunc 
)

Register a statistic table and take ownership

Parameters
buildIdBuild Id of the registering component
sNameName of the statistic table
propertiesStatistic properties
sDescriptionStatistic table description
pStatisticTablePublisherPointer to the statistic table publisher
clearFuncFunction object to excute as part of clear
Exceptions
RegistrarExceptionwhen a error occurs during registration.

Definition at line 78 of file statisticservice.cc.


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