]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOGimmick.h
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOGimmick.h
index cebcbd5870602d58eb82e6b094fd3ee963456f2b..4911b9913281802f0d9e654d235b456f13a73337 100644 (file)
@@ -14,6 +14,9 @@ namespace creaImageIO
        /**
        * \defgroup Model Model
        */
+       /**
+       * \defgroup GUI Top level graphical user interfaces
+       */
 
        /**
        * \ingroup Controller
@@ -36,22 +39,39 @@ namespace creaImageIO
     void Finalize();
 
     /// Sets level for messages "Gimmick!" 
-    void SetMessageLevel(int level);
-   /// Sets level for debug messages "Gimmick! DEBUG" 
-    void SetDebugMessageLevel(int level);
+    static void SetMessageLevel(int level);
+    /// Sets level for debug messages "Gimmick! DEBUG" 
+    static void SetDebugMessageLevel(int level);
+    
+    /// Type of map from TreeHandler name to TreeHandler*
+    typedef std::map<std::string, TreeHandler*> TreeHandlerMapType;
+
+    /// Returns the TreeHandlerMap (ref)
+    TreeHandlerMapType& GetTreeHandlerMap() { return mTreeHandlerMap; }
+    /// Returns the TreeHandlerMap (const ref)
+    const TreeHandlerMapType& GetTreeHandlerMap() const
+    { return mTreeHandlerMap; }
+    
 
-    /// Add a file to the local database
-    void AddFileToLocalDatabase(const std::string&);
-    /// Add a dir to the local database
-    void AddDirToLocalDatabase(const std::string&, bool recurse);
+    /// Add a file to the given TreeHandler
+    void AddFile(const std::string& handler, const std::string& filename);
+    /// Add a dir to the given TreeHandler
+    void AddDir(const std::string& handler, const std::string& path, 
+               bool recurse);
 
-    ///
-    void PrintLocalDatabase();
+    /// Prints the tree handled by the handler
+    void Print(const std::string& handler);
 
+
+    /// Returns the TreeHandler with a given name
+    TreeHandler* GetTreeHandler(const std::string& name) const;
     /// 
     SQLiteTreeHandler* GetLocalDatabase() { return mLocalDatabase; }
 
-    const SQLiteTreeHandler* GetLocalDatabase() const { return mLocalDatabase; }
+    const SQLiteTreeHandler* GetLocalDatabase() const 
+    { return mLocalDatabase; }
+
+    
 
     /// 
     const std::string& GetHomeDirectory();
@@ -61,7 +81,8 @@ namespace creaImageIO
 
   private:
     SQLiteTreeHandler* mLocalDatabase;
+    TreeHandlerMapType mTreeHandlerMap;
+
     std::string mCurrentDirectory;
     std::string mHomeDirectory;
     std::string mUserSettingsDirectory;