]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSettings.cpp
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOSettings.cpp
index 43d879ebba13b7aa377234591313d9cf51f55311..92908785bc43de2a340dfba8254150d64e3ad3a7 100644 (file)
@@ -12,7 +12,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 +79,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 +145,6 @@ namespace creaImageIO
                ofs.clear();
                writeSettings(ofs);
                ofs.close();
-       }
-         
-}
\ No newline at end of file
+       }  
+}
+