Porytiles
Loading...
Searching...
No Matches
import_primary_tileset.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
10
11namespace porytiles2 {
12
17 public:
26 std::unique_ptr<TilesetRepo> tileset_repo,
27 std::unique_ptr<PrimaryTilesetCompiler> compiler,
28 std::unique_ptr<DomainConfig> config)
29 : tileset_repo_{std::move(tileset_repo)}, compiler_{std::move(compiler)}, config_{std::move(config)}
30 {
31 }
32
39 [[nodiscard]] Result<void> import(const std::string &tileset_name) const;
40
41 private:
42 std::unique_ptr<TilesetRepo> tileset_repo_;
43 std::unique_ptr<PrimaryTilesetCompiler> compiler_;
44 std::unique_ptr<DomainConfig> config_;
45};
46
47} // namespace porytiles2
Use case for importing a primary Tileset.
ImportPrimaryTileset(std::unique_ptr< TilesetRepo > tileset_repo, std::unique_ptr< PrimaryTilesetCompiler > compiler, std::unique_ptr< DomainConfig > config)
Constructs an ImportPrimaryTileset use case with the given repositories and services.
std::expected< T, E > Result
A result with some type T on success, otherwise an error of type E.
Definition result.hpp:25