|
Porytiles
|
Repository interface for the Tileset aggregate root. More...
#include <tileset_repo.hpp>
Public Member Functions | |
| virtual | ~TilesetRepo ()=default |
| TilesetRepo (gsl::not_null< ArtifactChecksumProvider * > checksum_provider, gsl::not_null< TilesetArtifactKeyProvider * > key_provider, gsl::not_null< TilesetArtifactReader * > reader, gsl::not_null< TilesetArtifactWriter * > writer) | |
| 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 &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. Presumably, this store is the canonical 'data/tilesets' directory, but the details here are implementation-defined.
Definition at line 25 of file tileset_repo.hpp.
|
virtualdefault |
|
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 |
| 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 |
Definition at line 41 of file tileset_repo.hpp.
|
inline |
Gets a reference to the ArtifactChecksumProvider for this repo.
Definition at line 83 of file tileset_repo.hpp.
| bool porytiles2::TilesetRepo::exists | ( | const std::string & | name | ) | const |
Checks if the given Tileset exists in the backing store.
| name | The name of the Tileset to check. |
Definition at line 333 of file tileset_repo.cpp.
|
inline |
Gets a reference to the TilesetArtifactKeyProvider for this repo.
Definition at line 93 of file tileset_repo.hpp.
| ChainableResult< std::unique_ptr< Tileset > > porytiles2::TilesetRepo::load | ( | const std::string & | name | ) | const |
Loads an existing Tileset from storage.
| name | The name of the Tileset to load. |
Definition at line 132 of file tileset_repo.cpp.
| ChainableResult< void > porytiles2::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 24 of file tileset_repo.cpp.