43 m_providers.insert_or_assign(name, std::move(provider));
48 std::string& error,
bool replace =
false)
53 [[nodiscard]]
bool contains(std::string_view name)
const
59 [[nodiscard]] std::vector<std::string>
names()
const
61 std::vector<std::string> result;
63 result.push_back(entry.first);
68 [[nodiscard]] std::optional<InteractionFn<T>>
resolve(
73 error =
"no registered interaction " + std::string(name);
76 return std::invoke(provider->second, source, error);
89 std::optional<Kinesis::AABB2D> placement, std::string& error)
const
96 form.
wire = *interaction;
108 return [interaction = std::move(interaction)](
const InteractionSource&, std::string&)
124 return [make = std::move(make)](
const InteractionSource& source, std::string& error)
126 if (!source.placement) {
127 error =
"interaction needs placement bounds";
130 return make(*source.placement);
Illustrative geometry functions for common Mapped use cases.
Map kept as one sorted vector, cheap to copy.
Axis-aligned bounding rectangle in a 2D coordinate space.