Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
SimpleMetricCounter Class Reference
+ Inheritance diagram for SimpleMetricCounter:
+ Collaboration diagram for SimpleMetricCounter:

Public Member Functions

 SimpleMetricCounter ()
 
virtual ~SimpleMetricCounter ()
 
void increment (double number) override
 
double get () const override
 
- Public Member Functions inherited from MetricCounter
 MetricCounter ()=default
 
virtual ~MetricCounter ()
 

Private Attributes

std::mutex m_mutex
 
double m_counter
 

Constructor & Destructor Documentation

◆ SimpleMetricCounter()

SimpleMetricCounter::SimpleMetricCounter ( )
inline

◆ ~SimpleMetricCounter()

virtual SimpleMetricCounter::~SimpleMetricCounter ( )
inlinevirtual

Member Function Documentation

◆ get()

double SimpleMetricCounter::get ( ) const
inlineoverridevirtual

Implements MetricCounter.

References m_counter, and m_mutex.

◆ increment()

void SimpleMetricCounter::increment ( double number)
inlineoverridevirtual

Implements MetricCounter.

References m_counter, and m_mutex.

Member Data Documentation

◆ m_counter

double SimpleMetricCounter::m_counter
private

Referenced by get(), and increment().

◆ m_mutex

std::mutex SimpleMetricCounter::m_mutex
mutableprivate

Referenced by get(), and increment().


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