version 0.1.3
[fms.git] / include / option.h
index abe1a58..c18c716 100644 (file)
@@ -4,10 +4,11 @@
 #include "db/sqlite3db.h"\r
 \r
 #include <sstream>\r
-#include <zthread/Singleton.h>\r
+//#include <zthread/Singleton.h>\r
+#include "pthreadwrapper/singleton.h"\r
 \r
 //just a wrapper around the database for the options table\r
-class Option:public ZThread::Singleton<Option>\r
+class Option:public PThread::Singleton<Option>\r
 {\r
 public:\r
        const bool Get(const std::string &option, std::string &value);\r
@@ -25,14 +26,14 @@ void Option::Set(const std::string &option, const T &value)
        std::string tempval;\r
        if(Get(option,tempval)==true)\r
        {\r
-               SQLite3DB::Statement st=SQLite3DB::DB::instance()->Prepare("UPDATE tblOption SET OptionValue=? WHERE Option=?;");\r
+               SQLite3DB::Statement st=SQLite3DB::DB::Instance()->Prepare("UPDATE tblOption SET OptionValue=? WHERE Option=?;");\r
                st.Bind(0,valuestr.str());\r
                st.Bind(1,option);\r
                st.Step();\r
        }\r
        else\r
        {\r
-               SQLite3DB::Statement st=SQLite3DB::DB::instance()->Prepare("INSERT INTO tblOption(Option,OptionValue) VALUES(?,?);");\r
+               SQLite3DB::Statement st=SQLite3DB::DB::Instance()->Prepare("INSERT INTO tblOption(Option,OptionValue) VALUES(?,?);");\r
                st.Bind(0,option);\r
                st.Bind(1,valuestr.str());\r
                st.Step();\r