OpenCurves  0.9
plotfunctioninfo.h
1 //
2 // author Kazys Stepanas
3 //
4 // Copyright (c) CSIRO 2015
5 //
6 #ifndef PLOTFUNCTIONINFO_H_
7 #define PLOTFUNCTIONINFO_H_
8 
9 #include "plotsconfig.h"
10 
11 #include "plotfunctionresult.h"
12 
17 {
18  double lastTime;
20  double total;
21  unsigned int count;
22  void *context;
23 
25  inline PlotFunctionInfo() { clear(); }
26 
28  inline void clear()
29  {
30  lastValue = lastTime = total = 0.0;
31  count = 0u;
32  context = nullptr;
33  }
34 };
35 
36 #endif // PLOTFUNCTIONINFO_H_
PlotFunctionResult lastValue
Last value at time lastTime.
Definition: plotfunctioninfo.h:19
void clear()
Clear sampling info.
Definition: plotfunctioninfo.h:28
void * context
Function specific context data.
Definition: plotfunctioninfo.h:22
Plot sampling progress information for PlotFunction.
Definition: plotfunctioninfo.h:16
unsigned int count
Number of samples taken so far.
Definition: plotfunctioninfo.h:21
PlotFunctionInfo()
Constructor.
Definition: plotfunctioninfo.h:25
double lastTime
Time of the last sample.
Definition: plotfunctioninfo.h:18
Result value from a PlotFunction.
Definition: plotfunctionresult.h:27
double total
Running total of the samples.
Definition: plotfunctioninfo.h:20