- fixed configurator to properly read / write mg ini files

This commit is contained in:
Mark Vejvoda
2011-04-17 07:04:38 +00:00
parent 734db6c7d4
commit 8dbef7d7ea
5 changed files with 60 additions and 33 deletions

View File

@@ -30,7 +30,7 @@ namespace Shared{ namespace Util{
/// ini-like file loader
// =====================================================
class Properties{
class Properties {
private:
static const int maxLine= 4096;
@@ -45,13 +45,12 @@ private:
string path;
static string applicationPath;
bool applyTagsToValue(string &value);
public:
static void setApplicationPath(string value) { applicationPath=value; }
static string getApplicationPath() { return applicationPath; }
void clear();
void load(const string &path);
void load(const string &path,bool clearCurrentProperties=true);
void save(const string &path);
int getPropertyCount() const {return (int)propertyVector.size();}
@@ -76,6 +75,8 @@ public:
void setFloat(const string &key, float value);
void setString(const string &key, const string &value);
static bool applyTagsToValue(string &value);
string getpath() const { return path;}
string toString();