-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatisticsmachine.h
More file actions
47 lines (32 loc) · 844 Bytes
/
statisticsmachine.h
File metadata and controls
47 lines (32 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* statisticsmachine.h
* PhoenixSim
*
* Created by Johnnie Chan on 6/30/11.
* Copyright 2011 Johnnie Chan. All rights reserved.
*
*/
#ifndef __STATISTICSMACHINE_H__
#define __STATISTICSMACHINE_H__
#include <iostream>
#include <string>
namespace PhoenixSim
{
class StatisticsMachine
{
public:
StatisticsMachine();
~StatisticsMachine();
virtual void RecordValue(const double value) = 0;
virtual double ComputeValue() const = 0;
void SetName(std::string newName);
friend std::ostream& operator<<(std::ostream& os, PhoenixSim::StatisticsMachine const &stat);
protected:
void SetLabel(std::string newLabel);
private:
std::string name;
std::string label;
};
std::ostream& operator <<(std::ostream& os, StatisticsMachine const &stat);
}
#endif // __STATISTICSMACHINE_H__