|
Porytiles
|
Pokeemerald project filesystem-based implementation of ArtifactChecksumProvider. More...
#include <project_artifact_checksum_provider.hpp>
Public Member Functions | |
| ProjectArtifactChecksumProvider (std::filesystem::path project_root) | |
| std::unordered_map< ArtifactKey, std::string > | compute_tileset_artifact_checksums (const std::vector< ArtifactKey > &keys) const override |
| Computes checksums for the given Tileset artifacts. | |
| std::unordered_map< ArtifactKey, std::string > | load_cached_tileset_checksums (const std::string &tileset_name) const override |
| Loads the cached checksums for the given Tileset. | |
| ChainableResult< void > | cache_tileset_checksums (const std::string &tileset_name, const std::unordered_map< ArtifactKey, std::string > &checksums) const override |
| Caches checksums for the given Tileset to persistent storage. | |
Public Member Functions inherited from porytiles::ArtifactChecksumProvider | |
| virtual | ~ArtifactChecksumProvider ()=default |
| 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. | |
Pokeemerald project filesystem-based implementation of ArtifactChecksumProvider.
This class computes and caches checksums for tileset artifacts stored in a pokeemerald project. Checksums are persisted as JSON in the porytiles utility directory at porytiles/tilesets/{tileset_name}/tileset.cache.json.
Key paths are relativized against the project root before being stored, ensuring checksums remain valid even when the project directory is moved.
Definition at line 24 of file project_artifact_checksum_provider.hpp.
|
inlineexplicit |
Definition at line 26 of file project_artifact_checksum_provider.hpp.
|
overridevirtual |
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 |
Implements porytiles::ArtifactChecksumProvider.
Definition at line 69 of file project_artifact_checksum_provider.cpp.
|
overridevirtual |
Computes checksums for the given Tileset artifacts.
| keys | The artifact keys for which to compute checksums |
Implements porytiles::ArtifactChecksumProvider.
Definition at line 27 of file project_artifact_checksum_provider.cpp.
|
overridevirtual |
Loads the cached checksums for the given Tileset.
| name | The name of the Tileset for which to load cached checksums |
Implements porytiles::ArtifactChecksumProvider.
Definition at line 47 of file project_artifact_checksum_provider.cpp.