|
Porytiles
|
Abstract interface for querying tileset metadata by name. More...
#include <tileset_metadata_provider.hpp>
Public Member Functions | |
| virtual | ~TilesetMetadataProvider ()=default |
| virtual bool | exists (const std::string &tileset_name) const =0 |
| Checks whether a tileset exists in the backing store for the given tileset name. | |
| virtual ChainableResult< bool > | is_secondary (const std::string &tileset_name) const =0 |
| Determines whether a tileset is a secondary tileset. | |
| virtual ChainableResult< bool > | has_animations (const std::string &tileset_name) const =0 |
| Determines whether a tileset has animation support. | |
| virtual ChainableResult< std::set< std::string > > | tilesets () const =0 |
| Returns all tileset names known to this provider. | |
Abstract interface for querying tileset metadata by name.
TilesetMetadataProvider defines a domain-layer abstraction for retrieving metadata about tilesets. This allows the domain logic to query tileset properties (such as whether a tileset is primary/secondary or has animations) without depending on any specific data source or I/O mechanism. Concrete implementations may source this metadata from project files, configuration, or other external systems.
Definition at line 21 of file tileset_metadata_provider.hpp.
|
virtualdefault |
|
pure virtual |
Checks whether a tileset exists in the backing store for the given tileset name.
| tileset_name | The name of the tileset to check (e.g., "gTileset_General") |
Implemented in porytiles::ProjectTilesetMetadataProvider.
|
pure virtual |
Determines whether a tileset has animation support.
Animated tilesets have a non-null animation callback function that cycles through animation frames. This information is needed to properly handle tile references that may animate at runtime.
| tileset_name | The identifier for the tileset (e.g., "gTileset_General") |
Implemented in porytiles::ProjectTilesetMetadataProvider.
|
pure virtual |
Determines whether a tileset is a secondary tileset.
In pokeemerald, tilesets are either primary or secondary. Primary tilesets contain shared tiles and palettes, while secondary tilesets contain map-specific content and layer on top of primaries. This distinction affects tile indexing, palette allocation, and metatile attribute encoding.
| tileset_name | The identifier for the tileset (e.g., "gTileset_General") |
Implemented in porytiles::ProjectTilesetMetadataProvider.
|
pure virtual |
Returns all tileset names known to this provider.
Enumerates all tilesets available in the backing store. This enables batch operations, validation, and listing without requiring callers to know tileset names in advance.
Implemented in porytiles::ProjectTilesetMetadataProvider.