27 lines
381 B
C++
27 lines
381 B
C++
|
#include <map>
|
||
|
#include <string>
|
||
|
#include <fstream>
|
||
|
|
||
|
#ifndef CONFIG_H
|
||
|
#define CONFIG_H
|
||
|
|
||
|
class Config
|
||
|
{
|
||
|
private:
|
||
|
std::map<std::string, std::string> config_map;
|
||
|
|
||
|
std::ifstream config_file;
|
||
|
|
||
|
|
||
|
public:
|
||
|
Config(const char* filename);
|
||
|
void loadConfig();
|
||
|
void setConfFile(const char* filename);
|
||
|
|
||
|
void printConfig();
|
||
|
|
||
|
std::string getValue(std::string key);
|
||
|
};
|
||
|
|
||
|
#endif /* CONFIG_H */
|