The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::statistics::StatisticSnapshot Class Reference

User-friendly wrapper around a double reference. This is like a std::reference_wrapper that connects one StatisticInstance with somebody else's double in another data structure. It lets SI's write their double data value directly into a contiguous std::vector sitting on top of the report archive system. This is done for improved performance and overall ease of use - a single std::vector<double> vs. individual StatisticInstance's scattered all over. More...

#include <StatisticSnapshot.hpp>

Public Member Functions

 StatisticSnapshot (double &value)
 
double takeSnapshot (const double value)
 

Detailed Description

User-friendly wrapper around a double reference. This is like a std::reference_wrapper that connects one StatisticInstance with somebody else's double in another data structure. It lets SI's write their double data value directly into a contiguous std::vector sitting on top of the report archive system. This is done for improved performance and overall ease of use - a single std::vector<double> vs. individual StatisticInstance's scattered all over.

Definition at line 17 of file StatisticSnapshot.hpp.

Constructor & Destructor Documentation

◆ StatisticSnapshot()

sparta::statistics::StatisticSnapshot::StatisticSnapshot ( double &  value)
inlineexplicit

Definition at line 20 of file StatisticSnapshot.hpp.

Member Function Documentation

◆ takeSnapshot()

double sparta::statistics::StatisticSnapshot::takeSnapshot ( const double  value)
inline

Definition at line 24 of file StatisticSnapshot.hpp.


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