Porytiles
Loading...
Searching...
No Matches
create_tileset_command.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4
5#include "CLI/CLI.hpp"
6
7#include "command.hpp"
8#include "option_group.hpp"
9
10class CreateTilesetCommand final : public Command {
11 public:
12 explicit CreateTilesetCommand(CLI::App &parent_app) : Command{parent_app, kCommandName, kCommandDesc, kCommandGroup}
13 {
14 CLI::App &cmd = get_app();
15 fieldmap_opts_.RegisterGroup(cmd);
16 diagnostics_opts_.RegisterGroup(cmd);
17 }
18
19 void Run() override
20 {
21 std::cout << "Create tileset command called." << std::endl;
22 }
23
24 private:
25 static constexpr auto kCommandName = "create-tileset";
26 static constexpr auto kCommandDesc = "Create a new tileset.";
27 static constexpr auto kCommandGroup = "COMMANDS";
28
29 OptGroupFieldmap fieldmap_opts_;
30 OptGroupDiagnostics diagnostics_opts_;
31};
Command is an abstract class that provides basic command functionality for the Porytiles CLI driver.
Definition command.hpp:18
CLI::App & get_app() const
Definition command.hpp:45
CreateTilesetCommand(CLI::App &parent_app)
void RegisterGroup(CLI::App &app) override
void RegisterGroup(CLI::App &app) override