33 |
|
|
34 |
#include <string> |
#include <string> |
35 |
#include <map> |
#include <map> |
36 |
|
#include <vector> |
37 |
#include "Value.h" |
#include "Value.h" |
38 |
|
|
39 |
class ConfigFile |
class ConfigFile |
40 |
{ |
{ |
41 |
//std::map<std::string,Chameleon> content_; |
std::multimap<std::string,Value> content_; |
42 |
std::map<std::string,Value> content_; |
typedef std::multimap<std::string,Value>::const_iterator content_iterator; |
43 |
|
|
44 |
public: |
public: |
45 |
ConfigFile(); |
ConfigFile(); |
46 |
ConfigFile(std::string const& configFile); |
ConfigFile(std::string const& configFile); |
47 |
bool Open(std::string const& configFile); |
bool Open(std::string const& configFile); |
48 |
|
|
49 |
|
std::string DumpConfig() const; |
50 |
|
|
51 |
Value const& GetValue(std::string const& section, std::string const& entry) const; |
Value const& GetValue(std::string const& section, std::string const& entry) const; |
52 |
|
std::vector<Value> GetValues(std::string const& section, std::string const& entry) const; |
53 |
|
|
54 |
Value const& GetValue(std::string const& section, std::string const& entry, double value); |
Value const& GetValue(std::string const& section, std::string const& entry, double value); |
55 |
Value const& GetValue(std::string const& section, std::string const& entry, std::string const& value); |
Value const& GetValue(std::string const& section, std::string const& entry, std::string const& value); |
56 |
}; |
}; |
57 |
|
|
58 |
|
namespace ConfigHelper |
59 |
|
{ |
60 |
|
std::map<std::string, std::string> ParseArguments(const std::string& args); |
61 |
|
int StringToInt(const std::string& input); |
62 |
|
} |
63 |
|
|
64 |
#endif |
#endif |
65 |
|
|