Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::components::@170::ForEachCallback Concept Reference

Concept for the callback type of ForEachShape. More...

Concept definition

template<typename F, typename ComponentType>
concept donner::svg::components::@170::ForEachCallback = requires(const F& f) {
{ f.template operator()<ComponentType>() } -> std::same_as<bool>;
}
Concept for the callback type of ForEachShape.
Definition ShapeSystem.cc:78
Contains the implementation of the Donner ECS,.
Definition ClassComponent.h:6

Detailed Description

Concept for the callback type of ForEachShape.

Matches lambdas with this signature:

template<typename T>
bool callback<T>();

For example:

[&]<typename ShapeType>() -> bool {
const auto& shape = registry.get<ShapeType>(entity);
return shouldExit;
}