]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTimestampDatabaseHandler.cpp
Remove dependencies of WxWidget from Model and Controller class.
[creaImageIO.git] / src2 / creaImageIOTimestampDatabaseHandler.cpp
index 167224be19496f29074a278b5c30343f542a8fb2..a0a522b019eecc644a1c325b389928bf1cad3a63 100644 (file)
@@ -7,13 +7,6 @@
 
 #include <deque>
 
-#include "wx/wx.h"
-#include <wx/dir.h>
-#include <wx/filename.h>
-
-#include <creaWx.h>
-using namespace crea;
-
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string/replace.hpp>
 
@@ -279,9 +272,11 @@ namespace creaImageIO
   //=====================================================================
   std::string TimestampDatabaseHandler::IsIndexed(const std::string& path, const std::string& refdb)
   {
+       std::string pat=path.c_str();
+       CleanPath(pat);
        std::stringstream out;
        std::stringstream result;
-       out<<"SELECT ID FROM FILES WHERE PATH='"<<path<<"' AND REFERENCEDDB='"<<refdb<<"';";
+       out<<"SELECT ID FROM FILES WHERE PATH='"<<pat<<"' AND REFERENCEDDB='"<<refdb<<"';";
                
        CppSQLite3Query q;
        QUERYTIMESTAMPDB(out.str(),q);
@@ -425,4 +420,16 @@ namespace creaImageIO
          return false;  
   }
 
-}// namespace creaImageIO
\ No newline at end of file
+  //=====================================================================
+  void TimestampDatabaseHandler::RemoveEntries(const std::string i_table, 
+               const std::string i_attribute, 
+               const std::string i_operand, 
+               const std::string i_val)
+    {
+        std::stringstream query;
+               query<<"DELETE  FROM "<<i_table<<" WHERE "<<i_attribute<<" "<<i_operand<<" '"<<i_val<<"'";
+        UPDATETIMESTAMPDB(query.str());
+       }
+
+}// namespace creaImageIO
+