00001
00002
00003
00004
00005
00007
00009
00010
00011
00012
00013
00015
00016 #pragma once
00017
00018 #include <iostream>
00019 #include <string.h>
00020 #include <string>
00021 #include <fstream>
00022 #include <map>
00023
00024 using namespace std;
00025
00030 class configini
00031 {
00032
00033 private:
00034 string configFile;
00035 string configContent;
00036
00037 public:
00038 void init (const char *fname);
00039 void loadFile ();
00040 char *strlwr (const char *);
00041 string getParam (const char *section, const char *key);
00042 map < string, string > getParam (const char *section);
00043 string cleanBlanks (string);
00044 int stringToInt (string s);
00045 int getIntParam (const char *section, const char *key);
00046 float getfloatParam (const char *section, const char *key);
00047 };