Simpact Cyan
Population based event driven simulation using mNRM
configwriter.h
1 #ifndef CONFIGWRITER_H
2 
3 #define CONFIGWRITER_H
4 
5 #include "booltype.h"
6 #include <stdint.h>
7 #include <vector>
8 #include <map>
9 
10 class ConfigWriter
11 {
12 public:
13  ConfigWriter();
14  virtual ~ConfigWriter();
15 
16  bool_t addKey(const std::string &key, double value);
17  bool_t addKey(const std::string &key, const std::vector<double> &values);
18  bool_t addKey(const std::string &key, int value);
19  bool_t addKey(const std::string &key, int64_t value);
20  bool_t addKey(const std::string &key, bool value);
21  bool_t addKey(const std::string &key, const char *pStr);
22  bool_t addKey(const std::string &key, const std::string &value);
23 
24  void getKeys(std::vector<std::string> &keys) const;
25  bool_t getKeyValue(const std::string &key, std::string &value) const;
26 private:
27  std::map<std::string,std::string> m_keyValues;
28 };
29 
30 #endif // CONFIGWRITER_H
Type to return true/false with error description.
Definition: booltype.h:25