]> Creatis software - creaImageIO.git/blob - src2/creaImageIOGimmick.h
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOGimmick.h
1 #ifndef __creaImageIOGimmick_h_INCLUDED__
2 #define __creaImageIOGimmick_h_INCLUDED__
3
4 #include <creaImageIOSQLiteTreeHandler.h>
5
6 namespace creaImageIO
7 {
8         /**
9         * \defgroup Controller Controller
10         */
11         /**
12         * \defgroup View View
13         */
14         /**
15         * \defgroup Model Model
16         */
17
18         /**
19         * \ingroup Controller
20         */
21
22   //=======================================================================
23   /// Central controler of the gimmick application
24   class Gimmick
25   {
26   public:
27     /// Ctor
28     Gimmick();
29     /// Dtor
30     ~Gimmick();
31     
32     /// Initialize (read/creates databases, etc.)
33     void Initialize();
34     
35     /// Finalize (closes databases, etc.)
36     void Finalize();
37
38     /// Sets level for messages "Gimmick!" 
39     void SetMessageLevel(int level);
40    /// Sets level for debug messages "Gimmick! DEBUG" 
41     void SetDebugMessageLevel(int level);
42
43     /// Add a file to the local database
44     void AddFileToLocalDatabase(const std::string&);
45     /// Add a dir to the local database
46     void AddDirToLocalDatabase(const std::string&, bool recurse);
47
48     ///
49     void PrintLocalDatabase();
50
51     /// 
52     SQLiteTreeHandler* GetLocalDatabase() { return mLocalDatabase; }
53
54     const SQLiteTreeHandler* GetLocalDatabase() const { return mLocalDatabase; }
55
56     /// 
57     const std::string& GetHomeDirectory();
58     const std::string& GetUserSettingsDirectory();
59     void CreateUserSettingsDirectory();
60     const std::string& GetLocalDatabasePath();
61
62   private:
63     SQLiteTreeHandler* mLocalDatabase;
64  
65     std::string mCurrentDirectory;
66     std::string mHomeDirectory;
67     std::string mUserSettingsDirectory;
68     std::string mLocalDatabasePath;
69     
70   };
71   // EO class Gimmick
72   //=======================================================================
73
74
75 } // EO namespace creaImageIO
76
77 // EOF
78 #endif  
79
80