1#ifndef YAZE_SRC_CLI_HANDLERS_MESSAGE_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_MESSAGE_COMMANDS_H_
15 std::string
GetName()
const {
return "message-list"; }
18 return "message-list [--limit <limit>] [--format <json|text>]";
22 return absl::OkStatus();
34 std::string
GetName()
const {
return "message-read"; }
37 return "message-read --id <message_id> [--format <json|text>]";
53 std::string
GetName()
const {
return "message-search"; }
55 return "Search messages by text content";
58 return "message-search --query <query> [--limit <limit>] [--format "
78 std::string
GetName()
const override {
return "message-encode"; }
80 return "message-encode --text <text> [--format <json|text>]";
100 std::string
GetName()
const override {
return "message-decode"; }
102 return "message-decode --hex <hex_bytes> [--format <json|text>]";
122 std::string
GetName()
const override {
return "message-import-org"; }
124 return "message-import-org --file <path> [--format <json|text>]";
143 std::string
GetName()
const override {
return "message-export-org"; }
145 return "message-export-org --output <path> [--format <json|text>]";
162 std::string
GetName()
const override {
return "message-export-bundle"; }
164 return "message-export-bundle --output <path> [--range <all|vanilla|expanded>]"
165 " [--format <json|text>]";
182 std::string
GetName()
const override {
return "message-import-bundle"; }
184 return "message-import-bundle --file <path> [--apply] [--strict]"
185 " [--range <all|vanilla|expanded>] [--format <json|text>]";
204 std::string
GetName()
const override {
return "message-write"; }
206 return "message-write --id <id> --text <text> [--format <json|text>]";
223 std::string
GetName()
const override {
return "message-export-bin"; }
225 return "message-export-bin --output <path> [--range expanded] "
226 "[--format <json|text>]";
243 std::string
GetName()
const override {
return "message-export-asm"; }
245 return "message-export-asm --output <path> [--range expanded] "
246 "[--format <json|text>]";
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Decode raw ROM bytes (hex string) to human-readable text.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
Encode a human-readable message string to ROM bytes.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
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.
Export expanded message region as assembly source.
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.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
Export expanded message region as binary or assembly.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
std::string GetUsage() const override
Get the command usage string.
Export messages as a bundle JSON for round-trip editing.
std::string GetUsage() const override
Get the command usage string.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const override
Get the command name.
Export messages from ROM as .org format.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetUsage() const override
Get the command usage string.
std::string GetName() const override
Get the command name.
Import messages from a bundle JSON for validation or apply to ROM.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Import messages from .org format file.
std::string GetName() const override
Get the command name.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for listing messages.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Command handler for reading messages.
std::string GetDescription() const
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.
std::string GetUsage() const
Get the command usage string.
std::string GetName() const
Get the command name.
Command handler for searching messages.
std::string GetName() const
Get the command name.
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.
std::string GetDescription() const
Write an encoded message to the expanded message bank.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
std::string GetName() const override
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetUsage() const override
Get the command usage string.
absl::Status Execute(Rom *rom, const resources::ArgumentParser &parser, resources::OutputFormatter &formatter) override
Execute the command business logic.
Utility for parsing common CLI argument patterns.
absl::Status RequireArgs(const std::vector< std::string > &required) const
Validate that required arguments are present.
Base class for CLI command handlers.