diff --git a/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel.tex b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel.tex index 40fa065e834..336be5b75e1 100644 --- a/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel.tex +++ b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel.tex @@ -102,6 +102,8 @@ especially for equality testing. %%\ccGlue %%\ccNestedType{Construct_max_point_2}{} \ccGlue +\ccNestedType{Construct_cartesian_const_iterator_2}{a model of Kernel::ConstructCartesianConstIterator\_2} +\ccGlue \ccNestedType{Construct_vertex_2}{a model of Kernel::ConstructVertex\_2} \ccGlue \ccNestedType{Construct_bbox_2}{a model of Kernel::ConstructBbox\_2} @@ -328,6 +330,8 @@ If the result type is a number type, the prefix is \ccc{Compute_}: %%\ccGlue %%\ccNestedType{Construct_max_point_3}{} \ccGlue +\ccNestedType{Construct_cartesian_const_iterator_3}{a model of Kernel::ConstructCartesianConstIterator\_3} +\ccGlue \ccNestedType{Construct_vertex_3}{a model of Kernel::ConstructVertex\_3} \ccGlue \ccNestedType{Construct_bbox_3}{a model of Kernel::ConstructBbox\_3} diff --git a/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_2.tex b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_2.tex new file mode 100644 index 00000000000..45d0fb774a0 --- /dev/null +++ b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_2.tex @@ -0,0 +1,21 @@ +\begin{ccRefFunctionObjectConcept}{Kernel::ConstructCartesianCoordinateConstIterator_2} +A model for this must provide: + +\ccCreationVariable{fo} + + +\ccMemberFunction{Kernel::Cartesian_coordinate_const_iterator_2 operator()(const Kernel::Point_2 + &p);} {returns an iterator on the 0'th Cartesian coordinate of \ccc{p}.} + +\ccMemberFunction{Kernel::Cartesian_coordinate_const_iterator_2 operator()(const Kernel::Point_2 + &p, int);} {returns the past the end iterator of the Cartesian coordinates of \ccc{p}.} + + + + +\ccRefines +AdaptableFunctor (with one argument) + + + +\end{ccRefFunctionObjectConcept} diff --git a/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_3.tex b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_3.tex new file mode 100644 index 00000000000..0dd779dc007 --- /dev/null +++ b/Packages/Kernel_23/doc_tex/kernel/Ref/Kernel_ConstructCartesianCoordinateConstIterator_3.tex @@ -0,0 +1,21 @@ +\begin{ccRefFunctionObjectConcept}{Kernel::ConstructCartesianCoordinateConstIterator_3} +A model for this must provide: + +\ccCreationVariable{fo} + + +\ccMemberFunction{Kernel::Cartesian_coordinate_const_iterator_3 operator()(const Kernel::Point_3 + &p);} {returns an iterator on the 0'th Cartesian coordinate of \ccc{p}.} + +\ccMemberFunction{Kernel::Cartesian_coordinate_const_iterator_3 operator()(const Kernel::Point_3 + &p, int);} {returns the past the end iterator of the Cartesian coordinates of \ccc{p}.} + + + + +\ccRefines +AdaptableFunctor (with one argument) + + + +\end{ccRefFunctionObjectConcept} diff --git a/Packages/Kernel_23/doc_tex/kernel/Ref/ref_manual.tex b/Packages/Kernel_23/doc_tex/kernel/Ref/ref_manual.tex index 73288ae1b2f..30d3327bcdd 100644 --- a/Packages/Kernel_23/doc_tex/kernel/Ref/ref_manual.tex +++ b/Packages/Kernel_23/doc_tex/kernel/Ref/ref_manual.tex @@ -253,6 +253,8 @@ in the kernel. \input{Ref/Kernel_ConstructBbox_2.tex} \input{Ref/Kernel_ConstructBbox_3.tex} \input{Ref/Kernel_ConstructBisector_2.tex} +\input{Ref/Kernel_ConstructCartesianCoordinateConstIterator_2.tex} +\input{Ref/Kernel_ConstructCartesianCoordinateConstIterator_3.tex} \input{Ref/Kernel_ConstructCenter_2.tex} \input{Ref/Kernel_ConstructCenter_3.tex} \input{Ref/Kernel_ConstructCentroid_2.tex} diff --git a/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h b/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h index 5fce0ac4a8f..49a41cf228c 100644 --- a/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h +++ b/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_functors.h @@ -28,6 +28,7 @@ #include #include #include +#include // see kernel functors for original version // all deprecated stuff was removed ... @@ -2094,6 +2095,53 @@ public: { Bbox_3 b; return b; } }; + template + class Construct_cartesian_coordinate_const_iterator_2 + { + typedef typename K::Point_2 Point_2; + typedef typename K::Cartesian_coordinate_const_iterator_2 + Cartesian_coordinate_const_iterator_2; + + public: + typedef Cartesian_coordinate_const_iterator_2 result_type; + typedef Arity_tag< 1 > Arity; + + Cartesian_coordinate_const_iterator_2 + operator()( const Point_2& p) const + { + return Cartesian_coordinate_const_iterator_2(); + } + + Cartesian_coordinate_const_iterator_2 + operator()( const Point_2& p, int) const + { + return Cartesian_coordinate_const_iterator_2(); + } + }; + + template + class Construct_cartesian_coordinate_const_iterator_3 + { + typedef typename K::Point_3 Point_3; + typedef typename K::Cartesian_coordinate_const_iterator_3 + Cartesian_coordinate_const_iterator_3; + + public: + typedef Cartesian_coordinate_const_iterator_3 result_type; + typedef Arity_tag< 1 > Arity; + + Cartesian_coordinate_const_iterator_3 + operator()( const Point_3& p) const + { + return Cartesian_coordinate_const_iterator_3(); + } + + Cartesian_coordinate_const_iterator_3 + operator()( const Point_3& p, int) const + { + return Cartesian_coordinate_const_iterator_3(); + } + }; template class Coplanar_orientation_3 diff --git a/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_interface_macros.h b/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_interface_macros.h index 378eefc4a82..812fb27bb02 100644 --- a/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_interface_macros.h +++ b/Packages/Kernel_23/include/CGAL/Kernel/concept_archetype_interface_macros.h @@ -662,6 +662,18 @@ CGAL_Kernel_cons(Construct_bbox_3, construct_bbox_3_object) #endif +#if !defined(CGAL_CA_LIMITED_INTERFACE) || \ + defined(CGAL_CA_CONSTRUCT_CARTESIAN_COORDINATE_ITERATOR_2) +CGAL_Kernel_cons(Construct_cartesian_coordinate_const_iterator_2, + construct_cartesian_coordinate_const_iterator_2_object) +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || \ + defined(CGAL_CA_CONSTRUCT_CARTESIAN_COORDINATE_ITERATOR_3) +CGAL_Kernel_cons(Construct_cartesian_coordinate_const_iterator_3, + construct_cartesian_coordinate_const_iterator_3_object) +#endif + #if !defined(CGAL_CA_LIMITED_INTERFACE) || \ defined(CGAL_CA_COPLANAR_ORIENTATION_3) CGAL_Kernel_pred(Coplanar_orientation_3, diff --git a/Packages/Kernel_23/include/CGAL/Kernel/function_objects.h b/Packages/Kernel_23/include/CGAL/Kernel/function_objects.h index 1da7552ea9e..b4bd43795b6 100644 --- a/Packages/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Packages/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -25,6 +25,8 @@ #include #include #include +#include +#include CGAL_BEGIN_NAMESPACE @@ -1357,6 +1359,53 @@ namespace CommonKernelFunctors { { return s.bbox(); } }; + template + class Construct_cartesian_coordinate_const_iterator_2 + { + typedef typename K::Point_2 Point_2; + typedef typename K::Cartesian_coordinate_const_iterator_2 + Cartesian_coordinate_const_iterator_2; + + public: + typedef Cartesian_coordinate_const_iterator_2 result_type; + typedef Arity_tag< 1 > Arity; + + Cartesian_coordinate_const_iterator_2 + operator()( const Point_2& p) const + { + return p.cartesian_begin(); + } + + Cartesian_coordinate_const_iterator_2 + operator()( const Point_2& p, int) const + { + return p.cartesian_end(); + } + }; + + template + class Construct_cartesian_coordinate_const_iterator_3 + { + typedef typename K::Point_3 Point_3; + typedef typename K::Cartesian_coordinate_const_iterator_3 + Cartesian_coordinate_const_iterator_3; + + public: + typedef Cartesian_coordinate_const_iterator_3 result_type; + typedef Arity_tag< 1 > Arity; + + Cartesian_coordinate_const_iterator_3 + operator()( const Point_3& p) const + { + return p.cartesian_begin(); + } + + Cartesian_coordinate_const_iterator_3 + operator()( const Point_3& p, int) const + { + return p.cartesian_end(); + } + }; template class Counterclockwise_in_between_2 { diff --git a/Packages/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Packages/Kernel_23/include/CGAL/Kernel/interface_macros.h index 36c87542f5c..fae60a93c81 100644 --- a/Packages/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Packages/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -247,6 +247,10 @@ CGAL_Kernel_cons(Construct_bbox_2, construct_bbox_2_object) CGAL_Kernel_cons(Construct_bbox_3, construct_bbox_3_object) +CGAL_Kernel_cons(Construct_cartesian_coordinate_const_iterator_2, + construct_cartesian_coordinate_const_iterator_2_object) +CGAL_Kernel_cons(Construct_cartesian_coordinate_const_iterator_3, + construct_cartesian_coordinate_const_iterator_3_object) CGAL_Kernel_pred(Coplanar_orientation_3, coplanar_orientation_3_object) CGAL_Kernel_pred(Coplanar_side_of_bounded_circle_3, diff --git a/Packages/Kernel_23/include/CGAL/Kernel_archetype.h b/Packages/Kernel_23/include/CGAL/Kernel_archetype.h index c5db2701911..5db383ba3a6 100644 --- a/Packages/Kernel_23/include/CGAL/Kernel_archetype.h +++ b/Packages/Kernel_23/include/CGAL/Kernel_archetype.h @@ -137,7 +137,19 @@ public: #if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_OBJECT_3) typedef CGAL::Object Object_3; #endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || \ + defined(CGAL_CA_CARTESIAN_COORDINATE_CONST_ITERATOR_2) + typedef Cartesian_coordinate_const_iterator_2_archetype + Cartesian_coordinate_const_iterator_2; +#endif +#if !defined(CGAL_CA_LIMITED_INTERFACE) || \ + defined(CGAL_CA_CARTESIAN_COORDINATE_CONST_ITERATOR_3) + typedef Cartesian_coordinate_const_iterator_3_archetype + Cartesian_coordinate_const_iterator_3; +#endif + // functors and access functions ... // predicate ... diff --git a/Packages/Kernel_23/include/CGAL/concept_archetype_2.h b/Packages/Kernel_23/include/CGAL/concept_archetype_2.h index ad832870994..29dc873fa45 100644 --- a/Packages/Kernel_23/include/CGAL/concept_archetype_2.h +++ b/Packages/Kernel_23/include/CGAL/concept_archetype_2.h @@ -37,8 +37,6 @@ T(const T1&,const T2&,const T3&,const T4&,const T5&) { } CGAL_BEGIN_NAMESPACE - - struct Point_2_archetype { Point_2_archetype() { } Point_2_archetype(const Point_2_archetype& t) { } @@ -231,6 +229,13 @@ inline bool operator!=(const Iso_rectangle_2_archetype& obj1, { return true; } #endif +struct Cartesian_coordinate_const_iterator_2_archetype { + Cartesian_coordinate_const_iterator_2_archetype() { } + Cartesian_coordinate_const_iterator_2_archetype& + operator=(const Cartesian_coordinate_const_iterator_2_archetype&) + { return *this; } +}; + CGAL_END_NAMESPACE #undef CGAL_concept_archetype_constructors diff --git a/Packages/Kernel_23/include/CGAL/concept_archetype_3.h b/Packages/Kernel_23/include/CGAL/concept_archetype_3.h index 966faa3219f..c0f9d256557 100644 --- a/Packages/Kernel_23/include/CGAL/concept_archetype_3.h +++ b/Packages/Kernel_23/include/CGAL/concept_archetype_3.h @@ -273,6 +273,13 @@ inline bool operator!=(const Tetrahedron_3_archetype& obj1, { return true; } #endif +struct Cartesian_coordinate_const_iterator_3_archetype { + Cartesian_coordinate_const_iterator_3_archetype() { } + Cartesian_coordinate_const_iterator_3_archetype& + operator=(const Cartesian_coordinate_const_iterator_3_archetype&) + { return *this; } +}; + CGAL_END_NAMESPACE #undef CGAL_concept_archetype_constructors diff --git a/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_2.h b/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_2.h index 1c83c62a37b..c64639fd002 100644 --- a/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_2.h +++ b/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_2.h @@ -246,6 +246,15 @@ test_new_2(const R& rep) Bbox_2 bb4 = construct_bbox_2(c1); // Circle_2 Bbox_2 bb5 = construct_bbox_2(rec2); // Iso_rectangle_2 + typename R::Construct_cartesian_coordinate_const_iterator_2 + construct_cartesian_coordinate_const_iterator_2 + = rep.construct_cartesian_coordinate_const_iterator_2_object(); + + typename R::Cartesian_coordinate_const_iterator_2 cccit; + + cccit = construct_cartesian_coordinate_const_iterator_2(p1); + cccit = construct_cartesian_coordinate_const_iterator_2(p1,0); + #ifndef CGAL_NO_DEPRECATED_CODE typename R::Construct_direction_of_line_2 construct_direction_from = rep.construct_direction_of_line_2_object(); diff --git a/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_3.h b/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_3.h index 87d0ffaa645..bf85583110c 100644 --- a/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_3.h +++ b/Packages/Kernel_23/test/Kernel/include/CGAL/_test_new_3.h @@ -267,6 +267,16 @@ test_new_3(const R& rep) Bbox_3 bb5 = construct_bbox_3(sp1); // Sphere_3 Bbox_3 bb6 = construct_bbox_3(iso1); // Iso_cuboid_3 + typename R::Construct_cartesian_coordinate_const_iterator_3 + construct_cartesian_coordinate_const_iterator_3 + = rep.construct_cartesian_coordinate_const_iterator_3_object(); + + typename R::Cartesian_coordinate_const_iterator_3 cccit; + + cccit = construct_cartesian_coordinate_const_iterator_3(p1); + cccit = construct_cartesian_coordinate_const_iterator_3(p1,0); + + #ifndef CGAL_NO_DEPRECATED_CODE typename R::Construct_direction_of_line_3 construct_direction_from = rep.construct_direction_of_line_3_object();