24 gsl::not_null<InfraConfig *> config,
25 std::filesystem::path project_root,
26 gsl::not_null<PngRgbaImageSaver *> png_rgba_saver,
27 gsl::not_null<PngIndexedImageSaver *> png_indexed_saver,
28 gsl::not_null<FilePalSaver *> pal_saver)
29 : config_{config}, project_root_{std::move(project_root)}, png_rgba_saver_{png_rgba_saver},
30 png_indexed_saver_{png_indexed_saver}, pal_saver_{pal_saver}
45 std::filesystem::path project_root_;
46 std::filesystem::path transaction_root_;
A type-safe wrapper for artifact keys.
A result type that maintains a chainable sequence of errors for debugging and error reporting.
A service interface that saves a Palette to a given file.
Interface that defines a complete infra layer configuration.
An image saver that saves PNG files from an Image with an index pixel type.
An image saver that saves PNG files from an Image with an Rgba32 pixel type.
Provides a filesystem-based implementation for TilesetArtifactWriter.
Result< void > rollback() override
Rolls back all buffered write operations in the current transaction.
ChainableResult< void > write(const ArtifactKey &dest_key, const TilesetArtifact &artifact, const Tileset &src) override
Writes an artifact from a Tileset to the backing store.
ChainableResult< void > commit() override
Commits all buffered write operations in the current transaction.
ProjectTilesetArtifactWriter(gsl::not_null< InfraConfig * > config, std::filesystem::path project_root, gsl::not_null< PngRgbaImageSaver * > png_rgba_saver, gsl::not_null< PngIndexedImageSaver * > png_indexed_saver, gsl::not_null< FilePalSaver * > pal_saver)
Result< void > begin_transaction() override
Begins a new transaction for atomic write operations.
Abstract interface for writing tileset artifacts from a Tileset object to a backing store.
Represents a Pokémon Generation III decomp tileset artifact with type and optional metadata.
A complete tileset containing both Porytiles and Porymap components.
std::expected< T, E > Result
A result with some type T on success, otherwise an error of type E.