Contains a complete set of editors for a single ROM instance. More...
#include <session_types.h>

Public Attributes | |
| std::vector< Editor * > | active_editors_ |
Private Types | |
| using | EditorFactory = std::function<std::unique_ptr<Editor>()> |
Private Member Functions | |
| Editor * | FindEditor (EditorType type) const |
| Editor * | EnsureEditorCreated (EditorType type) const |
| bool | ShouldTrackAsActiveEditor (EditorType type) const |
| void | TrackActiveEditor (Editor *editor) |
Private Attributes | |
| size_t | session_id_ = 0 |
| Rom * | rom_ = nullptr |
| zelda3::GameData * | game_data_ = nullptr |
| UserSettings * | user_settings_ = nullptr |
| EditorRegistry * | editor_registry_ = nullptr |
| std::optional< EditorDependencies > | dependencies_ |
| std::unordered_map< EditorType, std::unique_ptr< Editor > > | editors_ |
| std::unordered_map< EditorType, EditorFactory > | editor_factories_ |
| bool | session_teardown_prepared_ = false |
| std::unique_ptr< GfxGroupWorkspaceState > | gfx_group_workspace_ |
Contains a complete set of editors for a single ROM instance.
Definition at line 58 of file session_types.h.
|
private |
Definition at line 145 of file session_types.h.
|
explicit |
Definition at line 30 of file session_types.cc.
References yaze::editor::EditorRegistry::CreateEditor(), editor_factories_, editor_registry_, yaze::editor::kAssembly, yaze::editor::kDungeon, yaze::editor::kGraphics, yaze::editor::kHex, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kPlanning, yaze::editor::kScreen, yaze::editor::kSettings, yaze::editor::kSprite, and rom_.

|
default |
| void yaze::editor::EditorSet::set_user_settings | ( | UserSettings * | settings | ) |
Definition at line 83 of file session_types.cc.
References GetSettingsPanel(), and user_settings_.
Referenced by yaze::editor::EditorManager::ConfigureSession().

| void yaze::editor::EditorSet::SetGameData | ( | zelda3::GameData * | game_data | ) |
Definition at line 90 of file session_types.cc.
References editors_, and game_data_.
| void yaze::editor::EditorSet::ApplyDependencies | ( | const EditorDependencies & | dependencies | ) |
Definition at line 98 of file session_types.cc.
References dependencies_, and editors_.
Referenced by yaze::editor::EditorManager::ConfigureEditorDependencies().
| void yaze::editor::EditorSet::PrepareForSessionTeardown | ( | ) |
Definition at line 105 of file session_types.cc.
References editors_, and session_teardown_prepared_.
|
inline |
Definition at line 75 of file session_types.h.
References session_id_.
Referenced by yaze::editor::EditorManager::ConfigureSession(), and yaze::editor::RomSession::session_id().
| Editor * yaze::editor::EditorSet::GetEditor | ( | EditorType | type | ) | const |
Definition at line 116 of file session_types.cc.
References EnsureEditorCreated().
Referenced by GetEditorAs(), and yaze::editor::EditorManager::GetEditorByType().

|
inline |
Definition at line 80 of file session_types.h.
References FindEditor().
Referenced by EnsureEditorCreated().

|
inline |
Definition at line 83 of file session_types.h.
References GetEditor().

| void yaze::editor::EditorSet::OpenAssemblyFolder | ( | const std::string & | folder_path | ) | const |
Definition at line 256 of file session_types.cc.
References GetAssemblyEditor().

| void yaze::editor::EditorSet::ChangeActiveAssemblyFile | ( | std::string_view | path | ) | const |
Definition at line 262 of file session_types.cc.
References GetAssemblyEditor().

| core::AsarWrapper * yaze::editor::EditorSet::GetAsarWrapper | ( | ) | const |
Definition at line 268 of file session_types.cc.
References FindEditor(), and yaze::editor::kAssembly.

