Migrate ProjectManager to dependency injection
- Created IProjectManager interface - ProjectManager now implements IProjectManager - Removed ProjectManager::Get() singleton - Added IEditorContext::GetProjectManager() - ProjectPanel now uses m_context->GetProjectManager() instead of singleton - EditorContext owns ProjectManager instance
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Editor {
|
||||
|
||||
class EventBus;
|
||||
class ISelectionManager;
|
||||
class IProjectManager;
|
||||
|
||||
class IEditorContext {
|
||||
public:
|
||||
@@ -16,6 +17,7 @@ public:
|
||||
virtual EventBus& GetEventBus() = 0;
|
||||
virtual ISelectionManager& GetSelectionManager() = 0;
|
||||
virtual void* GetSceneManager() = 0;
|
||||
virtual IProjectManager& GetProjectManager() = 0;
|
||||
|
||||
virtual void SetProjectPath(const std::string& path) = 0;
|
||||
virtual const std::string& GetProjectPath() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user