1#ifndef YAZE_APP_EDITOR_SYSTEM_EDITOR_REGISTRY_H_
2#define YAZE_APP_EDITOR_SYSTEM_EDITOR_REGISTRY_H_
7#include <unordered_map>
44 const std::string& category)
const;
67 static const std::unordered_map<EditorType, std::string>
kEditorNames;
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Manages editor types, categories, and lifecycle.
void RegisterEditor(EditorType type, Editor *editor)
static const std::unordered_map< EditorType, std::string > kEditorNames
static EditorType GetEditorTypeFromCategory(const std::string &category)
static const std::unordered_map< EditorType, std::string > kEditorCategories
void ValidateEditorType(EditorType type) const
static std::vector< std::string > GetAllEditorCategories()
Get all editor categories in display order for sidebar.
std::vector< EditorType > GetEditorsInCategory(const std::string &category) const
static bool IsPanelBasedEditor(EditorType type)
std::unique_ptr< Editor > CreateEditor(EditorType type, Rom *rom) const
std::function< std::unique_ptr< Editor >(Rom *)> EditorFactory
void SetEditorActive(EditorType type, bool active)
std::string GetEditorDisplayName(EditorType type) const
bool HasFactory(EditorType type) const
void UnregisterEditor(EditorType type)
bool IsEditorActive(EditorType type) const
std::unordered_map< EditorType, EditorFactory > editor_factories_
bool IsValidEditorType(EditorType type) const
void RegisterFactory(EditorType type, EditorFactory factory)
bool IsEditorVisible(EditorType type) const
void UnregisterFactory(EditorType type)
~EditorRegistry()=default
std::vector< std::string > GetAvailableCategories() const
static const std::unordered_map< EditorType, bool > kPanelBasedEditors
Editor * GetEditor(EditorType type) const
static std::string GetEditorCategory(EditorType type)
std::unordered_map< EditorType, Editor * > registered_editors_
Interface for editor classes.