Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00057 #ifndef __PROJECTMANAGER_HPP___
00058 #define __PROJECTMANAGER_HPP___
00059
00060
00061 #include <openfluid/dllexport.hpp>
00062 #include <glibmm/ustring.h>
00063
00064 namespace openfluid { namespace base {
00065
00066
00067
00068
00069
00070 class DLLEXPORT ProjectManager
00071 {
00072 private:
00073
00074 static ProjectManager* mp_Singleton;
00075
00076 Glib::ustring m_Path;
00077
00078 Glib::ustring m_Name;
00079 Glib::ustring m_Description;
00080 Glib::ustring m_Authors;
00081 Glib::ustring m_CreationDate;
00082 Glib::ustring m_LastModDate;
00083 bool m_IsIncOutputDir;
00084
00085 Glib::ustring m_OutputDir;
00086 Glib::ustring m_InputDir;
00087
00088 bool m_IsOpened;
00089
00090 Glib::ustring m_KeyFileGroupName;
00091
00092
00093 ProjectManager();
00094
00095 Glib::ustring getNow();
00096
00097 static std::string getFilePathFromProjectPath(Glib::ustring ProjectPath);
00098
00099 static std::string getInputDirFromProjectPath(Glib::ustring ProjectPath);
00100
00101 static std::string getOuputDirFromProjectPath(Glib::ustring ProjectPath);
00102
00103 public:
00104
00105 static ProjectManager* getInstance();
00106
00107 ~ProjectManager();
00108
00109 Glib::ustring getPath() const { return m_Path; };
00110
00111 Glib::ustring getName() const { return m_Name; };
00112
00113 void setName(const Glib::ustring& Name) { m_Name = Name; };
00114
00115 Glib::ustring getDescription() const { return m_Description; };
00116
00117 void setDescription(const Glib::ustring& Description) { m_Description = Description; };
00118
00119 Glib::ustring getAuthors() const { return m_Authors; };
00120
00121 void setAuthors(const Glib::ustring& Authors) { m_Authors = Authors; };
00122
00123 Glib::ustring getCreationDate() const { return m_CreationDate; };
00124
00125 void setCreationDate(const Glib::ustring& CreationDate) { m_CreationDate = CreationDate; };
00126
00127 void setCreationDateAsNow() { m_CreationDate = getNow(); };
00128
00129 Glib::ustring getLastModDate() const { return m_LastModDate; };
00130
00131 void setLastModDate(const Glib::ustring& LastModDate) { m_LastModDate = LastModDate; };
00132
00133 Glib::ustring getOutputDir() { return m_OutputDir; };
00134
00135 Glib::ustring getInputDir() const { return m_InputDir; };
00136
00137 bool isIncrementalOutputDir() const { return m_IsIncOutputDir; };
00138
00139 void setIncrementalOutputDir(const bool Inc) { m_IsIncOutputDir = Inc; };
00140
00141 bool open(const Glib::ustring& Path);
00142
00143 bool create(const Glib::ustring& Path, const Glib::ustring& Name,
00144 const Glib::ustring& Description, const Glib::ustring& Authors,
00145 const bool Inc);
00146
00147 bool isOpened() const { return m_IsOpened; };
00148
00149 bool save();
00150
00151 void close();
00152
00153 static bool isProject(const Glib::ustring& Path);
00154
00155 void updateOutputDir();
00156
00157 };
00158
00159
00160 } }
00161
00162
00163 #endif