]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.cpp
Remove dependencies of WxWidget from Model and Controller class.
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.cpp
index 6d4d25b9ce249d2ce1023d33d72cba8b75feeb04..3d3fe70c1639ad2357a75f628ff63462020a2e9f 100644 (file)
 
 #include <deque>
 
-#include "wx/wx.h"
-#include <wx/dir.h>
-#include <wx/filename.h>
-
-
 //#include <icons/close.xpm>
 
 #include <creaWx.h>
@@ -331,9 +326,9 @@ namespace creaImageIO
     command = "create table LEVELS\n";
     command += "( Name text )\n";
     UPDATEDB(command);
-    
+    int l;
     // Iterate the Levels
-    for (int l=0; l<GetTree().GetNumberOfLevels(); ++l)
+    for (l=0; l<GetTree().GetNumberOfLevels(); l++)
       {
        command = "INSERT INTO LEVELS (Name) VALUES ('";
        command += GetTree().GetLevelDescriptor(l).GetName();
@@ -870,6 +865,7 @@ namespace creaImageIO
        sql +="'";
     //    sql += " LIMIT 1";
     UPDATEDB(sql);
+       return true;
   }
 
   //===================================================================== 
@@ -1092,6 +1088,22 @@ namespace creaImageIO
         UPDATEDB(query.str());
        }
 
+       //=====================================================================
+  void SQLiteTreeHandler::BeginTransaction()
+    {
+               std::stringstream out;
+               out<<"begin transaction;";
+        UPDATEDB(out.str());
+       }
+
+       //=====================================================================
+  void SQLiteTreeHandler::EndTransaction()
+    {
+       std::stringstream out;
+               out<<"commit transaction;";
+        UPDATEDB(out.str());
+       }
+
   /*
   //=====================================================================
   bool SQLiteTreeHandler::DBInsert(Node* alien_node,