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] [--smart] [--all] "
30 "[--region <category>]";
31 }
32
33 std::string GetDefaultFormat() const override { return "text"; }
34
35 std::string GetOutputTitle() const override { return "ROM Compare"; }
36
37 Descriptor Describe() const override {
38 Descriptor desc;
39 desc.display_name = "rom-compare";
40 desc.summary = "Compare a target ROM against a baseline to identify "
41 "differences, detect corruption, and verify data integrity "
42 "with optional region filtering and smart diffing.";
43 desc.todo_reference = "todo#rom-compare";
44 return desc;
45 }
46
47 absl::Status ValidateArgs(
48 const resources::ArgumentParser& parser) override {
49 if (!parser.GetString("baseline").has_value()) {
50 return absl::InvalidArgumentError("Missing required --baseline argument");
51 }
52 return absl::OkStatus();
53 }
54
55 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
56 resources::OutputFormatter& formatter) override;
57};
58
59} // namespace yaze::cli
60
61#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:28
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.