]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.h
Correction d'un crash au moment de la validation sur le viewer
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.h
index bdf5fa729b7557671942bfd7fa0fed0b52aaa15f..0f45f7093503360e45ff9d0300c6b9dc79019e9e 100644 (file)
@@ -70,6 +70,16 @@ namespace creaImageIO
     virtual unsigned int GetNumberOfChildren(tree::Node* n);
     //====================================================================
 
+       //====================================================================
+    /// Returns the attribute requested. Useful for synchronization.
+       virtual void GetAttribute(std::string levelDescriptor,
+                                                                          std::string searchParam, 
+                                                                          std::string searchVal, 
+                                                                          std::string key, 
+                                                                          std::string& result);
+    //====================================================================
+
+
     //====================================================================
     /// Recursively loads the children of node 'parent' until maxlevel 
     // is reached.
@@ -100,6 +110,15 @@ namespace creaImageIO
     virtual bool SetAttribute(tree::Node*, 
                              const std::string& key,
                              const std::string& value);
+       // Sets an attribute
+    virtual void SetAttribute(const std::string& levelDescriptor, 
+                             const std::string& key,
+                             const std::string& value,
+                                 const std::string& searchParam, 
+                                 const std::string& searchVal);
+       //Deletes the tuple that matches the parameters given
+       virtual void DeleteTuple(std::string levelDescriptor, std::string key, std::string value);
     //====================================================================
     
 
@@ -154,10 +173,29 @@ namespace creaImageIO
                        const std::string& value);
     //======================================================================
     //======================================================================
-
+       /// Sets an attribute and updates the database
+       void DBSetAttribute(const std::string& levelDescriptor, 
+                             const std::string& key,
+                             const std::string& value,
+                                 const std::string& searchParam, 
+                                 const std::string& searchVal);
+    //======================================================================
+    //======================================================================
+       
     /// Inserts the Node in the database
     void DBInsert(tree::Node* n);
     //======================================================================
+
+       
+       //======================================================================
+
+    /// Deletes the tuple that matches the value specified in the given key and that belongs to the given level
+       void DBDelete(std::string levelDescriptor, std::string key, std::string value);
+    //======================================================================
+
+
+       /// Recursively Removes the nodes whose parent is given as a parameter
+    void DBRecursiveRemoveNode(tree::Node* node);
     /*
     /// 
     int DBQueryNumberOfChildren(tree::Node* n);
@@ -188,9 +226,9 @@ namespace creaImageIO
     //                                  UpdateSummary& summary);
     
 
-    // 
-    void DBRecursiveRemoveNode(tree::Node* node);
+       */
 
+       /*
 
     void BuildSQLFieldsValues(tree::Node* n,
                              std::string& str);
@@ -208,6 +246,7 @@ namespace creaImageIO
     bool mWritable;
     void SetWritable(bool w) { mWritable; }
     bool GetWritable() const { return mWritable; }
+       bool mIsAdding;
 
     /*
     struct TypeId