#pragma once #include "IComponentEditor.h" #include #include #include #include namespace XCEngine { namespace Editor { class ComponentEditorRegistry { public: static ComponentEditorRegistry& Get(); void RegisterEditor(std::unique_ptr editor); IComponentEditor* FindEditor(::XCEngine::Components::Component* component) const; IComponentEditor* FindEditorByTypeName(const std::string& componentTypeName) const; const std::vector>& GetEditors() const; private: ComponentEditorRegistry(); std::vector> m_editors; std::unordered_map m_editorsByType; }; } // namespace Editor } // namespace XCEngine