Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parameters.cpp
Go to the documentation of this file.
1 
14 #include "parameters.h"
15 
16 #include "Tools/evalexpr.h"
17 #include <regex.h>
18 
19 const std::string Parameters::class_name = "Parameters";
20 
21 //====================================================================
23  : m_vlevel(CommonParameters::Vlevel())
24 {
25  // default verbosity from common_parameters.
26 }
27 
28 
29 //====================================================================
30 void Parameters::set_bool(const string& key, const bool value)
31 { m_map_string[key] = value ? "true" : "false"; }
32 
33 void Parameters::set_double(const string& key, const double value)
34 { m_map_double[key] = value; }
35 
36 void Parameters::set_int(const string& key, const int value)
37 { m_map_int[key] = value; }
38 
39 void Parameters::set_string(const string& key, const string& value)
40 { m_map_string[key] = value; }
41 
42 void Parameters::set_double_vector(const string& key, const vector<double>& value)
43 { m_map_double_vector[key] = value; }
44 
45 void Parameters::set_int_vector(const string& key, const vector<int>& value)
46 { m_map_int_vector[key] = value; }
47 
48 void Parameters::set_string_vector(const string& key, const vector<string>& value)
49 { m_map_string_vector[key] = value; }
50 
51 void Parameters::set_Parameters(const string& key, const Parameters& value)
52 { m_map_parameters[key] = value; }
53 
55 { m_vlevel = value; }
56 
57 //====================================================================
58 
59 //----------------------------------------------------------------
60 // floating-point parameter values:
61 // processed by EvalExpr class that accepts
62 // literal values, arithmetic expressions, predefined symbols (e.g. pi).
63 // see Tools/evalexpr.h
64 //
65 
66 double Parameters::convert_to_double(const string& value) const
67 {
68  return EvalExpr(value).parse();
69 }
70 
71 
72 vector<double> Parameters::convert_to_double(const vector<string>& value) const
73 {
74  vector<double> v;
75  for (size_t i = 0; i < value.size(); ++i) {
76  v.push_back(convert_to_double(value[i]));
77  }
78  return v;
79 }
80 
81 
82 //----------------------------------------------------------------
83 // integer parameter values:
84 // [-+]{digits}
85 //
86 // example:
87 // 42
88 // -7
89 // +6
90 // - 99 <- not allowed. sign and digits are not spaced.
91 // 3 7 <- not allowed. only one number is accepted.
92 //
93 
94 namespace {
95  const char integer_pattern[] = "^[ \t]*([-+]?[0-9]+)[ \t]*$";
96 
97  regex_t regobj;
98 
99  void do_finalize()
100  {
101  regfree(&regobj);
102  }
103 
104 
105  bool do_init()
106  {
107  if (regcomp(&regobj, integer_pattern, REG_EXTENDED | REG_NEWLINE | REG_NOSUB) != 0) {
108  vout.crucial("Parameters: compilation of regular expression failed.\n");
109  return false;
110  }
111  atexit(do_finalize);
112  return true;
113  }
114 
115 
116  bool _init = do_init();
117 }
118 
119 int Parameters::convert_to_int(const string& value) const
120 {
121  // sanity check
122  if (_init && (regexec(&regobj, value.c_str(), 0, NULL, 0) == 0)) {
123  } else {
124  vout.crucial("%s: warning: irregular integer expression \"%s\".\n", class_name.c_str(), value.c_str());
125  exit(EXIT_FAILURE);
126  }
127 
128  return atoi(value.c_str());
129 }
130 
131 
132 vector<int> Parameters::convert_to_int(const vector<string>& value) const
133 {
134  vector<int> v;
135  for (size_t i = 0; i < value.size(); ++i) {
136  v.push_back(convert_to_int(value[i]));
137  }
138  return v;
139 }
140 
141 
142 //----------------------------------------------------------------
143 // boolean parameter values:
144 // true = { "true", "yes", "on", "1", positive integer values }
145 // false = otherwise
146 //
147 
148 bool Parameters::convert_to_bool(const string& value) const
149 {
150  if ((value == "true") || (value == "TRUE") || (value == "True") ||
151  (value == "yes") || (value == "YES") || (value == "Yes") ||
152  (value == "1") // for backward compatibility
153  ) {
154  return true;
155  } else if ((value == "false") || (value == "FALSE") || (value == "False") ||
156  (value == "no") || (value == "NO") || (value == "No") ||
157  (value == "0") // for backward compatibility
158  ) {
159  return false;
160  } else {
161  vout.crucial("%s: warning: unrecognized value for boolean parameter \"%s\".\n", class_name.c_str(), value.c_str());
162  exit(EXIT_FAILURE);
163  return false; // never reached
164  }
165 }
166 
167 
168 bool Parameters::convert_to_bool(int value) const
169 {
170  return value > 0;
171 }
172 
173 
174 //====================================================================
175 double Parameters::get_double(const string& key) const
176 {
177  map<string, double>::const_iterator p = m_map_double.find(key);
178  if (p != m_map_double.end()) {
179  return p->second;
180  }
181 
182  map<string, string>::const_iterator q = m_map_string.find(key);
183  if (q != m_map_string.end()) {
184  return convert_to_double(q->second);
185  }
186 
187  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
188  return double();
189 }
190 
191 
192 int Parameters::get_int(const string& key) const
193 {
194  map<string, int>::const_iterator p = m_map_int.find(key);
195  if (p != m_map_int.end()) {
196  return p->second;
197  }
198 
199  map<string, string>::const_iterator q = m_map_string.find(key);
200  if (q != m_map_string.end()) {
201  return convert_to_int(q->second);
202  }
203 
204  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
205  return int();
206 }
207 
208 
209 unsigned long Parameters::get_unsigned_long(const string& key) const
210 {
211  map<string, string>::const_iterator q = m_map_string.find(key);
212  if (q != m_map_string.end()) {
213  return strtoul(q->second.c_str(), NULL, 0);
214  }
215 
216  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
217  return 0;
218 }
219 
220 
221 string Parameters::get_string(const string& key) const
222 {
223  map<string, string>::const_iterator p = m_map_string.find(key);
224  if (p != m_map_string.end()) {
225  return p->second;
226  }
227 
228  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
229  return string();
230 }
231 
232 
233 bool Parameters::get_bool(const string& key) const
234 {
235  map<string, string>::const_iterator p = m_map_string.find(key);
236  if (p != m_map_string.end()) {
237  return convert_to_bool(p->second);
238  }
239 
240  map<string, int>::const_iterator q = m_map_int.find(key);
241  if (q != m_map_int.end()) {
242  return convert_to_bool(q->second);
243  }
244 
245  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
246  return false;
247 }
248 
249 
250 vector<double> Parameters::get_double_vector(const string& key) const
251 {
252  map<string, vector<double> >::const_iterator p = m_map_double_vector.find(key);
253  if (p != m_map_double_vector.end()) {
254  return p->second;
255  }
256 
257  map<string, vector<string> >::const_iterator q = m_map_string_vector.find(key);
258  if (q != m_map_string_vector.end()) {
259  return convert_to_double(q->second);
260  }
261 
262  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
263  return vector<double>();
264 }
265 
266 
267 vector<int> Parameters::get_int_vector(const string& key) const
268 {
269  map<string, vector<int> >::const_iterator p = m_map_int_vector.find(key);
270  if (p != m_map_int_vector.end()) {
271  return p->second;
272  }
273 
274  map<string, vector<string> >::const_iterator q = m_map_string_vector.find(key);
275  if (q != m_map_string_vector.end()) {
276  return convert_to_int(q->second);
277  }
278 
279  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
280  return vector<int>();
281 }
282 
283 
284 vector<string> Parameters::get_string_vector(const string& key) const
285 {
286  map<string, vector<string> >::const_iterator p = m_map_string_vector.find(key);
287  if (p != m_map_string_vector.end()) {
288  return p->second;
289  }
290 
291  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
292  return vector<string>();
293 }
294 
295 
296 Parameters Parameters::get_Parameters(const string& key) const
297 {
298  map<string, Parameters>::const_iterator p = m_map_parameters.find(key);
299  if (p != m_map_parameters.end()) {
300  return p->second;
301  }
302 
303  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
304  return Parameters();
305 }
306 
307 
309 {
310  map<string, Parameters>::iterator p = m_map_parameters.find(key);
311  if (p != m_map_parameters.end()) {
312  return p->second;
313  }
314 
315  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
316  return *this;
317 }
318 
319 
321 {
322  return m_vlevel;
323 }
324 
325 
326 //====================================================================
327 int Parameters::fetch_double(const string& key, double& value) const
328 {
329  map<string, double>::const_iterator p = m_map_double.find(key);
330  if (p != m_map_double.end()) {
331  value = p->second;
332  return EXIT_SUCCESS;
333  }
334 
335  map<string, string>::const_iterator q = m_map_string.find(key);
336  if (q != m_map_string.end()) {
337  value = convert_to_double(q->second);
338  return EXIT_SUCCESS;
339  }
340 
341  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
342  return EXIT_FAILURE;
343 }
344 
345 
346 int Parameters::fetch_int(const string& key, int& value) const
347 {
348  map<string, int>::const_iterator p = m_map_int.find(key);
349  if (p != m_map_int.end()) {
350  value = p->second;
351  return EXIT_SUCCESS;
352  }
353 
354  map<string, string>::const_iterator q = m_map_string.find(key);
355  if (q != m_map_string.end()) {
356  value = convert_to_int(q->second);
357  return EXIT_SUCCESS;
358  }
359 
360  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
361  return EXIT_FAILURE;
362 }
363 
364 
365 int Parameters::fetch_unsigned_long(const string& key, unsigned long& value) const
366 {
367  map<string, string>::const_iterator q = m_map_string.find(key);
368  if (q != m_map_string.end()) {
369  value = strtoul(q->second.c_str(), NULL, 0);
370  return EXIT_SUCCESS;
371  }
372 
373  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
374  return EXIT_FAILURE;
375 }
376 
377 
378 int Parameters::fetch_string(const string& key, string& value) const
379 {
380  map<string, string>::const_iterator p = m_map_string.find(key);
381  if (p != m_map_string.end()) {
382  value = p->second;
383  return EXIT_SUCCESS;
384  }
385 
386  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
387  return EXIT_FAILURE;
388 }
389 
390 
391 int Parameters::fetch_bool(const string& key, bool& value) const
392 {
393  map<string, string>::const_iterator p = m_map_string.find(key);
394  if (p != m_map_string.end()) {
395  value = convert_to_bool(p->second);
396  return EXIT_SUCCESS;
397  }
398 
399  map<string, int>::const_iterator q = m_map_int.find(key);
400  if (q != m_map_int.end()) {
401  value = convert_to_bool(q->second);
402  return EXIT_SUCCESS;
403  }
404 
405  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
406  return EXIT_FAILURE;
407 }
408 
409 
410 int Parameters::fetch_double_vector(const string& key, vector<double>& value) const
411 {
412  map<string, vector<double> >::const_iterator p = m_map_double_vector.find(key);
413  if (p != m_map_double_vector.end()) {
414  value = p->second;
415  return EXIT_SUCCESS;
416  }
417 
418  map<string, vector<string> >::const_iterator q = m_map_string_vector.find(key);
419  if (q != m_map_string_vector.end()) {
420  value = convert_to_double(q->second);
421  return EXIT_SUCCESS;
422  }
423 
424  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
425  return EXIT_FAILURE;
426 }
427 
428 
429 int Parameters::fetch_int_vector(const string& key, vector<int>& value) const
430 {
431  map<string, vector<int> >::const_iterator p = m_map_int_vector.find(key);
432  if (p != m_map_int_vector.end()) {
433  value = p->second;
434  return EXIT_SUCCESS;
435  }
436 
437  map<string, vector<string> >::const_iterator q = m_map_string_vector.find(key);
438  if (q != m_map_string_vector.end()) {
439  value = convert_to_int(q->second);
440  return EXIT_SUCCESS;
441  }
442 
443  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
444  return EXIT_FAILURE;
445 }
446 
447 
448 int Parameters::fetch_string_vector(const string& key, vector<string>& value) const
449 {
450  map<string, vector<string> >::const_iterator p = m_map_string_vector.find(key);
451  if (p != m_map_string_vector.end()) {
452  value = p->second;
453  return EXIT_SUCCESS;
454  }
455 
456  vout.crucial("%s: %s: key '%s' not found.\n", class_name.c_str(), __func__, key.c_str());
457  return EXIT_FAILURE;
458 }
459 
460 
462 {
463  value = m_vlevel;
464  return EXIT_SUCCESS;
465 }
466 
467 
468 //====================================================================
469 void Parameters::Register_double(const string& key, const double defvalue)
470 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
471 
472 void Parameters::Register_int(const string& key, const int defvalue)
473 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
474 
475 void Parameters::Register_string(const string& key, const string& defvalue)
476 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
477 
478 void Parameters::Register_double_vector(const string& key, const vector<double>& defvalue)
479 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
480 
481 void Parameters::Register_int_vector(const string& key, const vector<int>& defvalue)
482 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
483 
484 void Parameters::Register_string_vector(const string& key, const vector<string>& defvalue)
485 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
486 
487 void Parameters::Register_Parameters(const string& key, const Parameters& defvalue)
488 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
489 
490 void Parameters::Register_Parameters(const string& key, Parameters *const defvalue)
491 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
492 
493 void Parameters::Register_Parameters(const string& key, const unique_ptr<Parameters>& defvalue)
494 { vout.crucial("%s: %s: unsupported.\n", class_name.c_str(), __func__); }
495 
496 //====================================================================
497 bool Parameters::find_double(const string& key) const
498 { return m_map_double.find(key) != m_map_double.end() || m_map_string.find(key) != m_map_string.end(); }
499 
500 bool Parameters::find_int(const string& key) const
501 { return m_map_int.find(key) != m_map_int.end() || m_map_string.find(key) != m_map_string.end(); }
502 
503 bool Parameters::find_unsigned_long(const string& key) const
504 {
505  // unsigned long value is stored as a string.
506  return m_map_string.find(key) != m_map_string.end();
507 }
508 
509 
510 bool Parameters::find_string(const string& key) const
511 { return m_map_string.find(key) != m_map_string.end(); }
512 
513 bool Parameters::find_bool(const string& key) const
514 { return m_map_string.find(key) != m_map_string.end() || m_map_int.find(key) != m_map_int.end(); }
515 
516 bool Parameters::find_double_vector(const string& key) const
517 { return m_map_double_vector.find(key) != m_map_double_vector.end() || m_map_string_vector.find(key) != m_map_string_vector.end(); }
518 
519 bool Parameters::find_int_vector(const string& key) const
520 { return m_map_int_vector.find(key) != m_map_int_vector.end() || m_map_string_vector.find(key) != m_map_string_vector.end(); }
521 
522 bool Parameters::find_string_vector(const string& key) const
523 { return m_map_string_vector.find(key) != m_map_string_vector.end(); }
524 
525 bool Parameters::find_Parameters(const string& key) const
526 { return m_map_parameters.find(key) != m_map_parameters.end(); }
527 
528 bool Parameters::is_set(const string& key) const
529 {
530  return find_double(key) ||
531  find_int(key) ||
532  find_unsigned_long(key) ||
533  find_string(key) ||
534  find_bool(key) ||
535  find_double_vector(key) ||
536  find_int_vector(key) ||
537  find_string_vector(key) ||
538  find_Parameters(key)
539  ;
540 }
541 
542 
543 //====================================================================
544 void Parameters::print(const string& indent) const
545 {
546  printf("%sScalar<double>:\n", indent.c_str());
547  if (m_map_double.size() == 0) {
548  printf("%s (none)\n", indent.c_str());
549  } else {
550  for (map<string, double>::const_iterator p = m_map_double.begin(); p != m_map_double.end(); ++p) {
551  printf("%s key = %s\tvalue = %e\n", indent.c_str(), p->first.c_str(), p->second);
552  }
553  }
554 
555  printf("%sScalar<int>:\n", indent.c_str());
556  if (m_map_int.size() == 0) {
557  printf("%s (none)\n", indent.c_str());
558  } else {
559  for (map<string, int>::const_iterator p = m_map_int.begin(); p != m_map_int.end(); ++p) {
560  printf("%s key = %s\tvalue = %d\n", indent.c_str(), p->first.c_str(), p->second);
561  }
562  }
563 
564  printf("%sScalar<string>:\n", indent.c_str());
565  if (m_map_string.size() == 0) {
566  printf("%s (none)\n", indent.c_str());
567  } else {
568  for (map<string, string>::const_iterator p = m_map_string.begin(); p != m_map_string.end(); ++p) {
569  printf("%s key = %s\tvalue = %s\n", indent.c_str(), p->first.c_str(), p->second.c_str());
570  }
571  }
572 
573  printf("%sVector<double>:\n", indent.c_str());
574  if (m_map_double_vector.size() == 0) {
575  printf("%s (none)\n", indent.c_str());
576  } else {
577  for (map<string, vector<double> >::const_iterator p = m_map_double_vector.begin(); p != m_map_double_vector.end(); ++p) {
578  printf("%s key = %s\tvalue = [ \n", indent.c_str(), p->first.c_str());
579  for (size_t i = 0; i < p->second.size(); ++i) {
580  printf("%e, ", p->second[i]);
581  }
582  printf("]\n");
583  }
584  }
585 
586  printf("%sVector<int>:\n", indent.c_str());
587  if (m_map_int_vector.size() == 0) {
588  printf("%s (none)\n", indent.c_str());
589  } else {
590  for (map<string, vector<int> >::const_iterator p = m_map_int_vector.begin(); p != m_map_int_vector.end(); ++p) {
591  printf("%s key = %s\tvalue = [ \n", indent.c_str(), p->first.c_str());
592  for (size_t i = 0; i < p->second.size(); ++i) {
593  printf("%d, ", p->second[i]);
594  }
595  printf("]\n");
596  }
597  }
598 
599  printf("%sVector<string>:\n", indent.c_str());
600  if (m_map_string_vector.size() == 0) {
601  printf("%s (none)\n", indent.c_str());
602  } else {
603  for (map<string, vector<string> >::const_iterator p = m_map_string_vector.begin(); p != m_map_string_vector.end(); ++p) {
604  printf("%s key = %s\tvalue = [ ", indent.c_str(), p->first.c_str());
605  for (size_t i = 0; i < p->second.size(); ++i) {
606  printf("%s, ", p->second[i].c_str());
607  }
608  printf("]\n");
609  }
610  }
611 
612  printf("%sParameters:\n", indent.c_str());
613  if (m_map_parameters.size() == 0) {
614  printf("%s (none)\n", indent.c_str());
615  } else {
616  for (map<string, Parameters>::const_iterator p = m_map_parameters.begin(); p != m_map_parameters.end(); ++p) {
617  printf("%s key = %s, value:\n", indent.c_str(), p->first.c_str());
618  p->second.print(indent + " ");
619  }
620  }
621 }
622 
623 
624 //====================================================================
625 //============================================================END=====
map< string, vector< string > > m_map_string_vector
Definition: parameters.h:123
void set_Parameters(const string &key, const Parameters &value)
Definition: parameters.cpp:51
BridgeIO vout
Definition: bridgeIO.cpp:503
Parameters get_Parameters(const string &key) const
Definition: parameters.cpp:296
int fetch_bool(const string &key, bool &value) const
Definition: parameters.cpp:391
int fetch_double_vector(const string &key, vector< double > &value) const
Definition: parameters.cpp:410
int convert_to_int(const string &) const
Definition: parameters.cpp:119
void set_int_vector(const string &key, const vector< int > &value)
Definition: parameters.cpp:45
void set_int(const string &key, const int value)
Definition: parameters.cpp:36
static const std::string class_name
Definition: parameters.h:49
bool get_bool(const string &key) const
Definition: parameters.cpp:233
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
double parse()
Definition: evalexpr.cpp:177
bool find_bool(const string &key) const
Definition: parameters.cpp:513
bool find_unsigned_long(const string &key) const
Definition: parameters.cpp:503
void Register_int(const string &key, const int defvalue)
Definition: parameters.cpp:472
bool find_int_vector(const string &key) const
Definition: parameters.cpp:519
int get_int(const string &key) const
Definition: parameters.cpp:192
double convert_to_double(const string &) const
Definition: parameters.cpp:66
void Register_double_vector(const string &key, const vector< double > &defvalue)
Definition: parameters.cpp:478
Class for parameters.
Definition: parameters.h:46
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
void Register_Parameters(const string &key, const Parameters &defvalue)
Definition: parameters.cpp:487
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
Bridge::VerboseLevel m_vlevel
Definition: parameters.h:127
void set_bool(const string &key, const bool value)
Definition: parameters.cpp:30
unsigned long get_unsigned_long(const string &key) const
Definition: parameters.cpp:209
double get_double(const string &key) const
Definition: parameters.cpp:175
int fetch_int(const string &key, int &value) const
Definition: parameters.cpp:346
void set_VerboseLevel(const Bridge::VerboseLevel value)
Definition: parameters.cpp:54
bool find_Parameters(const string &key) const
Definition: parameters.cpp:525
EvalExpr class for algebraic expression in parameter strings.
Definition: evalexpr.h:39
Common parameter class: provides parameters as singleton.
void print(const string &indent="") const
Definition: parameters.cpp:544
Bridge::VerboseLevel get_VerboseLevel() const
Definition: parameters.cpp:320
void Register_double(const string &key, const double defvalue)
Definition: parameters.cpp:469
void Register_int_vector(const string &key, const vector< int > &defvalue)
Definition: parameters.cpp:481
map< string, Parameters > m_map_parameters
Definition: parameters.h:125
bool is_set(const string &key) const
Definition: parameters.cpp:528
bool find_double(const string &key) const
Definition: parameters.cpp:497
void crucial(const char *format,...)
Definition: bridgeIO.cpp:178
bool find_int(const string &key) const
Definition: parameters.cpp:500
void set_double_vector(const string &key, const vector< double > &value)
Definition: parameters.cpp:42
void Register_string(const string &key, const string &defvalue)
Definition: parameters.cpp:475
map< string, double > m_map_double
Definition: parameters.h:117
map< string, string > m_map_string
Definition: parameters.h:119
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
void Register_string_vector(const string &key, const vector< string > &defvalue)
Definition: parameters.cpp:484
int fetch_string_vector(const string &key, vector< string > &value) const
Definition: parameters.cpp:448
VerboseLevel
Definition: bridgeIO.h:42
map< string, vector< double > > m_map_double_vector
Definition: parameters.h:121
vector< double > get_double_vector(const string &key) const
Definition: parameters.cpp:250
vector< string > get_string_vector(const string &key) const
Definition: parameters.cpp:284
bool find_string(const string &key) const
Definition: parameters.cpp:510
map< string, int > m_map_int
Definition: parameters.h:118
map< string, vector< int > > m_map_int_vector
Definition: parameters.h:122
int fetch_unsigned_long(const string &key, unsigned long &value) const
Definition: parameters.cpp:365
string get_string(const string &key) const
Definition: parameters.cpp:221
int fetch_int_vector(const string &key, vector< int > &value) const
Definition: parameters.cpp:429
bool convert_to_bool(const string &) const
Definition: parameters.cpp:148
vector< int > get_int_vector(const string &key) const
Definition: parameters.cpp:267
bool find_double_vector(const string &key) const
Definition: parameters.cpp:516
bool find_string_vector(const string &key) const
Definition: parameters.cpp:522
int fetch_VerboseLevel(Bridge::VerboseLevel &value) const
Definition: parameters.cpp:461
void set_string_vector(const string &key, const vector< string > &value)
Definition: parameters.cpp:48