yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
project_commands.h
Go to the documentation of this file.
1#ifndef YAZE_SRC_CLI_HANDLERS_PROJECT_COMMANDS_H_
2#define YAZE_SRC_CLI_HANDLERS_PROJECT_COMMANDS_H_
3
5
6namespace yaze {
7namespace cli {
8namespace handlers {
9
14 public:
15 std::string GetName() const { return "project-init"; }
16 std::string GetDescription() const { return "Initialize a new Yaze project"; }
17 std::string GetUsage() const { return "project-init --project_name <name>"; }
18
19 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
20 return parser.RequireArgs({"project_name"});
21 }
22
23 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
24 resources::OutputFormatter& formatter) override;
25};
26
31 public:
32 std::string GetName() const { return "project-build"; }
33 std::string GetDescription() const { return "Build a Yaze project"; }
34 std::string GetUsage() const { return "project-build"; }
35
36 absl::Status ValidateArgs(const resources::ArgumentParser& parser) override {
37 return absl::OkStatus();
38 }
39
40 absl::Status Execute(Rom* rom, const resources::ArgumentParser& parser,
41 resources::OutputFormatter& formatter) override;
42};
43
44} // namespace handlers
45} // namespace cli
46} // namespace yaze
47
48#endif // YAZE_SRC_CLI_HANDLERS_PROJECT_COMMANDS_H_
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
Command handler for building projects.
std::string GetName() const
Get the command name.
absl::Status ValidateArgs(const resources::ArgumentParser &parser) override
Validate command arguments.
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 initializing new projects.
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 GetUsage() const
Get the command usage string.
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.
Utility for consistent output formatting across commands.
Main namespace for the application.