33{
34 std::vector<Region> result;
35 std::ranges::copy_if(group.
regions, std::back_inserter(result),
36 [&key, &value](
const Region& region) {
37 if (!region.attributes.contains(key))
38 return false;
39
40 const auto& attr = region.attributes.at(key);
41
42 if (attr.type() != value.type())
43 return false;
44 if (attr.type() == typeid(std::string))
45 return any_equal<std::string>(attr, value);
46 if (attr.type() == typeid(double))
47 return any_equal<double>(attr, value);
48 if (attr.type() == typeid(int))
49 return any_equal<int>(attr, value);
50 if (attr.type() == typeid(float))
51 return any_equal<float>(attr, value);
52 if (attr.type() == typeid(bool))
53 return any_equal<bool>(attr, value);
54 if (attr.type() == typeid(uint32_t))
55 return any_equal<uint32_t>(attr, value);
56 if (attr.type() == typeid(int64_t))
57 return any_equal<int64_t>(attr, value);
58 if (attr.type() == typeid(uint64_t))
59 return any_equal<uint64_t>(attr, value);
60 return false;
61 });
62
63 return result;
64}
std::vector< Region > regions
Collection of regions belonging to this group.
Represents a point or span in N-dimensional space.