From 44215ad360ff894ab7e81b313ebb6fd4cc75576f Mon Sep 17 00:00:00 2001 From: Andreas Fabri <andreas.fabri@geometryfactory.com> Date: Fri, 10 Jan 2025 13:17:18 +0000 Subject: [PATCH] Remove dependency with a forward declaration --- Filtered_kernel/include/CGAL/Lazy.h | 4 +++- Kernel_23/test/Kernel_23/test_bbox.cpp | 4 ++-- Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h | 19 ++++++++++++++++--- Kernel_d/doc/Kernel_d/CGAL/Epick_d.h | 9 +++++---- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index d672b678bd3..a6c09563d3e 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -25,7 +25,6 @@ #include <CGAL/Origin.h> #include <CGAL/Bbox_2.h> #include <CGAL/Bbox_3.h> -#include <CGAL/Bbox_d.h> #include <CGAL/Default.h> #include <CGAL/tss.h> #include <CGAL/type_traits/is_iterator.h> @@ -52,6 +51,9 @@ namespace CGAL { +template <typename D> +class Bbox_d; + template <class E, class A, class E2A, diff --git a/Kernel_23/test/Kernel_23/test_bbox.cpp b/Kernel_23/test/Kernel_23/test_bbox.cpp index 8741f83948b..4dd1d26b35a 100644 --- a/Kernel_23/test/Kernel_23/test_bbox.cpp +++ b/Kernel_23/test/Kernel_23/test_bbox.cpp @@ -1,7 +1,7 @@ #include <CGAL/Simple_cartesian.h> #include <CGAL/Bbox_2.h> #include <CGAL/Bbox_3.h> -#include <CGAL/Bbox.h> +#include <CGAL/Bbox_d.h> #include <vector> @@ -82,7 +82,7 @@ int main() { //Dimension d - typedef CGAL::Bbox<CGAL::Dimension_tag<3>,double> BBox3; + typedef CGAL::Bbox_d<CGAL::Dimension_tag<3>> BBox3; BBox3 bb3(3), bb3a(3,1.0); assert(bb3.dimension() == 3); assert(bb3 != bb3a); diff --git a/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h b/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h index e9ac3880cb1..322fbb99383 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h @@ -60,7 +60,7 @@ typedef DimensionTag Dimension; /*! A bidirectional iterator over the %Cartesian coordinates of a point */ -class Cartesian_const_iterator; +class Cartesian_const_iterator{}; /*! @@ -177,12 +177,25 @@ class Construct_bbox_d { Bbox_d<DimensionTag> operator()(Point_d p); }; -Construct_circumcenter_d construct_circumcenter_d_object(); +class Construct_cartesian_const_iterator_d { +public: +/*! returns the begin iterator to iterate over the %Cartesian coordinates of point `p`. + */ + Cartesian_const_iterator_d operator()(Point_d p); + + /*! returns the past-the-end iterator to iterate over the %Cartesian coordinates of point `p`. + */ + Cartesian_const_iterator_d operator()(Point_d p, int); +}; + + Compute_power_product_d compute_power_product_d_object(); Compute_squared_radius_d compute_squared_radius_d_object(); Compute_squared_radius_smallest_orthogonal_sphere_d compute_squared_radius_smallest_orthogonal_sphere_d_object(); +Construct_bbox_d construct_bbox_d_object(); +Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object(); +Construct_circumcenter_d construct_circumcenter_d_object(); Construct_power_sphere_d construct_power_sphere_d_object(); Power_side_of_bounded_power_sphere_d power_side_of_bounded_power_sphere_d_object(); -Construct_bbox_d construct_bbox_d_object(); }; /* end Epeck_d */ } /* end namespace CGAL */ diff --git a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h index 16a66102b37..3387da8c1dc 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Epick_d.h @@ -49,7 +49,7 @@ typedef DimensionTag Dimension; /*! A bidirectional iterator over the %Cartesian coordinates of a point */ -class Cartesian_const_iterator; +class Cartesian_const_iterator{}; /*! represents a point in the Euclidean space @@ -176,13 +176,14 @@ class Construct_cartesian_const_iterator_d { Cartesian_const_iterator_d operator()(Point_d p, int); }; -Construct_circumcenter_d construct_circumcenter_d_object(); Compute_power_product_d compute_power_product_d_object(); Compute_squared_radius_d compute_squared_radius_d_object(); Compute_squared_radius_smallest_orthogonal_sphere_d compute_squared_radius_smallest_orthogonal_sphere_d_object(); +Construct_bbox_d construct_bbox_d_object(); +Construct_cartesian_const_iterator_d construct_cartesian_const_iterator_d_object(); +Construct_circumcenter_d construct_circumcenter_d_object(); Construct_power_sphere_d construct_power_sphere_d_object(); Power_side_of_bounded_power_sphere_d power_side_of_bounded_power_sphere_d_object(); -Construct_bbox_d construct_bbox_d_object(); -Construct_cartesian_const_iterator_d onstruct_cartesian_const_iterator_d_object(); + }; /* end Epick_d */ } /* end namespace CGAL */