|
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::string &tileset_name) const =0 |
| Computes checksums for the artifacts that belong to the given Tileset. | |
| virtual std::unordered_map< ArtifactKey, std::string > | load_cached_tileset_checksums (const std::string &tileset_name) const =0 |
| Loads the cached checksums for the given Tileset. | |
| virtual Result< void > | cache_tileset_checksums (const std::string &tileset_name, const std::unordered_map< ArtifactKey, std::string > &checksums) const =0 |
| Caches checksums for the given Tileset to persistent storage. | |
| virtual std::vector< ArtifactKey > | find_unsynced_tileset_artifacts (const std::string &tileset_name, const std::vector< ArtifactKey > &artifact_keys) const |
| Finds all artifacts for the given Tileset with unsynced changes compared to cached checksums. | |
| virtual bool | all_checksums_tileset_match (const std::string &tileset_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 metadata about both Porymap and Porytiles artifacts. This includes computing and storing checksums for integrity verification, retrieving modification timestamps, and determining temporal relationships between different artifact sets.
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 23 of file artifact_checksum_provider.hpp.
|
virtualdefault |
|
virtual |
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.
| tileset_name | The name of the tileset to check |
| artifact_keys | The keys of artifacts to check |
Definition at line 27 of file artifact_checksum_provider.cpp.
|
pure virtual |
Caches checksums for the given Tileset to persistent storage.
| tileset_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 porytiles2::NoopArtifactChecksumProvider, and porytiles2::ProjectArtifactChecksumProvider.
|
pure virtual |
Computes checksums for the artifacts that belong to the given Tileset.
| tileset_name | The name of the Tileset for which to compute checksums |
Implemented in porytiles2::NoopArtifactChecksumProvider, and porytiles2::ProjectArtifactChecksumProvider.
|
virtual |
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.
| tileset_name | The name of the tileset to check |
| artifact_keys | The keys of artifacts to check |
Definition at line 9 of file artifact_checksum_provider.cpp.
|
pure virtual |
Loads the cached checksums for the given Tileset.
| tileset_name | The name of the Tileset for which to load cached checksums |
Implemented in porytiles2::NoopArtifactChecksumProvider, and porytiles2::ProjectArtifactChecksumProvider.