/**
* \defgroup Model Model
*/
+ /**
+ * \defgroup GUI Top level graphical user interfaces
+ */
/**
* \ingroup Controller
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();
private:
SQLiteTreeHandler* mLocalDatabase;
-
+ TreeHandlerMapType mTreeHandlerMap;
+
std::string mCurrentDirectory;
std::string mHomeDirectory;
std::string mUserSettingsDirectory;