Instance-based runtime context replacing ContentRegistry::Context. More...
#include <editor_context.h>
Public Member Functions | |
| GlobalEditorContext (EventBus &bus) | |
| EventBus & | GetEventBus () |
| const EventBus & | GetEventBus () const |
| void | SetCurrentRom (Rom *rom) |
| Rom * | GetCurrentRom () const |
| void | SetSessionId (size_t id) |
| size_t | GetSessionId () const |
| void | SetGameData (zelda3::GameData *data) |
| zelda3::GameData * | GetGameData () const |
| void | SetCurrentProject (project::YazeProject *project) |
| project::YazeProject * | GetCurrentProject () const |
| void | SetCurrentEditor (Editor *editor) |
| Editor * | GetCurrentEditor () const |
| void | Clear () |
Private Attributes | |
| EventBus & | bus_ |
| Rom * | rom_ = nullptr |
| size_t | session_id_ = 0 |
| zelda3::GameData * | game_data_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| Editor * | current_editor_ = nullptr |
Instance-based runtime context replacing ContentRegistry::Context.
Holds all shared runtime state (ROM, GameData, project, editor, event bus) that was previously accessed through the static ContentRegistry::Context API.
New code should receive this via EditorDependencies rather than using ContentRegistry::Context. The static API delegates to the singleton instance set via ContentRegistry::Context::SetGlobalContext().
Definition at line 32 of file editor_context.h.
|
inlineexplicit |
Definition at line 34 of file editor_context.h.
|
inline |
Definition at line 37 of file editor_context.h.
References bus_.
Referenced by yaze::editor::StatusBar::Initialize().
|
inline |
Definition at line 38 of file editor_context.h.
References bus_.
|
inline |
Definition at line 41 of file editor_context.h.
References rom_.
|
inline |
Definition at line 42 of file editor_context.h.
References rom_.
|
inline |
Definition at line 45 of file editor_context.h.
References session_id_.
|
inline |
Definition at line 46 of file editor_context.h.
References session_id_.
|
inline |
Definition at line 49 of file editor_context.h.
References game_data_.
|
inline |
Definition at line 50 of file editor_context.h.
References game_data_.
|
inline |
Definition at line 53 of file editor_context.h.
References project_.
|
inline |
Definition at line 54 of file editor_context.h.
References project_.
|
inline |
Definition at line 57 of file editor_context.h.
References current_editor_.
|
inline |
Definition at line 58 of file editor_context.h.
References current_editor_.
|
inline |
Definition at line 61 of file editor_context.h.
References current_editor_, game_data_, project_, rom_, and session_id_.
|
private |
Definition at line 70 of file editor_context.h.
Referenced by GetEventBus(), and GetEventBus().
|
private |
Definition at line 71 of file editor_context.h.
Referenced by Clear(), GetCurrentRom(), and SetCurrentRom().
|
private |
Definition at line 72 of file editor_context.h.
Referenced by Clear(), GetSessionId(), and SetSessionId().
|
private |
Definition at line 73 of file editor_context.h.
Referenced by Clear(), GetGameData(), and SetGameData().
|
private |
Definition at line 74 of file editor_context.h.
Referenced by Clear(), GetCurrentProject(), and SetCurrentProject().
|
private |
Definition at line 75 of file editor_context.h.
Referenced by Clear(), GetCurrentEditor(), and SetCurrentEditor().