|
Maze Builder Docs 8.10.23
|
Contract for the create function in the runtime. More...
#include <create_contract.h>
Public Member Functions | |
| virtual std::any | create (const args &a, randomizer &rng) noexcept=0 |
| template<typename T> | |
| std::optional< T > | create_as (const args &a, randomizer &rng) noexcept |
| Calls create and extracts the result as T. | |
Contract for the create function in the runtime.
Implementations return their result type-erased in a std::any. Results must be owning values (e.g. std::string, never std::string_view) and an empty std::any signals failure. Callers should use create_as<T>() to retrieve the result with a type check.
|
nodiscardpure virtualnoexcept |
|
inlinenodiscardnoexcept |
Calls create and extracts the result as T.