#include <dungeon_wall_profile_commands.h>


Public Member Functions | |
| std::string | GetName () const override |
| Get the command name. | |
| std::string | GetUsage () const override |
| Get the command usage string. | |
| Descriptor | Describe () const override |
| Provide metadata for TUI/help summaries. | |
| absl::Status | ValidateArgs (const resources::ArgumentParser &parser) override |
| Validate command arguments. | |
| absl::Status | Execute (Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override |
| Execute the command business logic. | |
| absl::Status | ExecuteWithContext (Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter, const resources::CommandInvocationContext &context) override |
| Execute with immutable, invocation-scoped ROM path identity. | |
Public Member Functions inherited from yaze::cli::resources::CommandHandler | |
| virtual | ~CommandHandler ()=default |
| absl::Status | Run (const std::vector< std::string > &args, Rom *rom_context, std::string *captured_output=nullptr) |
| Execute the command. | |
| virtual bool | RequiresRom () const |
| Check if the command requires a loaded ROM. | |
| virtual bool | RequiresLabels () const |
| Check if the command requires ROM labels. | |
| virtual void | SetProjectContext (project::YazeProject *project) |
| Set the YazeProject context. Binds the loaded project for inspection metadata and write policy checks. | |
| virtual void | SetAsarWrapper (core::AsarWrapper *asar_wrapper) |
| Set the AsarWrapper context. Default implementation does nothing, override if tool needs Asar access. | |
| virtual void | SetRomContext (Rom *rom) |
| Set the ROM context for tools that need ROM access. Default implementation stores the ROM pointer for subclass use. | |
| virtual void | SetAssemblySymbolTable (const std::map< std::string, core::AsarSymbol > *table) |
| Optional Asar symbol table for assembly-aware tools. | |
| virtual void | SetSymbolProvider (emu::debug::SymbolProvider *provider) |
| Set the SymbolProvider context. | |
Private Member Functions | |
| std::string | GetDefaultFormat () const override |
| Get the default output format ("json" or "text") | |
| std::string | GetOutputTitle () const override |
| Get the output title for formatting. | |
Additional Inherited Members | |
Protected Attributes inherited from yaze::cli::resources::CommandHandler | |
| Rom * | rom_ = nullptr |
| emu::debug::SymbolProvider * | symbol_provider_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| core::AsarWrapper * | asar_wrapper_ = nullptr |
| const std::map< std::string, core::AsarSymbol > * | assembly_symbol_table_ |
Definition at line 10 of file dungeon_wall_profile_commands.h.
|
inlineoverridevirtual |
Get the command name.
Override this to provide a unique identifier for the command. This is used for command registration and lookup.
Implements yaze::cli::resources::CommandHandler.
Definition at line 12 of file dungeon_wall_profile_commands.h.
|
inlineoverridevirtual |
Get the command usage string.
Implements yaze::cli::resources::CommandHandler.
Definition at line 13 of file dungeon_wall_profile_commands.h.
|
overridevirtual |
Provide metadata for TUI/help summaries.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 90 of file dungeon_wall_profile_commands.cc.
References yaze::cli::resources::CommandHandler::Descriptor::display_name, yaze::cli::resources::CommandHandler::Descriptor::entries, and yaze::cli::resources::CommandHandler::Descriptor::summary.
|
overridevirtual |
Validate command arguments.
Implements yaze::cli::resources::CommandHandler.
Definition at line 109 of file dungeon_wall_profile_commands.cc.
References yaze::cli::resources::ArgumentParser::GetString(), yaze::cli::resources::ArgumentParser::RequireArgs(), and RETURN_IF_ERROR.
Referenced by ExecuteWithContext().

|
overridevirtual |
Execute the command business logic.
Override this to implement command-specific functionality. The ROM is guaranteed to be loaded and labels initialized.
Implements yaze::cli::resources::CommandHandler.
Definition at line 122 of file dungeon_wall_profile_commands.cc.
References yaze::cli::resources::CommandInvocationContext::active_rom_path, ExecuteWithContext(), yaze::Rom::filename(), and yaze::cli::resources::CommandInvocationContext::source_rom_path.

|
overridevirtual |
Execute with immutable, invocation-scoped ROM path identity.
Handlers that protect filesystem outputs from aliasing a source or sandbox ROM can override this hook. Existing handlers continue through Execute() without carrying mutable state on singleton handler instances.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 133 of file dungeon_wall_profile_commands.cc.
References yaze::core::AcquireSourceArtifactPublicationLock(), yaze::cli::resources::OutputFormatter::AddField(), ASSIGN_OR_RETURN, yaze::core::ComputeSourceArtifactSha256(), yaze::project::YazeProject::dungeon_tile_patterns, yaze::project::YazeProject::filepath, yaze::project::YazeProject::GetAbsolutePath(), yaze::cli::resources::ArgumentParser::GetString(), yaze::zelda3::LoadDungeonTilePatterns(), yaze::zelda3::LoadDungeonWallProfiles(), yaze::zelda3::ParseDungeonTilePatterns(), yaze::zelda3::ResolvedWallProfile::patterns(), yaze::zelda3::ResolvedWallProfile::profile_id(), yaze::cli::resources::CommandHandler::project_, yaze::core::PublishSourceArtifacts(), yaze::cli::resources::ResolveStableArtifactPath(), yaze::zelda3::ResolveWallProfile(), RETURN_IF_ERROR, yaze::zelda3::DungeonTilePatterns::source_path, yaze::zelda3::DungeonTilePatterns::source_text, yaze::core::SourceArtifactPublisherLabels::subject, ValidateArgs(), and yaze::zelda3::DungeonTilePatterns::words.
Referenced by Execute().
|
inlineoverrideprivatevirtual |
Get the default output format ("json" or "text")
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 28 of file dungeon_wall_profile_commands.h.
|
inlineoverrideprivatevirtual |
Get the output title for formatting.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 29 of file dungeon_wall_profile_commands.h.