join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
join::ScopedStats< Statistics > Class Template Reference

RAII guard that automatically calls start() on construction and stop() on destruction. More...

#include <statistics.hpp>

Public Types

using TimePoint = typename Statistics::TimePoint
 

Public Member Functions

 ScopedStats (Statistics &stats) noexcept
 construct the guard and immediately call start() on stats.
 
 ScopedStats (const ScopedStats &other)=delete
 copy constructor.
 
ScopedStatsoperator= (const ScopedStats &other)=delete
 copy assignment.
 
 ScopedStats (ScopedStats &&other)=delete
 move constructor.
 
ScopedStatsoperator= (ScopedStats &&other)=delete
 move assignment.
 
 ~ScopedStats () noexcept
 destructor.
 

Detailed Description

template<typename Statistics>
class join::ScopedStats< Statistics >

RAII guard that automatically calls start() on construction and stop() on destruction.

Member Typedef Documentation

◆ TimePoint

template<typename Statistics >
using join::ScopedStats< Statistics >::TimePoint = typename Statistics::TimePoint

Constructor & Destructor Documentation

◆ ScopedStats() [1/3]

template<typename Statistics >
join::ScopedStats< Statistics >::ScopedStats ( Statistics & stats)
inlineexplicitnoexcept

construct the guard and immediately call start() on stats.

Parameters
statsstatistics collector whose interval is to be bracketed.

◆ ScopedStats() [2/3]

template<typename Statistics >
join::ScopedStats< Statistics >::ScopedStats ( const ScopedStats< Statistics > & other)
delete

copy constructor.

Parameters
otherother object to copy.

◆ ScopedStats() [3/3]

template<typename Statistics >
join::ScopedStats< Statistics >::ScopedStats ( ScopedStats< Statistics > && other)
delete

move constructor.

Parameters
otherother object to move.

◆ ~ScopedStats()

template<typename Statistics >
join::ScopedStats< Statistics >::~ScopedStats ( )
inlinenoexcept

destructor.

Member Function Documentation

◆ operator=() [1/2]

template<typename Statistics >
ScopedStats & join::ScopedStats< Statistics >::operator= ( const ScopedStats< Statistics > & other)
delete

copy assignment.

Parameters
otherother object to copy.
Returns
a reference to the current object.

◆ operator=() [2/2]

template<typename Statistics >
ScopedStats & join::ScopedStats< Statistics >::operator= ( ScopedStats< Statistics > && other)
delete

move assignment.

Parameters
otherother object to move.
Returns
a reference to the current object.

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