|
Porytiles
|
Abstract service for managing artifact checksums. More...
#include <artifact_checksum_provider.hpp>
Public Member Functions | |
| virtual | ~ArtifactChecksumProvider ()=default |
| virtual std::unordered_map< ArtifactKey, std::string > | compute_tileset_artifact_checksums (const std::vector< ArtifactKey > &keys) const =0 |
| Computes checksums for the given Tileset artifacts. | |
| virtual std::unordered_map< ArtifactKey, std::string > | load_cached_tileset_checksums (const std::string &name) const =0 |
| Loads the cached checksums for the given Tileset. | |
| virtual ChainableResult< void > | cache_tileset_checksums (const std::string &name, const std::unordered_map< ArtifactKey, std::string > &checksums) const =0 |
| Caches checksums for the given Tileset to persistent storage. | |
| std::vector< ArtifactKey > | find_unsynced_tileset_artifacts (const std::string &name, const std::vector< ArtifactKey > &keys_to_check) const |
| Finds all artifacts for the given Tileset with unsynced changes compared to cached checksums. | |
| bool | cached_checksums_exist (const std::string &name) const |
| Check if any cached checksums exist for the given tileset. | |
| bool | all_checksums_tileset_match (const std::string &name, const std::vector< ArtifactKey > &artifact_keys) const |
| Checks if all artifact checksums for the given Tileset match their cached values. | |
Abstract service for managing artifact checksums.
The ArtifactChecksumProvider provides an interface for accessing and managing checksums for both Porymap and Porytiles artifacts.
Among other things, this service is essential for the compilation pipeline to determine when assets need to be recompiled based on changes to source files or existing artifacts.
Definition at line 22 of file artifact_checksum_provider.hpp.
|
virtualdefault |
|
inline |
Checks if all artifact checksums for the given Tileset match their cached values.
This method compares current checksums against cached checksums for the specified artifact keys and returns true if all match. It's effectively a convenience wrapper around find_unsynced_artifacts that simply checks if there are no unsynced artifacts.
| name | The name of the tileset to check |
| artifact_keys | The keys of artifacts to check |
Definition at line 110 of file artifact_checksum_provider.hpp.
|
pure virtual |
Caches checksums for the given Tileset to persistent storage.
| name | The name of the Tileset for which to cache checksums |
| checksums | A mapping of artifact keys to their checksums to be cached |
Implemented in porytiles::NoopArtifactChecksumProvider, and porytiles::ProjectArtifactChecksumProvider.
|
inline |
Check if any cached checksums exist for the given tileset.
| name | The name of the tileset to check |
Definition at line 92 of file artifact_checksum_provider.hpp.
|
pure virtual |
Computes checksums for the given Tileset artifacts.
| keys | The artifact keys for which to compute checksums |
Implemented in porytiles::NoopArtifactChecksumProvider, and porytiles::ProjectArtifactChecksumProvider.
|
inline |
Finds all artifacts for the given Tileset with unsynced changes compared to cached checksums.
This method compares current checksums against cached checksums for the specified artifact keys and returns a vector of keys that don't match.
| name | The name of the tileset to check |
| keys_to_check | The keys of artifacts to check |
Definition at line 66 of file artifact_checksum_provider.hpp.
|
pure virtual |
Loads the cached checksums for the given Tileset.
| name | The name of the Tileset for which to load cached checksums |
Implemented in porytiles::NoopArtifactChecksumProvider, and porytiles::ProjectArtifactChecksumProvider.