33 #ifndef EMANESTATISTICSERVICE_HEADER_ 34 #define EMANESTATISTICSERVICE_HEADER_ 73 const std::string & sName,
76 const std::string & sDescription,
94 const std::string & sName,
96 const std::string & sDescription,
101 std::map<std::string,EMANE::Any>
106 std::map<std::string,std::pair<StatisticTableLabels,StatisticTableValues>>
120 using StatisticStore =
121 std::map<std::string,std::pair<std::unique_ptr<Statistic>,
StatisticInfo>>;
123 using BuildIdStatisticStore = std::map<BuildId,StatisticStore>;
124 BuildIdStatisticStore buildIdStatisticStore_;
127 std::map<std::string,std::tuple<std::unique_ptr<StatisticTablePublisher>,
129 std::function<void(StatisticTablePublisher *)>>>;
131 using BuildIdTableStore = std::map<BuildId,TableStore>;
132 BuildIdTableStore buildIdTableStore_;
138 #endif // EMANESTATISTICSERVICE_HEADER_
A StatisticTablePublisher produces two dimensional tables of Anys.
void clearStatistic(BuildId, const std::vector< std::string > &names) const
Ensure a class only has one instance, and provide a global point of access to it. ...
std::vector< StatisticInfo > StatisticManifest
std::vector< StatisticTableInfo > StatisticTableManifest
std::map< std::string, std::pair< StatisticTableLabels, StatisticTableValues > > queryTable(BuildId, const std::vector< std::string > &names) const
StatisticManifest getStatisticManifest(BuildId id) const
Holds name, type, property and description of a Statistic.
void registerStatistic(BuildId buildId, const std::string &sName, Any::Type type, const StatisticProperties &properties, const std::string &sDescription, Statistic *pStatistic)
StatisticTableManifest getTableManifest(BuildId id) const
The Statistic interface is the base class of all statistics. It provided methods to access and clear ...
StatisticService()=default
Holds name, property and description of a StatisticTable.
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::Any > queryStatistic(BuildId, const std::vector< std::string > &names) const
void clearTable(BuildId, const std::vector< std::string > &names) const