configurationfile.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029 #ifndef CONFIGURATIONFILE_H
00030 #define CONFIGURATIONFILE_H
00031
00032 #include "tools.h"
00033 #include <string>
00034 #include <fstream>
00035 #include <map>
00036 using namespace std;
00037
00044 class ConfigurationFile
00045 {
00046 public:
00048 ConfigurationFile(string);
00050 ~ConfigurationFile();
00052 bool load();
00054 bool flush();
00056 map<string,string> getConfig();
00058 void addProtectedKey(string);
00060 string getValue(string,bool displayProtected=true);
00062 void setValue(string,string);
00064 bool delKey(string);
00066 string getFilePath();
00067 private:
00069 map<string,string> config;
00071 string file;
00073 vector<string> protectedKeys;
00074 };
00075
00076 #endif