cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Better packaging of named parameters

Open sloriot opened this issue 2 years ago • 2 comments

As a general remark, I really dislike how this pretty much Mesh_3-specific code is coming into the STL_Extension package. It's a pain to navigate when you're looking at the code, you have to jump around all the time.

We have put graph traits & such next to the data structures, not in BGL: I think the NP framework should be in BGL (or its own package) for the core workings, and NPs + NP helpers should be in the package that relates them.

I am not sure how to handle NPs (and NPs helpers) that are shared between really different packages, though, as they cannot be placed into multiple packages. Maybe an independent package is the cleanest, and then each package that uses NP has its own CGAL/Pkg/parameter_interface.h + CGAL/Pkg/Named_parameters.h headers.

Originally posted by @MaelRL in https://github.com/CGAL/cgal/pull/6642#discussion_r987898074

sloriot avatar Oct 06 '22 07:10 sloriot

The reason why they have all to be in the same package is because you reinject the named parameters to be member of the class. If you restrict yourself to the free function it is fine but then when you concatenate with . you need to know all of them. One way to solve that is to use different classes.

sloriot avatar Oct 06 '22 07:10 sloriot

Here is some very rough code to dispatch properly between NPs living in different packages.

MaelRL avatar Oct 06 '22 12:10 MaelRL