yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
rom_compare_commands.h
Go to the documentation of this file.
1#ifndef YAZE_CLI_HANDLERS_TOOLS_ROM_COMPARE_COMMANDS_H
2#define YAZE_CLI_HANDLERS_TOOLS_ROM_COMPARE_COMMANDS_H
3
5
6namespace yaze::cli {
7
20 public:
21 std::string GetName() const override { return "rom-compare"; }
22
23 std::string GetDescription() const {
24 return "Compare two ROMs to identify differences and corruption";
25 }
26
27 std::string GetUsage() const override {
28 return "rom-compare --rom <path> --baseline <path> [--verbose] "
29 "[--show-diff] [--format json|text]";
30 }
31
32 std::string GetDefaultFormat() const override { return "text"; }
33
34 std::string GetOutputTitle() const override { return "ROM Compare"; }
35
36 Descriptor Describe() const override {
37 Descriptor desc;
38 desc.display_name = "rom-compare";
39 desc.summary = "Compare a target ROM against a baseline to identify "
40 "differences, detect corruption, and verify data integrity.";
41 desc.todo_reference = "todo#rom-compare";
42 return desc;
43 }
44
45 absl::Status ValidateArgs(
46 const resources::ArgumentParser& parser) override {
47 if (!parser.GetString("baseline").has_value()) {
48 return absl::InvalidArgumentError("Missing required --baseline argument");
49 }
50 return absl::OkStatus();
51 }
52
53 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
54 resources::OutputFormatter& formatter) override;
55};
56
57} // namespace yaze::cli
58
59#endif // YAZE_CLI_HANDLERS_TOOLS_ROM_COMPARE_COMMANDS_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Compare two ROMs to identify differences and corruption.
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 GetName() const override
Get the command name.
std::string GetOutputTitle() const override
Get the output title for formatting.
std::string GetDefaultFormat() const override
Get the default output format ("json" or "text")
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
std::string GetUsage() const override
Get the command usage string.
Utility for parsing common CLI argument patterns.
std::optional< std::string > GetString(const std::string &name) const
Parse a named argument (e.g., –format=json or –format json)
Base class for CLI command handlers.
Utility for consistent output formatting across commands.
Namespace for the command line interface.