Porytiles
Loading...
Searching...
No Matches
porytiles2::ProjectArtifactChecksumProvider Class Referencefinal

TODO: fill in doxygen. More...

#include <project_artifact_checksum_provider.hpp>

Inheritance diagram for porytiles2::ProjectArtifactChecksumProvider:
[legend]
Collaboration diagram for porytiles2::ProjectArtifactChecksumProvider:
[legend]

Public Member Functions

 ProjectArtifactChecksumProvider (gsl::not_null< ProjectTilesetArtifactKeyProvider * > key_provider)
 
std::unordered_map< ArtifactKey, std::string > compute_tileset_artifact_checksums (const std::string &tileset_name) const override
 Computes checksums for the artifacts that belong to the given Tileset.
 
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.
 
Result< 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 porytiles2::ArtifactChecksumProvider
virtual ~ArtifactChecksumProvider ()=default
 
virtual std::vector< ArtifactKeyfind_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.
 

Detailed Description

TODO: fill in doxygen.

TODO: fill in doxygen

Definition at line 16 of file project_artifact_checksum_provider.hpp.

Constructor & Destructor Documentation

◆ ProjectArtifactChecksumProvider()

porytiles2::ProjectArtifactChecksumProvider::ProjectArtifactChecksumProvider ( gsl::not_null< ProjectTilesetArtifactKeyProvider * >  key_provider)
inlineexplicit

Definition at line 18 of file project_artifact_checksum_provider.hpp.

Member Function Documentation

◆ cache_tileset_checksums()

Result< void > porytiles2::ProjectArtifactChecksumProvider::cache_tileset_checksums ( const std::string &  tileset_name,
const std::unordered_map< ArtifactKey, std::string > &  checksums 
) const
overridevirtual

Caches checksums for the given Tileset to persistent storage.

Parameters
tileset_nameThe name of the Tileset for which to cache checksums
checksumsA mapping of artifact keys to their checksums to be cached
Returns
Result indicating success or failure of the cache operation

Implements porytiles2::ArtifactChecksumProvider.

Definition at line 61 of file project_artifact_checksum_provider.cpp.

◆ compute_tileset_artifact_checksums()

std::unordered_map< ArtifactKey, std::string > porytiles2::ProjectArtifactChecksumProvider::compute_tileset_artifact_checksums ( const std::string &  tileset_name) const
overridevirtual

Computes checksums for the artifacts that belong to the given Tileset.

Parameters
tileset_nameThe name of the Tileset for which to compute checksums
Returns
A mapping of artifact keys to their computed checksum

Implements porytiles2::ArtifactChecksumProvider.

Definition at line 17 of file project_artifact_checksum_provider.cpp.

◆ load_cached_tileset_checksums()

std::unordered_map< ArtifactKey, std::string > porytiles2::ProjectArtifactChecksumProvider::load_cached_tileset_checksums ( const std::string &  tileset_name) const
overridevirtual

Loads the cached checksums for the given Tileset.

Parameters
tileset_nameThe name of the Tileset for which to load cached checksums
Returns
A mapping of artifact keys to their cached checksums

Implements porytiles2::ArtifactChecksumProvider.

Definition at line 35 of file project_artifact_checksum_provider.cpp.


The documentation for this class was generated from the following files: