#ifndef APPLICATION_H #define APPLICATION_H #include #include "component/ComponentManager.h" #include "Project.h" #include "utility/messaging/MessageListener.h" #include "utility/messaging/type/MessageActivateWindow.h" #include "utility/messaging/type/MessageFinishedParsing.h" #include "utility/messaging/type/MessageLoadProject.h" #include "utility/messaging/type/MessageRefresh.h" #include "utility/messaging/type/MessageSaveProject.h" class IDECommunicationController; class NetworkFactory; class ViewFactory; class MainView; class StorageCache; class Version; class Application : public MessageListener , public MessageListener , public MessageListener , public MessageListener , public MessageListener { public: static std::shared_ptr create(const Version& version, ViewFactory* viewFactory, NetworkFactory* networkFactory); static void loadSettings(); ~Application(); void loadProject(const FilePath& projectSettingsFilePath); void refreshProject(); void saveProject(const FilePath& projectSettingsFilePath); static void setAppSettingsPath(const std::string& appSettingsPath); private: Application(); virtual void handleMessage(MessageActivateWindow* message); virtual void handleMessage(MessageFinishedParsing* message); virtual void handleMessage(MessageLoadProject* message); virtual void handleMessage(MessageRefresh* message); virtual void handleMessage(MessageSaveProject* message); void updateRecentProjects(const FilePath& projectSettingsFilePath); std::shared_ptr m_project; std::shared_ptr m_storageCache; std::shared_ptr m_mainView; std::shared_ptr m_componentManager; std::shared_ptr m_ideCommunicationController; static std::string m_appSettingsPath; }; #endif // APPLICATION_H