#include <message_doctor_commands.h>


Public Member Functions | |
| MessageDoctorCommandHandler ()=default | |
| ~MessageDoctorCommandHandler () override=default | |
| std::string | GetName () const override |
| Get the command name. | |
| std::string | GetUsage () const override |
| Get the command usage string. | |
| resources::CommandHandler::Descriptor | Describe () const override |
| Provide metadata for TUI/help summaries. | |
| bool | RequiresRom () const override |
| Check if the command requires a loaded ROM. | |
| absl::Status | ValidateArgs (const resources::ArgumentParser &parser) override |
| Validate command arguments. | |
| absl::Status | Execute (Rom *rom, const resources::ArgumentParser &args, resources::OutputFormatter &formatter) override |
| Execute the command business logic. | |
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 | RequiresLabels () const |
| Check if the command requires ROM labels. | |
| virtual void | SetProjectContext (project::YazeProject *project) |
| Set the YazeProject context. Default implementation does nothing, override if tool needs project info. | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::cli::resources::CommandHandler | |
| virtual std::string | GetDefaultFormat () const |
| Get the default output format ("json" or "text") | |
| virtual std::string | GetOutputTitle () const |
| Get the output title for formatting. | |
Protected Attributes inherited from yaze::cli::resources::CommandHandler | |
| Rom * | rom_ = nullptr |
| project::YazeProject * | project_ = nullptr |
| core::AsarWrapper * | asar_wrapper_ = nullptr |
Definition at line 9 of file message_doctor_commands.h.
|
default |
|
overridedefault |
|
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 14 of file message_doctor_commands.h.
|
inlineoverridevirtual |
Get the command usage string.
Implements yaze::cli::resources::CommandHandler.
Definition at line 15 of file message_doctor_commands.h.
|
inlineoverridevirtual |
Provide metadata for TUI/help summaries.
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 17 of file message_doctor_commands.h.
References yaze::cli::resources::CommandHandler::Descriptor::summary.
|
inlineoverridevirtual |
Check if the command requires a loaded ROM.
Override to return false if ROM is not needed (e.g., filesystem tools).
Reimplemented from yaze::cli::resources::CommandHandler.
Definition at line 23 of file message_doctor_commands.h.
|
inlineoverridevirtual |
Validate command arguments.
Override this to check required arguments and perform custom validation. Called before Execute().
Implements yaze::cli::resources::CommandHandler.
Definition at line 25 of file message_doctor_commands.h.
|
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 161 of file message_doctor_commands.cc.
References yaze::cli::resources::OutputFormatter::AddArrayItem(), yaze::cli::resources::OutputFormatter::AddField(), yaze::cli::DiagnosticReport::AddFinding(), yaze::cli::resources::OutputFormatter::BeginArray(), yaze::editor::BuildDictionaryEntries(), yaze::cli::DiagnosticReport::critical_count, yaze::Rom::data(), yaze::cli::resources::OutputFormatter::EndArray(), yaze::cli::DiagnosticReport::error_count, yaze::cli::DiagnosticReport::findings, yaze::cli::DiagnosticFinding::fixable, yaze::cli::DiagnosticReport::fixable_count, yaze::cli::resources::ArgumentParser::HasFlag(), yaze::cli::DiagnosticReport::HasProblems(), yaze::cli::DiagnosticFinding::id, yaze::cli::DiagnosticReport::info_count, yaze::Rom::is_loaded(), yaze::cli::resources::OutputFormatter::IsJson(), yaze::cli::kCritical, yaze::editor::kTextData, yaze::cli::DiagnosticFinding::location, yaze::cli::DiagnosticFinding::message, yaze::editor::ReadAllTextData(), yaze::cli::DiagnosticFinding::severity, yaze::cli::DiagnosticReport::TotalFindings(), and yaze::cli::DiagnosticReport::warning_count.