X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOSettings.cpp;h=69ec28290af24d922aa56e6d2d010ef74d66b060;hb=34d2d6b1860321978fd19668bbf6fd0606ac1e80;hp=43d879ebba13b7aa377234591313d9cf51f55311;hpb=9b19229069b38b9b14563f427554fa7c8fd9ac6f;p=creaImageIO.git diff --git a/src2/creaImageIOSettings.cpp b/src2/creaImageIOSettings.cpp index 43d879e..69ec282 100644 --- a/src2/creaImageIOSettings.cpp +++ b/src2/creaImageIOSettings.cpp @@ -4,6 +4,10 @@ #include #include +// Memory tracking allocation +#ifdef _DEBUG +#define new DEBUG_NEW +#endif using namespace boost; namespace po = boost::program_options; @@ -12,7 +16,7 @@ namespace creaImageIO Settings::Settings(const std::string i_path) { //need to position path in user directory first. - m_SettingsFileName = i_path + "\\.gimmick\\app.config"; + m_SettingsFileName = i_path + "\\.gimmick\\Shared\\gimmick\\app.config"; //Test if Settings File exist if(!boost::filesystem::exists(m_SettingsFileName) ) { @@ -79,6 +83,18 @@ namespace creaImageIO } } } + + //////////////////////////////////////////////////////////////////////////////////////////////// + // Update settings in config file // + // @param key : Key to update // + // @param value: New value to set // + // return : - + /////////////////////////////////////////////////////////////////////////////////////////////// + void Settings::updateSetting(const std::string& key, const std::string &val) + { + m_SettingsMap[key.c_str()] = val; + } + //////////////////////////////////////////////////////////////////////////////////////////////// // add a path to a DB // // @param i_path : DB path to add // @@ -133,6 +149,6 @@ namespace creaImageIO ofs.clear(); writeSettings(ofs); ofs.close(); - } - -} \ No newline at end of file + } +} +