projects
/
fms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.2.13
[fms.git]
/
include
/
option.h
diff --git
a/include/option.h
b/include/option.h
index
abe1a58
..
c18c716
100644
(file)
--- a/
include/option.h
+++ b/
include/option.h
@@
-4,10
+4,11
@@
#include "db/sqlite3db.h"
\r
\r
#include <sstream>
\r
#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
\r
//just a wrapper around the database for the options table
\r
-class Option:public
Z
Thread::Singleton<Option>
\r
+class Option:public
P
Thread::Singleton<Option>
\r
{
\r
public:
\r
const bool Get(const std::string &option, std::string &value);
\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
std::string tempval;
\r
if(Get(option,tempval)==true)
\r
{
\r
- SQLite3DB::Statement st=SQLite3DB::DB::
i
nstance()->Prepare("UPDATE tblOption SET OptionValue=? WHERE Option=?;");
\r
+ SQLite3DB::Statement st=SQLite3DB::DB::
I
nstance()->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
st.Bind(0,valuestr.str());
\r
st.Bind(1,option);
\r
st.Step();
\r
}
\r
else
\r
{
\r
- SQLite3DB::Statement st=SQLite3DB::DB::
i
nstance()->Prepare("INSERT INTO tblOption(Option,OptionValue) VALUES(?,?);");
\r
+ SQLite3DB::Statement st=SQLite3DB::DB::
I
nstance()->Prepare("INSERT INTO tblOption(Option,OptionValue) VALUES(?,?);");
\r
st.Bind(0,option);
\r
st.Bind(1,valuestr.str());
\r
st.Step();
\r
st.Bind(0,option);
\r
st.Bind(1,valuestr.str());
\r
st.Step();
\r