]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.h
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.h
index 516910e61032be2c57b4e4d7b65fc843ee723868..a1a4f623bccd5ea830c4ffc63617a4eeb83681ff 100644 (file)
@@ -90,32 +90,38 @@ namespace creaImageIO
     /// returns the Level in the tree where the branch was connected 
     /// (-1 for error, 0 for top level, etc. ) 
     /// Of course the branch is loaded on exit
-    virtual int AddBranch
-    ( const std::map<std::string,std::string>& attr );
+    virtual int AddBranch( const AttributeMapType& attr );
     /// Removes the node and its descendants 
     virtual bool Remove(tree::Node*);
-    ///====================================================================
-
-
+    //====================================================================
+    
 
+    
   protected:
-    // Open 
+    //======================================================================
+    /// Open the database
     bool DBOpen();
-    void DBImportTreeDescription();
-
+    /// Import the Tree::Description from database (verifies the structure)
+    bool DBImportTreeDescription();
+    //======================================================================
+    //======================================================================
     // Creation
     /// Creates a new database on disk and the tables
     bool DBCreate();
-    /// Creates the default tree description for a new database
-    void BuildDefaultTreeDescription();
     /// Appends to string s the SQL command to create the attributes of a given level
     void AppendAttributesSQLDefinition(int level, std::string& s);
-    void DBExportTreeDescription();
-    //
+    //======================================================================
 
-    // Test
-    bool DBStructureIsValid();
+    //======================================================================
+    tree::Node* DBGetParent( const AttributeMapType& attr);
+    //======================================================================
 
+    //======================================================================
+    int DBLoadChildren( tree::Node* parent, int numberoflevels = 1);
+    //======================================================================
+
+    /*
+    /// 
     int DBQueryNumberOfChildren(tree::Node* n);
     
     // Insertion
@@ -154,7 +160,7 @@ namespace creaImageIO
 
     tree::Node* GetChildrenLike(tree::Node* internal_parent,
                               tree::Node* alien_node);
-
+    */
   private:
     /// The DB
     CppSQLite3DB* mDB;
@@ -165,6 +171,7 @@ namespace creaImageIO
     void SetWritable(bool w) { mWritable; }
     bool GetWritable() const { return mWritable; }
 
+    /*
     struct TypeId
     {
       int type;
@@ -178,6 +185,7 @@ namespace creaImageIO
     
     typedef std::map<TypeId,tree::Node*> TypeIdToNodeMapType;
     TypeIdToNodeMapType mTypeIdToNodeMap;
+    */
   };
   // EO class SQLiteTreeHandler
   //=======================================================================