Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Statistics::Statistic Class Referenceabstract

Base class for all statistics. More...

#include <Statistic.h>

Inheritance diagram for Simo::Statistics::Statistic:
Simo::Statistics::Count TestStatistic

Public Member Functions

virtual std::unique_ptr< Statistic > clone () const =0
 Create a new copy of this statistic.
virtual std::unique_ptr< Statistic > compute_delta (const Statistic &other) const =0
virtual void assign_from (const Statistic &other)=0
std::string_view name () const
void name (std::string_view new_name)
virtual glz::generic_u64 dump_representation () const =0

Protected Member Functions

 Statistic (const std::string_view name)

Protected Attributes

std::string name_

Detailed Description

Base class for all statistics.

Member Function Documentation

◆ clone()

virtual std::unique_ptr< Statistic > Simo::Statistics::Statistic::clone ( ) const
nodiscardpure virtual

Create a new copy of this statistic.

Implemented in Simo::Statistics::Count, and TestStatistic.

◆ compute_delta()

virtual std::unique_ptr< Statistic > Simo::Statistics::Statistic::compute_delta ( const Statistic & other) const
nodiscardpure virtual

Make difference of this statistic with other and return the different as a new instance

Implemented in Simo::Statistics::Count.


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