yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_bundle_verify_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_BUNDLE_VERIFY_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_BUNDLE_VERIFY_COMMANDS_H_
3
5
6namespace yaze::cli::handlers {
7
8// Verify the structural integrity and portability of a .yaze project file or
9// .yazeproj bundle directory.
10//
11// Checks performed:
12// - Path exists and is a recognized project format
13// - For .yazeproj bundles: directory structure and project.yaze presence
14// - project.yaze parses successfully
15// - Referenced paths are structurally sane (portability warnings for
16// absolute paths)
17// - ROM file referenced by project exists and is readable (if present)
18//
19// Exit codes:
20// 0 All checks pass (warnings are allowed)
21// 1 Any check failed, or invalid arguments
23 public:
24 std::string GetName() const override { return "project-bundle-verify"; }
25 std::string GetUsage() const override {
26 return "project-bundle-verify --project <path> "
27 "[--check-rom-hash] [--format <json|text>] [--report <path>]";
28 }
29
30 bool RequiresRom() const override { return false; }
31
32 Descriptor Describe() const override;
33
34 absl::Status ValidateArgs(
35 const resources::ArgumentParser& parser) override;
36
37 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
38 resources::OutputFormatter& formatter) override;
39};
40
41} // namespace yaze::cli::handlers
42
43#endif // YAZE_SRC_CLI_HANDLERS_ROM_PROJECT_BUNDLE_VERIFY_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
std::string GetUsage() const override
Get the command usage string.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
Descriptor Describe() const override
Provide metadata for TUI/help summaries.
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.
bool RequiresRom() const override
Check if the command requires a loaded ROM.
Utility for parsing common CLI argument patterns.
Base class for CLI command handlers.
Utility for consistent output formatting across commands.