RecoSim  1.0
 All Classes Files Functions Variables Enumerations
config_fct_point.h
Go to the documentation of this file.
1 
21 #ifndef CONFIG_FCT_POINT_H
22 #define CONFIG_FCT_POINT_H
23 
24 #include <string>
25 #include <set>
26 #include <map>
27 #include "utils.h"
28 
29 //using namespace std;
30 
32 
33  float voltage;
34  float frequency;
35 
36 public:
38  Config_fct_point(0,0);
39  }
40 
41  Config_fct_point(float voltage_, float frequency_) {
42  voltage = voltage_;
43  frequency = frequency_;
44  }
45 
47  voltage = cfg.voltage;
48  frequency = cfg.frequency;
49  }
50 
52  voltage = cfg.voltage;
53  frequency = cfg.frequency;
54  }
55 
57  voltage = cfg->voltage;
58  frequency = cfg->frequency;
59  }
60 
61  string toString() {
62  return "( " + Utils::ftoa(voltage) + " V, " + Utils::ftoa(frequency) + " Hz )";
63  }
64 
65  bool equals(Config_fct_point obj) {
66  return obj.voltage == voltage && obj.frequency == frequency;
67  }
68 
69  void setVoltage(float val) {
70  voltage = val;
71  }
72 
73  void setFrequency(float val) {
74  frequency = val;
75  }
76 
77  float getVoltage() {
78  return voltage;
79  }
80 
81  float getFrequency() {
82  return frequency;
83  }
84 };
85 
86 #endif
Definition: config_fct_point.h:31