Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Kernel functors being hidden by same-name functors in derived classes
Chronological Thread
- From:
- To:
- Subject: Re: [cgal-discuss] Kernel functors being hidden by same-name functors in derived classes
- Date: Tue, 07 Aug 2007 15:29:09 +0200
wrote:
This doesn't work as the circular kernel hides some functors from the linear kernel. For instance, it defines CircularKernel::HasOn_2, which overrides LinearKernel::HasOn_2.
Both functors answer the same question for different argument types.
However, the CircularKernel::HasOn_2 cannot answer queries on linear kernel
objects.
This yields errors when trying to use the circular kernel where a linear kernel is expected (as in the example above).
Dear Michiel,
Does this yield errors...? I would say it should not: The Circular Kernel (CK) is supposed to _extend_ the the Linear Kernel (LK), that's the whole point of the design. Functors of the CK derive from functors of the LK (if they also exist there), so that they actually don't hide them.
But well, I just had a very quick look at the code. CK::Has_on does not derive from LK::Has_on, whereas Compare_..., Intersect_2 and so on are all deriving from their linear counterparts.
So, my first quick answer is that it's a bug, I apparently forgot the derivation for Has_on, sorry about this. I would like to fix this before the bug fix release, but I am afraid I won't have time to (maybe somebody else...?)
Best,
Monique Teillaud
- Kernel functors being hidden by same-name functors in derived classes, mdewilde . agilent, 08/07/2007
- Re: [cgal-discuss] Kernel functors being hidden by same-name functors in derived classes, Monique . Teillaud, 08/07/2007
Archive powered by MHonArc 2.6.16.