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"; }
17 return "Get colors from a palette";
20 return "palette-get-colors --palette <palette_id> [--format <json|text>]";
36 std::string
GetName()
const {
return "palette-set-color"; }
38 return "Set a color in a palette";
41 return "palette-set-color --palette <palette_id> --index <index> --color <color> [--format <json|text>]";
45 return parser.
RequireArgs({
"palette",
"index",
"color"});
57 std::string
GetName()
const {
return "palette-analyze"; }
59 return "Analyze palette colors and properties";
62 return "palette-analyze [--palette <palette_id>] [--format <json|text>]";
66 return absl::OkStatus();
The Rom class is used to load, save, and modify Rom data.
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.
Main namespace for the application.