RecoSim  1.0
 All Classes Files Functions Variables Enumerations
config_param_group.h
Go to the documentation of this file.
1 
21 #ifndef CONFIG_PARAM_GROUP_H
22 #define CONFIG_PARAM_GROUP_H
23 
24 #include <string>
25 #include <set>
26 #include <map>
27 #include <vector>
28 #include "config_fct_point.h"
29 
30 using namespace std;
31 
33 
34  string groupName;
35  bool commonDomain;
36  Config_fct_point *nominalFctPoint;
37  vector<Config_fct_point*>* powerFctList;
38 
39 public:
40 
41  Config_param_group(string groupName_, bool commonUnit_, Config_fct_point* nominalFctPoint_, vector<Config_fct_point*>* powerFctList_) {
42  groupName = groupName_;
43  commonDomain = commonUnit_;
44  nominalFctPoint = nominalFctPoint_;
45  powerFctList = powerFctList_;
46  }
47 
48  Config_param_group(string groupName) {
49  groupName = groupName;
50  commonDomain = false;
51  nominalFctPoint = new Config_fct_point(0,0);
52  powerFctList = new vector<Config_fct_point*>();
53  }
54 
56  groupName = cfg.groupName;
57  commonDomain = cfg.commonDomain;
58  nominalFctPoint = new Config_fct_point(cfg.nominalFctPoint);
59 
60  powerFctList = new vector<Config_fct_point*>();
61  for (unsigned int i=0; i<(unsigned int)cfg.powerFctList->size(); i++)
62  powerFctList->push_back(new Config_fct_point(cfg.powerFctList->at(i)));
63  }
64 
65  string toString() {
66  string act = groupName;
67  if (commonDomain == true)
68  act += " (c)";
69  return act;
70  }
71 
72  bool equals(Config_param_group cp) {
73  return (groupName.compare(cp.groupName) == 0);
74  }
75 
76  void setGroupName(string val) {
77  groupName = val;
78  }
79 
80  string getGroupName() {
81  return groupName;
82  }
83 
84  void setCommonDomain(bool val) {
85  commonDomain = val;
86  }
87 
88  bool isCommonDomain() {
89  return commonDomain;
90  }
91 
92  void setNominalFctPoint(Config_fct_point* val) {
93  nominalFctPoint = val;
94  }
95 
96  Config_fct_point& getNominalFctPoint() {
97  return *nominalFctPoint;
98  }
99 
100  void setFctPointList(vector<Config_fct_point*>* val) {
101  powerFctList = val;
102  }
103 
104  const vector<Config_fct_point*>& getFctPointList() {
105  return *powerFctList;
106  }
107 
108 };
109 
110 #endif
Definition: config_fct_point.h:31
Definition: config_param_group.h:32