Porytiles
Loading...
Searching...
No Matches
behavior_map_provider.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <string>
5
7
8namespace porytiles {
9
19 public:
20 virtual ~BehaviorMapProvider() = default;
21
32 [[nodiscard]] virtual ChainableResult<std::uint16_t> lookup(const std::string &behavior_name) const = 0;
33
44 [[nodiscard]] virtual ChainableResult<std::string> lookup(std::uint16_t behavior_value) const = 0;
45};
46
47} // namespace porytiles
Abstract interface for providing two-way metatile behavior mappings.
virtual ~BehaviorMapProvider()=default
virtual ChainableResult< std::string > lookup(std::uint16_t behavior_value) const =0
Looks up the behavior constant name for a numeric value.
virtual ChainableResult< std::uint16_t > lookup(const std::string &behavior_name) const =0
Looks up the numeric value for a behavior constant name.
A result type that maintains a chainable sequence of errors for debugging and error reporting.