From a35291a8bafceab68e4fac1270dfd56e43f01ba2 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Wed, 20 Jun 2001 21:55:05 +0000 Subject: [PATCH] - Fixed a few buggy #includes - Use the macro CGAL_ADVANCED_KERNEL_PARTIAL_SPEC. - remove warning CGAL::sign -> CGAL_NTS. --- Old_Packages/Cd/changes.txt | 5 +++++ .../include/CGAL/Cartesian/Aff_transformation_d.h | 6 +----- .../Cd/include/CGAL/Cartesian/Direction_d.h | 6 +----- .../Cd/include/CGAL/Cartesian/Homothecy_rep_d.h | 12 +++--------- Old_Packages/Cd/include/CGAL/Cartesian/Line_d.h | 11 +---------- .../Cd/include/CGAL/Cartesian/Linear_algebra_d.h | 2 +- Old_Packages/Cd/include/CGAL/Cartesian/Plane_d.h | 6 +----- Old_Packages/Cd/include/CGAL/Cartesian/Ray_d.h | 6 +----- .../Cd/include/CGAL/Cartesian/Scaling_rep_d.h | 12 +++--------- Old_Packages/Cd/include/CGAL/Cartesian/Segment_d.h | 6 +----- Old_Packages/Cd/include/CGAL/Cartesian/Simplex_d.h | 6 +----- Old_Packages/Cd/include/CGAL/Cartesian/Sphere_d.h | 10 +--------- .../Cd/include/CGAL/Cartesian/Tetrahedron_d.h | 13 +------------ Old_Packages/Cd/include/CGAL/Cartesian/Triangle_d.h | 6 +----- Old_Packages/Cd/include/CGAL/Cartesian/Vector_d.h | 6 +----- .../include/CGAL/Cartesian/predicates_on_points_d.h | 2 +- .../Cd/include/CGAL/Cartesian/redefine_names_d.h | 6 +++++- Old_Packages/Cd/include/CGAL/Cartesian/solve_d.h | 5 +---- Old_Packages/Cd/test/KernelCd/makefile | 2 +- Old_Packages/Cd/test/KernelCd/test_kernelCd.C | 1 + 20 files changed, 32 insertions(+), 97 deletions(-) diff --git a/Old_Packages/Cd/changes.txt b/Old_Packages/Cd/changes.txt index 50ac7675bd7..5a38381ebe9 100644 --- a/Old_Packages/Cd/changes.txt +++ b/Old_Packages/Cd/changes.txt @@ -1,3 +1,8 @@ +Ver 1.13 (20 June 2001) +- Fixed a few buggy #includes +- Use the macro CGAL_ADVANCED_KERNEL_PARTIAL_SPEC. +- remove warning CGAL::sign -> CGAL_NTS. + Ver 1.12 (18 June 2001) - Remove references to VECTOR_WRAPPER. diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Aff_transformation_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Aff_transformation_d.h index f1ed7a7943e..70531789861 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Aff_transformation_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Aff_transformation_d.h @@ -47,11 +47,7 @@ CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE template < class R_ > -class Aff_transformationCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class Aff_transformationCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { friend class PlaneCd; diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Direction_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Direction_d.h index bce498f49d5..49a3f70e962 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Direction_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Direction_d.h @@ -30,11 +30,7 @@ CGAL_BEGIN_NAMESPACE template < class R_ > -class DirectionCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class DirectionCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Homothecy_rep_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Homothecy_rep_d.h index 693fbed20df..e9dd866d47d 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Homothecy_rep_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Homothecy_rep_d.h @@ -19,19 +19,13 @@ // // ====================================================================== -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H -#define CGAL_CTAG -#endif - -#ifdef _MSC_VER -#define typename -#endif - #ifndef CGAL_CARTESIAN_HOMOTHECY_REP_D_H #define CGAL_CARTESIAN_HOMOTHECY_REP_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include + +#ifdef _MSC_VER +#define typename #endif CGAL_BEGIN_NAMESPACE diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Line_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Line_d.h index 602a5e559bf..ca1ec472583 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Line_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Line_d.h @@ -22,20 +22,13 @@ #ifndef CGAL_CARTESIAN_LINE_D_H #define CGAL_CARTESIAN_LINE_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include -#endif - #include CGAL_BEGIN_NAMESPACE template < class R_ > -class LineCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class LineCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: @@ -101,9 +94,7 @@ private: CGAL_END_NAMESPACE #ifndef CGAL_CARTESIAN_CLASS_DEFINED -#ifndef CGAL_CARTESIAN_LINE_D_C #include -#endif // CGAL_CARTESIAN_LINE_D_C #endif #endif // CGAL_CARTESIAN_LINE_D_H diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Linear_algebra_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Linear_algebra_d.h index 9a49aab819f..ce94d5883df 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Linear_algebra_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Linear_algebra_d.h @@ -22,9 +22,9 @@ #ifndef CGAL_CARTESIAN_LINEAR_ALGEBRA_D_H #define CGAL_CARTESIAN_LINEAR_ALGEBRA_D_H +#include #include #include -#include #include #include diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Plane_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Plane_d.h index 7feb105ee32..6a219bf333e 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Plane_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Plane_d.h @@ -32,11 +32,7 @@ CGAL_BEGIN_NAMESPACE template -class PlaneCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class PlaneCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Ray_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Ray_d.h index 309e2a3f907..6b820c4e07f 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Ray_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Ray_d.h @@ -28,11 +28,7 @@ CGAL_BEGIN_NAMESPACE template < class R_ > -class RayCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class RayCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Scaling_rep_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Scaling_rep_d.h index 694957525f6..9bf492a8a8c 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Scaling_rep_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Scaling_rep_d.h @@ -19,19 +19,13 @@ // // ====================================================================== -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H -#define CGAL_CTAG -#endif - -#ifdef _MSC_VER -#define typename -#endif - #ifndef CGAL_CARTESIAN_SCALING_REP_D_H #define CGAL_CARTESIAN_SCALING_REP_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include + +#ifdef _MSC_VER +#define typename #endif CGAL_BEGIN_NAMESPACE diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Segment_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Segment_d.h index df4efbfe578..34909d03872 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Segment_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Segment_d.h @@ -28,11 +28,7 @@ CGAL_BEGIN_NAMESPACE template < class R_ > -class SegmentCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class SegmentCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Simplex_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Simplex_d.h index b3feb534495..34fba03fe35 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Simplex_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Simplex_d.h @@ -28,11 +28,7 @@ CGAL_BEGIN_NAMESPACE template -class SimplexCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class SimplexCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Sphere_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Sphere_d.h index 4cfc23fe2e9..0ad7523e136 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Sphere_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Sphere_d.h @@ -23,21 +23,13 @@ #ifndef CGAL_CARTESIAN_SPHERE_D_H #define CGAL_CARTESIAN_SPHERE_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include -#endif -#ifndef CGAL_CARTESIAN_SPHERE_REP_D_H #include -#endif // CGAL_CARTESIAN_SPHERE_REP_D_H CGAL_BEGIN_NAMESPACE template -class SphereC3 -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class SphereC3 CGAL_ADVANCED_KERNEL_PARTIAL_SPEC { public: typedef R_ R; diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Tetrahedron_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Tetrahedron_d.h index a33b5a1db0b..94a68eb3e2b 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Tetrahedron_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Tetrahedron_d.h @@ -22,22 +22,13 @@ #ifndef CGAL_CARTESIAN_TETRAHEDRON_D_H #define CGAL_CARTESIAN_TETRAHEDRON_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include -#endif - -#ifndef CGAL_CARTESIAN_FOURTUPLE_H #include -#endif // CGAL_CARTESIAN_FOURTUPLE_H CGAL_BEGIN_NAMESPACE template -class TetrahedronCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class TetrahedronCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: @@ -101,9 +92,7 @@ private: CGAL_END_NAMESPACE #ifndef CGAL_CARTESIAN_CLASS_DEFINED -#ifndef CGAL_CARTESIAN_TETRAHEDRON_D_C #include -#endif #endif #endif diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Triangle_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Triangle_d.h index 13a9e29b588..4a443535384 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Triangle_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Triangle_d.h @@ -28,11 +28,7 @@ CGAL_BEGIN_NAMESPACE template -class TriangleCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class TriangleCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/Vector_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/Vector_d.h index 73c585e83bc..6819c86a6a0 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/Vector_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/Vector_d.h @@ -31,11 +31,7 @@ CGAL_BEGIN_NAMESPACE template < class R_ > -class VectorCd -#ifndef CGAL_CFG_NO_ADVANCED_KERNEL -// This is a partial specialization - -#endif +class VectorCd CGAL_ADVANCED_KERNEL_PARTIAL_SPEC : public Handle { public: diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/predicates_on_points_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/predicates_on_points_d.h index 7bb881f8a51..138ca187eb5 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/predicates_on_points_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/predicates_on_points_d.h @@ -38,7 +38,7 @@ compare_lexicographically_d(const PointCd &p, const PointCd &q) { CGAL_kernel_precondition( p.dimension()==q.dimension() ); - return Comparison_result( CGAL::sign( + return Comparison_result( CGAL_NTS sign( std::lexicographical_compare_3way(p.begin(),p.end(),q.begin(),q.end()) )); } diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/redefine_names_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/redefine_names_d.h index 68bc5ea3aa3..a6ed153eda3 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/redefine_names_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/redefine_names_d.h @@ -55,10 +55,14 @@ // We unify this with PointCd::function #define CGAL_CTAG , Cartesian_tag +#define CGAL_ADVANCED_KERNEL_PARTIAL_SPEC + #else -#define CGAL_CTAG +#define CGAL_CTAG +#define CGAL_ADVANCED_KERNEL_PARTIAL_SPEC + // Note that it was not possible to keep the opposite (changing the // Point_d into PointCd for Stefan's design) because it would also // change "typename R::Point_d" into "typename R::PointCd" inside the diff --git a/Old_Packages/Cd/include/CGAL/Cartesian/solve_d.h b/Old_Packages/Cd/include/CGAL/Cartesian/solve_d.h index e26fd480085..bc57ef3ebd4 100644 --- a/Old_Packages/Cd/include/CGAL/Cartesian/solve_d.h +++ b/Old_Packages/Cd/include/CGAL/Cartesian/solve_d.h @@ -22,10 +22,7 @@ #ifndef CGAL_CARTESIAN_CARTESIAN_SOLVE_D_H #define CGAL_CARTESIAN_CARTESIAN_SOLVE_D_H -#ifndef CGAL_CARTESIAN_REDEFINE_NAMES_D_H #include -#endif - #include #include @@ -47,4 +44,4 @@ void solve (const VectorCd &v0, CGAL_END_NAMESPACE -#endif // CGAL_CARTESIAN_CARTESIAN_SOLVE_3_H +#endif // CGAL_CARTESIAN_CARTESIAN_SOLVE_D_H diff --git a/Old_Packages/Cd/test/KernelCd/makefile b/Old_Packages/Cd/test/KernelCd/makefile index a4ae084f002..7b38b99b42e 100644 --- a/Old_Packages/Cd/test/KernelCd/makefile +++ b/Old_Packages/Cd/test/KernelCd/makefile @@ -14,12 +14,12 @@ include $(CGAL_MAKEFILE) #---------------------------------------------------------------------# CXXFLAGS = \ + -I../../include \ $(TESTSUITE_CXXFLAGS) \ $(EXTRA_FLAGS) \ -I./include \ -DCGAL_CFG_NO_ADVANCED_KERNEL \ -DCGAL_NO_LEDA_HANDLE \ - -I../../include \ -I../../../C2/include \ -I../../../C3/include \ -I../../../Cartesian_basic/include \ diff --git a/Old_Packages/Cd/test/KernelCd/test_kernelCd.C b/Old_Packages/Cd/test/KernelCd/test_kernelCd.C index 168f69bdbe9..a189cfa2c8f 100644 --- a/Old_Packages/Cd/test/KernelCd/test_kernelCd.C +++ b/Old_Packages/Cd/test/KernelCd/test_kernelCd.C @@ -21,6 +21,7 @@ // ============================================================================ +#include #include #include #include