]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Settings.cc
stream-based logging classes
[chaz/yoink] / src / Moof / Settings.cc
index 81b5c50fd62d7b6d34ec740b15b7eb23f09a6800..c5c3734189fc159f63bfd10fb2a702e5fb5a86d5 100644 (file)
 namespace Mf {
 
 
+Settings::~Settings()
+{
+       save();
+}
+
 Settings& Settings::getInstance()
 {
        static Settings settings;
@@ -72,13 +77,18 @@ void Settings::loadFromFiles(const std::vector<std::string>& filePaths)
                if (home)
                {
                        boost::replace_all(path, "$HOME", home);
+
+                       //Mf::logDebug("Copying global settings...");
+                       //mUserFile = path;
+                       //mGlobals.pushCopy();
+                       //mScript.set("globals", Script::REGISTRY);
                }
 
                if (mScript.doFile(path) != Script::SUCCESS)
                {
                        std::string str;
                        mScript[-1].get(str);
-                       logScript("%s", str.c_str());
+                       logInfo(str);
                        mScript.clear();
                }
        }
@@ -91,6 +101,17 @@ void Settings::clear()
 }
 
 
+void Settings::saveAs(const std::string& filePath)
+{
+       mUserFile = filePath;
+       save();
+}
+
+void Settings::save() const
+{
+}
+
+
 } // namepsace Mf
 
 /** vim: set ts=4 sw=4 tw=80: *************************************************/
This page took 0.0228 seconds and 4 git commands to generate.