yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
subcommand_routes.h
Go to the documentation of this file.
1#ifndef YAZE_CLI_SUBCOMMAND_ROUTES_H_
2#define YAZE_CLI_SUBCOMMAND_ROUTES_H_
3
4#include <string>
5#include <vector>
6
7#include "absl/status/statusor.h"
8#include "absl/strings/string_view.h"
9#include "absl/types/span.h"
10
11namespace yaze::cli {
12
13// A registered command name and the arguments to execute it with.
15 std::string command;
16 std::vector<std::string> args;
17
18 bool operator==(const CommandInvocation&) const = default;
19};
20
21// `z3ed rom <subcommand> ...` aliases for the rom-* commands. `args` starts
22// at the subcommand.
23absl::StatusOr<CommandInvocation> ResolveRomSubcommand(
24 absl::Span<const std::string> args);
25std::vector<absl::string_view> RomSubcommandNames();
26std::string RomSubcommandUsage();
27
28// `z3ed debug <topic> ...` aliases. The command is chosen by
29// --backend=mesen|grpc (default mesen), which may appear anywhere in `args`.
30absl::StatusOr<CommandInvocation> ResolveDebugSubcommand(
31 absl::Span<const std::string> args);
32std::string DebugSubcommandUsage();
33
34} // namespace yaze::cli
35
36#endif // YAZE_CLI_SUBCOMMAND_ROUTES_H_
absl::StatusOr< CommandInvocation > ResolveRomSubcommand(absl::Span< const std::string > args)
std::string RomSubcommandUsage()
absl::StatusOr< CommandInvocation > ResolveDebugSubcommand(absl::Span< const std::string > args)
std::vector< absl::string_view > RomSubcommandNames()
std::string DebugSubcommandUsage()
bool operator==(const CommandInvocation &) const =default
std::vector< std::string > args