Porytiles
Loading...
Searching...
No Matches
compile_primary_tileset.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "gsl/pointers"
6
10
11namespace porytiles2 {
12
17 public:
24 CompilePrimaryTileset(gsl::not_null<TilesetRepo *> tileset_repo, gsl::not_null<PrimaryTilesetCompiler *> compiler)
25 : tileset_repo_{tileset_repo}, compiler_{compiler}
26 {
27 }
28
40 [[nodiscard]] ChainableResult<void> compile(const std::string &tileset_name) const;
41
42 private:
43 TilesetRepo *tileset_repo_;
44 PrimaryTilesetCompiler *compiler_;
45};
46
47} // namespace porytiles2
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Use case for compiling a primary Tileset.
CompilePrimaryTileset(gsl::not_null< TilesetRepo * > tileset_repo, gsl::not_null< PrimaryTilesetCompiler * > compiler)
Constructs a CompilePrimaryTileset use case with the given repositories and services.
ChainableResult< void > compile(const std::string &tileset_name) const
Compiles the primary Tileset with the given tileset name.
Service that compiles a primary Tileset.
Repository interface for the Tileset aggregate root.