]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.cpp
clean-up
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.cpp
index f29a8ce7ef4b7ced02410167684d1b1405cfef16..3531408532557debd0325133ae74ae7a9435b275 100644 (file)
@@ -1,25 +1,19 @@
 #include <creaImageIOSQLiteTreeHandler.h>
 #include <creaImageIOSystem.h>
+#include <creaImageIOGimmick.h>
+#include <creaImageIOTree.h>
 
 #include "CppSQLite3.h"
 
 #include <sys/stat.h>
 
-//#include <creaImageIOSQLiteTreeHandlerStructure.h>
-
-//#include <creaImageIOUtilities.h>
-
-//#include <icons/database.xpm>
-
 #include <deque>
 
-//#include <icons/close.xpm>
-
 #include <creaWx.h>
+#include <boost/algorithm/string.hpp>
 using namespace crea;
 
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string/replace.hpp>
+
 
 namespace creaImageIO
 {
@@ -32,8 +26,7 @@ namespace creaImageIO
   {
     mDB = new CppSQLite3DB;
        mIsAdding=false;
-    GimmickMessage(1,"SQLite version : "
-                  <<std::string(mDB->SQLiteVersion())<< std::endl);
+    //GimmickMessage(1,"SQLite version : "                <<std::string(mDB->SQLiteVersion())<< std::endl);
   }
   //=============================================================
 
@@ -362,8 +355,7 @@ namespace creaImageIO
        command += "Flags int\n";           
        command += "\n)";
        UPDATEDB(command);
-       
-       
+
        // Fill the table *_ATTRIBUTES
        LevelDescriptor::AttributeDescriptorListType::const_iterator i;
        for (i  = GetTree().GetAttributeDescriptorList(l).begin();
@@ -811,7 +803,9 @@ namespace creaImageIO
        
     std::string query = "DELETE FROM ";
    
-    query += GetTree().GetLevelDescriptor(node->GetLevel()).GetName();
+
+       query += GetTree().GetLevelDescriptor(node->GetLevel()).GetName();
+       
     query += " WHERE ID='"+ node->GetAttribute("ID") + "';";
  
     UPDATEDB(query);