|
Porytiles
|
Abstract interface for generating keys and discovering tileset artifacts in a backing store. More...
#include <tileset_artifact_key_provider.hpp>
Public Member Functions | |
| virtual | ~TilesetArtifactKeyProvider ()=default |
| virtual ChainableResult< ArtifactKey > | key_for_metatiles_bin (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_metatile_attributes_bin (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_tiles_png (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porymap_pal_n (const std::string &tileset_name, std::size_t index) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porymap_anim_frame (const std::string &tileset_name, const std::string &anim_name, const std::string &frame_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porymap_anim_params (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_bottom_png (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_middle_png (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_top_png (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_attributes_csv (const std::string &tileset_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porytiles_pal_n (const std::string &tileset_name, std::size_t index) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porytiles_anim_frame (const std::string &tileset_name, const std::string &anim_name, const std::string &frame_name) const =0 |
| virtual ChainableResult< ArtifactKey > | key_for_porytiles_anim_params (const std::string &tileset_name) const =0 |
| Returns the key for Porytiles animation parameters. | |
| virtual bool | artifact_exists (const ArtifactKey &key) const =0 |
| Checks whether an artifact exists in the backing store for the given key. | |
| virtual ChainableResult< std::set< std::string > > | discover_porymap_anims (const std::string &tileset_name) const =0 |
| Discovers the names of all Porymap animations available for a tileset. | |
| virtual ChainableResult< std::set< std::string > > | discover_porymap_anim_frames (const std::string &tileset_name, const std::string &anim_name) const =0 |
| Discovers the frame indices for a specific Porymap animation. | |
| virtual ChainableResult< std::set< std::string > > | discover_porytiles_anims (const std::string &tileset_name) const =0 |
| Discovers the names of all Porytiles animations available for a tileset. | |
| virtual ChainableResult< std::set< std::string > > | discover_porytiles_anim_frames (const std::string &tileset_name, const std::string &anim_name) const =0 |
| Discovers the frame indices for a specific Porytiles animation. | |
| virtual ChainableResult< std::vector< ArtifactKey > > | get_porymap_artifact_keys (const std::string &tileset_name) const |
| Gets the keys for all Porymap artifacts present in the given Tileset. | |
| virtual ChainableResult< std::vector< ArtifactKey > > | get_porytiles_artifact_keys (const std::string &tileset_name) const |
| Gets the keys for all Porytiles artifacts present in the given Tileset. | |
| virtual ChainableResult< std::vector< ArtifactKey > > | get_all_artifact_keys (const std::string &tileset_name) const |
| Gets the keys for all tileset artifacts (both Porytiles and Porymap) present in the given Tileset. | |
Abstract interface for generating keys and discovering tileset artifacts in a backing store.
This interface provides the key generation and discovery functionality needed by the tileset repository system. Implementations handle the specifics of how to organize and access artifacts in different backing stores (filesystem, database, etc.).
The interface separates key generation (which should be fast and stateless) from discovery operations (which may involve I/O to search the backing store). Implementations may choose to cache expensive lookups during construction to optimize performance.
From the interface's perspective, tileset artifact keys are simple strings wrapped by the ArtifactKey class. If a particular implementation requires a complex key type, the implementation must take care to ensure that this key type is string-constructable. Luckily, rich string-based formats like JSON should be able to support almost any imaginable key schema.
Definition at line 30 of file tileset_artifact_key_provider.hpp.
|
virtualdefault |
|
pure virtual |
Checks whether an artifact exists in the backing store for the given key.
This method should perform the actual existence check against the backing store using the provided key. This may involve filesystem operations, database queries, or other I/O depending on the implementation.
| key | The key identifying the artifact to check (generated by key_for) |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Discovers the frame indices for a specific Porymap animation.
Searches the backing store to find all animation frame files (excluding the key frame and 00.png) for a specific Porymap animation. The returned indices should be consecutive starting from 1. Since frame 0 is required, callers don't need to discover it.
| tileset_name | The name of the tileset containing the animation |
| anim_name | The name of the animation to search for frames |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Discovers the names of all Porymap animations available for a tileset.
Searches the backing store to find all Porymap animation assets for the specified tileset. Porymap animations do not require key frames, only sequential frame files.
| tileset_name | The name of the tileset to search for animations |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Discovers the frame indices for a specific Porytiles animation.
Searches the backing store to find all animation frame files (excluding the key frame and 00.png) for a specific Porytiles animation. The returned indices should be consecutive starting from 1. Since frame 0 is required, callers don't need to discover it.
| tileset_name | The name of the tileset containing the animation |
| anim_name | The name of the animation to search for frames |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Discovers the names of all Porytiles animations available for a tileset.
Searches the backing store to find all Porytiles animation directories or assets for the specified tileset. Porytiles animations require both a key frame and at least one animation frame (00.png).
| tileset_name | The name of the tileset to search for animations |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
inlinevirtual |
Gets the keys for all tileset artifacts (both Porytiles and Porymap) present in the given Tileset.
This method combines the results from both get_porytiles_artifact_keys() and get_porymap_artifact_keys() to provide a comprehensive list of all artifact keys associated with the tileset. This method will only return keys that actually exist in the backing store.
| tileset_name | The name of the Tileset for which to get all artifact keys |
Definition at line 359 of file tileset_artifact_key_provider.hpp.
|
inlinevirtual |
Gets the keys for all Porymap artifacts present in the given Tileset.
Each Porymap artifact has a unique key by which the ArtifactChecksumProvider and the TilesetRepo can identify it. The format of these keys and the method for producing them are implementation-defined. This method will only return keys that actually exist in the backing store.
Definition at line 167 of file tileset_artifact_key_provider.hpp.
|
inlinevirtual |
Gets the keys for all Porytiles artifacts present in the given Tileset.
Each Porytiles artifact has a unique key by which the ArtifactChecksumProvider and the TilesetRepo can identify it. The format of these keys and the method for producing them are implementation-defined. This method will only return keys that actually exist in the backing store.
Definition at line 255 of file tileset_artifact_key_provider.hpp.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Returns the key for Porytiles animation parameters.
For Porytiles animations, the anim parameters store is the source of truth for animation names, frame sequences, timing, and other parameters.
| tileset_name | The name of the tileset |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.
|
pure virtual |
Implemented in porytiles::ProjectTilesetArtifactKeyProvider.