| const std::map< std::string, core::AsarSymbol > & yaze::editor::EditorSet::GetAssemblySymbols | ( | ) | const |
Definition at line 276 of file session_types.cc.
References FindEditor(), and yaze::editor::kAssembly.

| int yaze::editor::EditorSet::LoadedDungeonRoomCount | ( | ) | const |
Definition at line 286 of file session_types.cc.
References FindEditor(), and yaze::editor::kDungeon.

| int yaze::editor::EditorSet::TotalDungeonRoomCount | ( | ) | const |
Definition at line 294 of file session_types.cc.
References FindEditor(), and yaze::editor::kDungeon.

| std::vector< std::pair< uint32_t, uint32_t > > yaze::editor::EditorSet::CollectDungeonWriteRanges | ( | ) | const |
Definition at line 303 of file session_types.cc.
References FindEditor(), and yaze::editor::kDungeon.

| bool yaze::editor::EditorSet::HasPendingGraphicsChanges | ( | ) | const |
Definition at line 319 of file session_types.cc.
References FindEditor(), and yaze::editor::kGraphics.

| bool yaze::editor::EditorSet::HasPendingScreenChanges | ( | ) | const |
Definition at line 327 of file session_types.cc.
References FindEditor(), and yaze::editor::kScreen.

| void yaze::editor::EditorSet::InvalidateScreenRomBackedState | ( | ) |
Definition at line 335 of file session_types.cc.
References FindEditor(), and yaze::editor::kScreen.

| bool yaze::editor::EditorSet::HasPendingProjectDraftChanges | ( | ) | const |
Definition at line 342 of file session_types.cc.
References FindEditor(), and yaze::editor::kDungeon.

| absl::Status yaze::editor::EditorSet::PrepareProjectSave | ( | ) |
Definition at line 350 of file session_types.cc.
References FindEditor(), and yaze::editor::kDungeon.

| zelda3::Overworld * yaze::editor::EditorSet::GetOverworldData | ( | ) | const |
Definition at line 358 of file session_types.cc.
References FindEditor(), and yaze::editor::kOverworld.
Referenced by EnsureEditorCreated().

