RecoSim  1.0
 All Classes Files Functions Variables Enumerations
config_processor_name.h
1 
21 #ifndef CONFIG_PROCESSOR_NAME_H
22 #define CONFIG_PROCESSOR_NAME_H
23 
24 #include <string>
25 #include <set>
26 #include <map>
27 
28 using namespace std;
29 
31 
32  string processor_name;
33 
34  float static_power_coeff;
35  float idle_power_coeff;
36  float run_power_coeff;
37 
38 public:
39 
40  Config_processor_name(string processor_name_) {
41  processor_name = processor_name_;
42  static_power_coeff = 0;
43  idle_power_coeff = 0;
44  run_power_coeff = 0;
45  }
46 
47  Config_processor_name(string processor_name_, float static_power_coeff_, float idle_power_coeff_, float run_power_coeff_) {
48  processor_name = processor_name_;
49  static_power_coeff = static_power_coeff_;
50  idle_power_coeff = idle_power_coeff_;
51  run_power_coeff = run_power_coeff_;
52  }
53 
55  processor_name = string(cfg.processor_name);
56  static_power_coeff = cfg.static_power_coeff;
57  idle_power_coeff = cfg.idle_power_coeff;
58  run_power_coeff = cfg.run_power_coeff;
59  }
60 
62  processor_name = string(cfg->processor_name);
63  static_power_coeff = cfg->static_power_coeff;
64  idle_power_coeff = cfg->idle_power_coeff;
65  run_power_coeff = cfg->run_power_coeff;
66  }
67 
68  string toString() {
69  return processor_name;
70  }
71 
72  bool equals(Config_processor_name obj) {
73  return obj.processor_name.compare(processor_name) == 0;
74  }
75 
76  string getProcessorName() {
77  return processor_name;
78  }
79 
80  void setProcessor(string val) {
81  processor_name = val;
82  }
83 
84  void setStaticPowerCoeff(float val) {
85  static_power_coeff = val;
86  }
87 
88  float getStaticPowerCoeff() {
89  return static_power_coeff;
90  }
91 
92  void setIdlePowerCoeff(float val) {
93  idle_power_coeff = val;
94  }
95 
96  float getIdlePowerCoeff() {
97  return idle_power_coeff;
98  }
99 
100  void setRunPowerCoeff(float val) {
101  run_power_coeff = val;
102  }
103 
104  float getRunPowerCoeff() {
105  return run_power_coeff;
106  }
107 };
108 
109 #endif
Definition: config_processor_name.h:30