#pragma once #include #include "Platform/Platform.h" using namespace Atomic; namespace ToolCore { class Platform; class Project; class ToolSystem : public Object { OBJECT(ToolSystem); public: ToolSystem(Context* context); virtual ~ToolSystem(); bool LoadProject(const String& fullpath); Project* GetProject() { return project_; } void CloseProject(); const String& GetDataPath() { return dataPath_; } void SetDataPath(const String& path) { dataPath_ = path; } // Platforms void RegisterPlatform(Platform* platform); Platform* GetPlatformByID(PlatformID platform); Platform* GetPlatformByName(const String& name); void SetCurrentPlatform(PlatformID platform); Platform* GetCurrentPlatform(); void SetCLI() { cli_ = true; } bool IsCLI() { return cli_; } private: /// Full path to data files String dataPath_; SharedPtr currentPlatform_; // PlatformID -> platform HashMap > platforms_; SharedPtr project_; bool cli_; }; }