| AssemblyEditor * yaze::editor::EditorSet::GetAssemblyEditor | ( | ) | const |
Definition at line 367 of file session_types.cc.
References yaze::editor::kAssembly.
Referenced by ChangeActiveAssemblyFile(), and OpenAssemblyFolder().
| DungeonEditorV2 * yaze::editor::EditorSet::GetDungeonEditor | ( | ) | const |
Definition at line 370 of file session_types.cc.
References yaze::editor::kDungeon.
| GraphicsEditor * yaze::editor::EditorSet::GetGraphicsEditor | ( | ) | const |
Definition at line 373 of file session_types.cc.
References yaze::editor::kGraphics.
| MusicEditor * yaze::editor::EditorSet::GetMusicEditor | ( | ) | const |
Definition at line 376 of file session_types.cc.
References yaze::editor::kMusic.
| OverworldEditor * yaze::editor::EditorSet::GetOverworldEditor | ( | ) | const |
Definition at line 379 of file session_types.cc.
References yaze::editor::kOverworld.
| PaletteEditor * yaze::editor::EditorSet::GetPaletteEditor | ( | ) | const |
Definition at line 382 of file session_types.cc.
References yaze::editor::kPalette.
| ScreenEditor * yaze::editor::EditorSet::GetScreenEditor | ( | ) | const |
Definition at line 385 of file session_types.cc.
References yaze::editor::kScreen.
| SpriteEditor * yaze::editor::EditorSet::GetSpriteEditor | ( | ) | const |
Definition at line 388 of file session_types.cc.
References yaze::editor::kSprite.
| SettingsPanel * yaze::editor::EditorSet::GetSettingsPanel | ( | ) | const |
Definition at line 391 of file session_types.cc.
References yaze::editor::kSettings.
Referenced by yaze::editor::EditorManager::ConfigureEditorDependencies(), yaze::editor::EditorManager::HandleSessionSwitched(), and set_user_settings().
| MessageEditor * yaze::editor::EditorSet::GetMessageEditor | ( | ) | const |
Definition at line 394 of file session_types.cc.
References yaze::editor::kMessage.
| MemoryEditor * yaze::editor::EditorSet::GetMemoryEditor | ( | ) | const |
Definition at line 397 of file session_types.cc.
References yaze::editor::kHex.
|
inline |
Shared Gfx Groups UI state for this ROM session (Graphics + Overworld).
Definition at line 135 of file session_types.h.
References gfx_group_workspace_.
Referenced by yaze::editor::EditorManager::ConfigureEditorDependencies().
|
inline |
Definition at line 138 of file session_types.h.
References gfx_group_workspace_.
|
private |
Definition at line 120 of file session_types.cc.
References editors_, and yaze::editor::kUnknown.
Referenced by CollectDungeonWriteRanges(), EnsureEditorCreated(), GetAsarWrapper(), GetAssemblySymbols(), GetExistingEditor(), GetOverworldData(), HasPendingGraphicsChanges(), HasPendingProjectDraftChanges(), HasPendingScreenChanges(), InvalidateScreenRomBackedState(), LoadedDungeonRoomCount(), PrepareProjectSave(), and TotalDungeonRoomCount().
|
private |
Definition at line 131 of file session_types.cc.
References yaze::zelda3::Room::blockset(), yaze::zelda3::CollectRoomGfx(), dependencies_, yaze::zelda3::DescribeMainGroupUsage(), yaze::zelda3::DescribeRoomsetUsage(), editor_factories_, editors_, FindEditor(), game_data_, GetExistingEditor(), GetOverworldData(), yaze::editor::kDungeon, yaze::editor::kSettings, yaze::editor::kUnknown, yaze::zelda3::Room::render_entrance_blockset(), rom_, session_teardown_prepared_, yaze::editor::Editor::SetDependencies(), ShouldTrackAsActiveEditor(), yaze::zelda3::Room::spriteset(), TrackActiveEditor(), and user_settings_.
Referenced by GetEditor().
|
private |
Definition at line 229 of file session_types.cc.
References yaze::editor::kAssembly, yaze::editor::kDungeon, yaze::editor::kGraphics, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kScreen, and yaze::editor::kSprite.
Referenced by EnsureEditorCreated().
|
private |
Definition at line 246 of file session_types.cc.
References active_editors_.
Referenced by EnsureEditorCreated().
| std::vector<Editor*> yaze::editor::EditorSet::active_editors_ |
Definition at line 142 of file session_types.h.
Referenced by yaze::editor::EditorManager::CollectEditorsToPreload(), yaze::editor::EditorActivator::DeactivatePanelBasedEditor(), and TrackActiveEditor().
|
private |
Definition at line 152 of file session_types.h.
Referenced by session_id().
|
private |
Definition at line 153 of file session_types.h.
Referenced by EditorSet(), and EnsureEditorCreated().
|
private |
Definition at line 154 of file session_types.h.
Referenced by EnsureEditorCreated(), and SetGameData().
|
private |
Definition at line 155 of file session_types.h.
Referenced by EnsureEditorCreated(), and set_user_settings().
|
private |
Definition at line 156 of file session_types.h.
Referenced by EditorSet().
|
private |
Definition at line 158 of file session_types.h.
Referenced by ApplyDependencies(), and EnsureEditorCreated().
|
mutableprivate |
Definition at line 159 of file session_types.h.
Referenced by ApplyDependencies(), EnsureEditorCreated(), FindEditor(), PrepareForSessionTeardown(), and SetGameData().
|
private |
Definition at line 160 of file session_types.h.
Referenced by EditorSet(), and EnsureEditorCreated().
|
private |
Definition at line 161 of file session_types.h.
Referenced by EnsureEditorCreated(), and PrepareForSessionTeardown().
|
private |
Definition at line 163 of file session_types.h.
Referenced by gfx_group_workspace(), and gfx_group_workspace().