ToolSystem.h 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include <Atomic/Core/Object.h>
  3. #include "Platform/Platform.h"
  4. using namespace Atomic;
  5. namespace ToolCore
  6. {
  7. class Platform;
  8. class Project;
  9. class ToolSystem : public Object
  10. {
  11. OBJECT(ToolSystem);
  12. public:
  13. ToolSystem(Context* context);
  14. virtual ~ToolSystem();
  15. bool LoadProject(const String& fullpath);
  16. Project* GetProject() { return project_; }
  17. const String& GetDataPath() { return dataPath_; }
  18. void SetDataPath(const String& path) { dataPath_ = path; }
  19. // Platforms
  20. void RegisterPlatform(Platform* platform);
  21. void SetCurrentPlatform(PlatformID platform);
  22. PlatformID GetCurrentPlatform();
  23. private:
  24. /// Full path to data files
  25. String dataPath_;
  26. SharedPtr<Platform> currentPlatform_;
  27. // PlatformID -> platform
  28. HashMap<unsigned, SharedPtr<Platform> > platforms_;
  29. SharedPtr<Project> project_;
  30. };
  31. }