template<typename R, typename A>
class Vkm::Engine::EntityMapping< R(A)>
Maps entities to one carrier's names for them, or back.
An EntityId means nothing outside the Scene that minted it, so a reference travels as a number only its carrier (a scene file, a prefab, a connection) can read. Non-owning and type-erased: a carrier passes a stack lambda, no allocation or template. Empty in is empty out, unasked.
- Template Parameters
-
| R | What the carrier maps to. |
| A | What it maps from; zero or a null EntityId is "none". |
template<typename R, typename A>
template<typename Fn, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Fn>, EntityMapping>>>
| Vkm::Engine::EntityMapping< R(A)>::EntityMapping |
( |
Fn & | fn | ) |
|
|
inlinenoexcept |
Wrap fn, the carrier's mapping.
Excludes its own type, or Fn& would out-match the copy constructor for a non-const lvalue.
- Template Parameters
-
| Fn | Callable as R(A). Must outlive the mapping. |
- Parameters
-
| fn | The carrier's mapping; never asked for "none". |