44 gsl::not_null<const TilesetMetadataProvider *> metadata_provider,
45 gsl::not_null<const TilesetArtifactKeyProvider *>
key_provider,
46 gsl::not_null<const TilesetArtifactReader *> reader,
47 gsl::not_null<TilesetArtifactWriter *> writer,
48 gsl::not_null<const UserDiagnostics *> diag)
50 reader_{reader}, writer_{writer}, diag_{diag}
80 [[nodiscard]]
bool exists(
const std::string &tileset_name)
const;
89 return *checksum_provider_;
99 return *key_provider_;
Abstract service for managing artifact checksums.
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Abstract interface for generating keys and discovering tileset artifacts in a backing store.
Abstract interface for reading tileset artifacts from a backing store into a Tileset object.
Abstract interface for writing tileset artifacts from a Tileset object to a backing store.
Repository interface for the Tileset aggregate root.
TilesetRepo(gsl::not_null< const ArtifactChecksumProvider * > checksum_provider, gsl::not_null< const TilesetMetadataProvider * > metadata_provider, gsl::not_null< const TilesetArtifactKeyProvider * > key_provider, gsl::not_null< const TilesetArtifactReader * > reader, gsl::not_null< TilesetArtifactWriter * > writer, gsl::not_null< const UserDiagnostics * > diag)
Constructs a TilesetRepo with the required dependencies.
ChainableResult< void > save(const Tileset &tileset) const
Persists a given Tileset and caches new artifact checksums.
bool exists(const std::string &tileset_name) const
Checks if the given Tileset exists in the backing store.
ChainableResult< std::unique_ptr< Tileset > > load(const std::string &name) const
Loads an existing Tileset from storage.
const TilesetArtifactKeyProvider & key_provider() const
Gets a reference to the TilesetArtifactKeyProvider for this repo.
const ArtifactChecksumProvider & checksum_provider() const
Gets a reference to the ArtifactChecksumProvider for this repo.
A complete tileset containing both Porytiles and Porymap components.
Abstract class for structured error reporting and diagnostic output.
@ tileset
Configuration scoped to a specific tileset.