]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOSQLiteTreeHandler.h
Documentation Updated
[creaImageIO.git] / src2 / creaImageIOSQLiteTreeHandler.h
index c1ada2d266ed1ac3b85401272632fe4ec31dc56b..bdf5fa729b7557671942bfd7fa0fed0b52aaa15f 100644 (file)
@@ -13,90 +13,90 @@ namespace creaImageIO
    * \ingroup Model
    */
   //=======================================================================
-  /// Concrete TreeHandler which manages a tree stored in a sqlite database
+  /// Concrete TreeHandler which manages a Tree stored in a sqlite database
   class SQLiteTreeHandler : virtual public TreeHandler
   {
   public:
-    ///====================================================================
+    //====================================================================
     /// Ctor with database file name 
     SQLiteTreeHandler(const std::string& filename);
     /// Dtor
     virtual ~SQLiteTreeHandler();
-    ///====================================================================
+    //====================================================================
 
-    ///====================================================================
+    //====================================================================
     /// Returns the sqlite db file name 
     const std::string& GetFileName() const { return mFileName; }
-    ///====================================================================
+    //====================================================================
  
-    ///====================================================================
-    /// QUERY METHODS
+    //====================================================================
+    // QUERY METHODS
     /// Is the 'source' readable ?
     virtual bool IsReadable() { return true; }
     /// Is the 'source' writable ?
     virtual bool IsWritable() { return true; }
-    ///====================================================================
+    //====================================================================
 
 
-    ///====================================================================
-    /// INITIALIZATION / FINALIZATION
-    ///====================================================================
+    //====================================================================
+    // INITIALIZATION / FINALIZATION
+    //====================================================================
 
-    ///====================================================================
+    //====================================================================
     /// Opens an existing 'source' 
-    /// Default mode is read only 
-    /// If IsWritable and writable==true then opens in read/write mode
+    // Default mode is read only 
+    // If IsWritable and writable==true then opens in read/write mode
     virtual bool Open(bool writable = false);
     /// Closes the 'source'
     virtual bool Close();
     /// Creates a new 'source' 
-    /// Default mode is read only 
-    /// If IsWritable and writable==true then opens in read/write mode
+    // Default mode is read only 
+    // If IsWritable and writable==true then opens in read/write mode
     virtual bool Create(bool writable = false);
     /// Destroys the 'source'
     virtual bool Destroy();
-    ///====================================================================
+    //====================================================================
 
 
-    ///====================================================================
+    //====================================================================
     // READ METHODS
-    ///====================================================================
+    //====================================================================
 
 
-    ///====================================================================
+    //====================================================================
     /// Returns the number of children of the Node *WITHOUT LOADING THEM*
-    /// REM : The Tree itself is a Node and asking for its number of 
-    ///       children returns the number of children of level 1.
+    // REM : The Tree itself is a Node and asking for its number of 
+    //       children returns the number of children of level 1.
     virtual unsigned int GetNumberOfChildren(tree::Node* n);
-    ///====================================================================
+    //====================================================================
 
-    ///====================================================================
+    //====================================================================
     /// Recursively loads the children of node 'parent' until maxlevel 
-    /// is reached.
-    /// If parent == NULL or parent == tree then starts with the 'children' of 
-    /// the tree itself.
-    /// Returns the total number of children loaded.
+    // is reached.
+    // If parent == NULL or parent == tree then starts with the 'children' of 
+    // the tree itself.
+    // Returns the total number of children loaded.
     virtual int LoadChildren(tree::Node* parent, int maxlevel);
-    ///====================================================================
+    //====================================================================
 
-    ///====================================================================
+    //====================================================================
     /// Unloads the Node and its descendants
-    /// WITHOUT altering the source, e.g. the database
+    // WITHOUT altering the source, e.g. the database
     virtual void UnLoad(tree::Node* n);
     ///====================================================================
 
 
-    ///====================================================================
-    /// WRITE METHODS : WORK ONLY IN WRITE MODE
-    ///====================================================================
+    //====================================================================
+    // WRITE METHODS : WORK ONLY IN WRITE MODE
+    //====================================================================
     /// Adds a branch in the tree with the attributes provided
-    /// 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
+    // 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 AttributeMapType& attr );
-    /// Removes the node and its descendants 
+    // Removes the node and its descendants 
     virtual bool Remove(tree::Node*);
-    /// Sets an attribute of a Node
+    // Sets an attribute of a Node
     virtual bool SetAttribute(tree::Node*, 
                              const std::string& key,
                              const std::string& value);
@@ -120,35 +120,41 @@ namespace creaImageIO
     //======================================================================
 
     //======================================================================
+
     /// Returns the parent to which the branch defined by the attributes 
-    /// provided must be grafted 
+    // provided must be grafted 
     tree::Node* DBGetParent( const AttributeMapType& attr);
     //======================================================================
 
     //======================================================================
+
     /// Loads the children of Node parent
-    /// Can recurse to numberoflevels levels
-    /// \return The total number of Node loaded (may be at different levels)
+    // Can recurse to numberoflevels levels
+    // \return The total number of Node loaded (may be at different levels)
     int DBLoadChildren( tree::Node* parent, int numberoflevels = 1);
     //======================================================================
 
     //======================================================================
+
     /// Appends to string s the SQL command to set the attributes values 
-    /// of node n
+    // of node n
     void SQLAppendAttributesValues(tree::Node* n, std::string& s);
     //======================================================================
 
     //======================================================================
+
     /// Graft the branch defined by the attributes to the parent
     void DBGraftToParent( tree::Node* parent, const AttributeMapType& attr);
     //======================================================================
     //======================================================================
+
     /// Sets an attribute of a Node and updates the database
     bool DBSetAttribute(tree::Node*, 
                        const std::string& key,
                        const std::string& value);
     //======================================================================
     //======================================================================
+
     /// Inserts the Node in the database
     void DBInsert(tree::Node* n);
     //======================================================================