Porytiles
Loading...
Searching...
No Matches
tileset_metadata_provider.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <set>
4#include <string>
5
7
8namespace porytiles {
9
22 public:
23 virtual ~TilesetMetadataProvider() = default;
24
31 [[nodiscard]] virtual bool exists(const std::string &tileset_name) const = 0;
32
44 [[nodiscard]] virtual ChainableResult<bool> is_secondary(const std::string &tileset_name) const = 0;
45
56 [[nodiscard]] virtual ChainableResult<bool> has_animations(const std::string &tileset_name) const = 0;
57
67 [[nodiscard]] virtual ChainableResult<std::set<std::string>> tilesets() const = 0;
68};
69
70} // namespace porytiles
A result type that maintains a chainable sequence of errors for debugging and error reporting.
Abstract interface for querying tileset metadata by name.
virtual ~TilesetMetadataProvider()=default
virtual ChainableResult< std::set< std::string > > tilesets() const =0
Returns all tileset names known to this provider.
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.