|
Porytiles
|
Repository interface for the Tileset aggregate root. More...
#include <tileset_repo.hpp>
Public Member Functions | |
| 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. | |
| ChainableResult< std::unique_ptr< Tileset > > | load (const std::string &name) const |
| Loads an existing Tileset from storage. | |
| bool | exists (const std::string &tileset_name) const |
| Checks if the given Tileset exists in the backing store. | |
| const ArtifactChecksumProvider & | checksum_provider () const |
| Gets a reference to the ArtifactChecksumProvider for this repo. | |
| const TilesetArtifactKeyProvider & | key_provider () const |
| Gets a reference to the TilesetArtifactKeyProvider for this repo. | |
Repository interface for the Tileset aggregate root.
The TilesetRepo makes no assumptions about the structure of the backing store for the Tileset. The implementation details are handled by the supplied reader, writer, and key provider.
Definition at line 26 of file tileset_repo.hpp.
|
inlineexplicit |
Constructs a TilesetRepo with the required dependencies.
Initializes the repository with all necessary components for tileset persistence operations. These dependencies provide the concrete implementations for metadata management, key generation, and artifact I/O operations.
| checksum_provider | Provider for computing and caching artifact checksums |
| metadata_provider | Provider for getting tileset metadata |
| key_provider | Provider for generating keys and discovering artifacts in the backing store |
| reader | Reader implementation for loading artifacts from the backing store |
| writer | Writer implementation for saving artifacts to the backing store |
| diag | Pointer to a UserDiagnostics for this repo |
Definition at line 42 of file tileset_repo.hpp.
|
inline |
Gets a reference to the ArtifactChecksumProvider for this repo.
Definition at line 87 of file tileset_repo.hpp.
| bool porytiles::TilesetRepo::exists | ( | const std::string & | tileset_name | ) | const |
Checks if the given Tileset exists in the backing store.
| tileset_name | The name of the Tileset to check. |
Definition at line 483 of file tileset_repo.cpp.
|
inline |
Gets a reference to the TilesetArtifactKeyProvider for this repo.
Definition at line 97 of file tileset_repo.hpp.
| ChainableResult< std::unique_ptr< Tileset > > porytiles::TilesetRepo::load | ( | const std::string & | name | ) | const |
Loads an existing Tileset from storage.
| name | The name of the Tileset to load. |
Definition at line 198 of file tileset_repo.cpp.
| ChainableResult< void > porytiles::TilesetRepo::save | ( | const Tileset & | tileset | ) | const |
Persists a given Tileset and caches new artifact checksums.
When persisting a Tileset, the repository saves the tileset and caches new artifact checksums for the persisted data.
| tileset | The Tileset to save. |
Definition at line 17 of file tileset_repo.cpp.