#include <dungeon_undo_actions.h>


Public Types | |
| using | RestoreFn = std::function<void(int room_id, const WaterFillSnapshot&)> |
Public Member Functions | |
| DungeonWaterFillAction (int room_id, WaterFillSnapshot before, WaterFillSnapshot after, RestoreFn restore) | |
| absl::Status | Undo () override |
| absl::Status | Redo () override |
| std::string | Description () const override |
| Human-readable description (e.g., "Paint 12 tiles on map 5") | |
| size_t | MemoryUsage () const override |
| Approximate memory footprint for budget enforcement. | |
| bool | CanMergeWith (const UndoAction &) const override |
Public Member Functions inherited from yaze::editor::UndoAction | |
| virtual | ~UndoAction ()=default |
| virtual void | MergeWith (UndoAction &) |
Private Attributes | |
| int | room_id_ |
| WaterFillSnapshot | before_ |
| WaterFillSnapshot | after_ |
| RestoreFn | restore_ |
Definition at line 141 of file dungeon_undo_actions.h.
| using yaze::editor::DungeonWaterFillAction::RestoreFn = std::function<void(int room_id, const WaterFillSnapshot&)> |
Definition at line 143 of file dungeon_undo_actions.h.
|
inline |
Definition at line 145 of file dungeon_undo_actions.h.
|
inlineoverridevirtual |
Implements yaze::editor::UndoAction.
Definition at line 152 of file dungeon_undo_actions.h.
|
inlineoverridevirtual |
Implements yaze::editor::UndoAction.
Definition at line 160 of file dungeon_undo_actions.h.
|
inlineoverridevirtual |
Human-readable description (e.g., "Paint 12 tiles on map 5")
Implements yaze::editor::UndoAction.
Definition at line 168 of file dungeon_undo_actions.h.
References room_id_.
|
inlineoverridevirtual |
Approximate memory footprint for budget enforcement.
Reimplemented from yaze::editor::UndoAction.
Definition at line 172 of file dungeon_undo_actions.h.
References after_, before_, and yaze::editor::WaterFillSnapshot::offsets.
|
inlineoverridevirtual |
Whether this action can merge with the previous action on the stack. Called only when both actions have the same concrete type.
Reimplemented from yaze::editor::UndoAction.
Definition at line 178 of file dungeon_undo_actions.h.
|
private |
Definition at line 181 of file dungeon_undo_actions.h.
Referenced by Description(), Redo(), and Undo().
|
private |
Definition at line 182 of file dungeon_undo_actions.h.
Referenced by MemoryUsage(), and Undo().
|
private |
Definition at line 183 of file dungeon_undo_actions.h.
Referenced by MemoryUsage(), and Redo().
|
private |
Definition at line 184 of file dungeon_undo_actions.h.