Skip to content

Add Impl::toGeometryTypeConstant helper

Carsten Gräser requested to merge feature/gt-dynamic-to-static into master

This helper maps a dynamic GeometryType to a compile time std::integral_constant<GeometryType::Id,...>. Thus is replaces the IfGeometryType (and IfTopology) helper. In contrast to the latter it does not rely on the undocumented implementation of GeometryType::Id but on LocalGeometryTypeIndex and the generic Hybrid::switchCase helper. Furthermore the new helper uses a lambda-friendly callback interface which requires less boiler plate code for the user.

This also changes TopologyFactory to use the new interface.

Merge request reports

Loading