1#ifndef YAZE_SRC_CLI_HANDLERS_PALETTE_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_PALETTE_COMMANDS_H_
15 std::string
GetName()
const {
return "palette-get-colors"; }
18 return "palette-get-colors --palette <palette_id> [--format <json|text>]";
34 std::string
GetName()
const {
return "palette-set-color"; }
37 return "palette-set-color --palette <palette_id> --index <index> --color "
38 "<color> [--format <json|text>]";
42 return parser.
RequireArgs({
"palette",
"index",
"color"});
54 std::string
GetName()
const {
return "palette-analyze"; }
56 return "Analyze palette colors and properties";
59 return "palette-analyze [--palette <palette_id>] [--format <json|text>]";
63 return absl::OkStatus();
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Command handler for analyzing palettes.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
std::string GetName() const
Get the command name.
std::string GetDescription() const
std::string GetUsage() const
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 getting palette colors.
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.
std::string GetUsage() const
Get the command usage string.
std::string GetDescription() const
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Command handler for setting palette colors.
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 GetUsage() const
Get the command usage string.
std::string GetDescription() const
std::string GetName() const
Get the command name.
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.