Command handler for listing messages. More...
#include <message_commands.h>
Public Member Functions | |
std::string | GetName () const |
Get the command name. | |
std::string | GetDescription () const |
std::string | GetUsage () const |
Get the command usage string. | |
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. | |
![]() | |
virtual | ~CommandHandler ()=default |
absl::Status | Run (const std::vector< std::string > &args, Rom *rom_context) |
Execute the command. | |
virtual Descriptor | Describe () const |
Provide metadata for TUI/help summaries. | |
Additional Inherited Members | |
![]() | |
virtual bool | RequiresLabels () const |
Check if the command requires ROM labels. | |
virtual std::string | GetDefaultFormat () const |
Get the default output format ("json" or "text") | |
virtual std::string | GetOutputTitle () const |
Get the output title for formatting. | |
Command handler for listing messages.
Definition at line 13 of file message_commands.h.
|
inlinevirtual |
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 15 of file message_commands.h.
|
inline |
Definition at line 16 of file message_commands.h.
|
inlinevirtual |
Get the command usage string.
Implements yaze::cli::resources::CommandHandler.
Definition at line 19 of file message_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 23 of file message_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 9 of file message_commands.cc.
References yaze::cli::resources::OutputFormatter::AddField(), yaze::cli::resources::OutputFormatter::BeginArray(), yaze::cli::resources::OutputFormatter::BeginObject(), yaze::cli::resources::OutputFormatter::EndArray(), yaze::cli::resources::OutputFormatter::EndObject(), and yaze::cli::resources::ArgumentParser::GetInt().