diff --git a/Packages/Kernel_23/include/CGAL/Kernel_archetype.h b/Packages/Kernel_23/include/CGAL/Kernel_archetype.h new file mode 100644 index 00000000000..a77a7f9c1f1 --- /dev/null +++ b/Packages/Kernel_23/include/CGAL/Kernel_archetype.h @@ -0,0 +1,154 @@ +// ====================================================================== +// +// Copyright (c) 1999,2003 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// release : +// release_date : +// +// file : Test_kernel.h +// package : Kernel_23 +// maintainer : +// revision : $Revision$ +// revision_date : $Date$ +// author(s) : Matthias Baesken +// +// coordinator : MPI, Saarbruecken +// ====================================================================== + + +#ifndef CGAL_KERNEL_ARCHETYPE +#define CGAL_KERNEL_ARCHETYPE + +#include +#include +#include +#include +#include +#include + +#include + + +CGAL_BEGIN_NAMESPACE + +class Kernel_archetype { +public: + + // 2d + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_FT) + typedef double FT; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_RT) + typedef double RT; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_POINT_2) + typedef Test_point_2 Point_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_VECTOR_2) + typedef Test_vector_2 Vector_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_DIRECTION_2) + typedef Test_direction_2 Direction_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_LINE_2) + typedef Test_line_2 Line_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_RAY_2) + typedef Test_ray_2 Ray_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_SEGMENT_2) + typedef Test_segment_2 Segment_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_TRIANGLE_2) + typedef Test_triangle_2 Triangle_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_ISO_RECTANGLE_2) + typedef Test_iso_rectangle_2 Iso_rectangle_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_CIRCLE_2) + typedef Test_circle_2 Circle_2; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_OBJECT_2) + typedef CGAL::Object Object_2; +#endif + + // 3d +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_POINT_3) + typedef Test_point_3 Point_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_VECTOR_3) + typedef Test_vector_3 Vector_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_DIRECTION_3) + typedef Test_direction_3 Direction_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_ISO_CUBOID_3) + typedef Test_iso_cuboid_3 Iso_cuboid_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_LINE_3) + typedef Test_line_3 Line_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_RAY_3) + typedef Test_ray_3 Ray_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_SEGMENT_3) + typedef Test_segment_3 Segment_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_SPHERE_3) + typedef Test_sphere_3 Sphere_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_PLANE_3) + typedef Test_plane_3 Plane_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_TRIANGLE_3) + typedef Test_triangle_3 Triangle_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_TETRAHEDRON_3) + typedef Test_tetrahedron_3 Tetrahedron_3; +#endif + +#if !defined(CGAL_CA_LIMITED_INTERFACE) || defined(CGAL_CA_OBJECT_3) + typedef CGAL::Object Object_3; +#endif + + // functors and access functions ... + +// predicate ... +#define CGAL_Kernel_pred(Y,Z) typedef CGALca::Y Y; Y Z() const {return Y();} +// accessor function ... +#define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) + +#include + +}; + +CGAL_END_NAMESPACE + +#endif diff --git a/Packages/Kernel_23/include/CGAL/concept_archetype_2.h b/Packages/Kernel_23/include/CGAL/concept_archetype_2.h new file mode 100644 index 00000000000..8d08a8bf330 --- /dev/null +++ b/Packages/Kernel_23/include/CGAL/concept_archetype_2.h @@ -0,0 +1,203 @@ +// ====================================================================== +// +// Copyright (c) 1999,2003 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// release : +// release_date : +// +// file : concept_archetype_2.h +// package : Kernel_23 +// maintainer : +// revision : $Revision$ +// revision_date : $Date$ +// author(s) : Matthias Baesken +// +// coordinator : MPI, Saarbruecken +// ====================================================================== + +#ifndef CGAL_CONCEPT_ARCHETYPE_2 +#define CGAL_CONCEPT_ARCHETYPE_2 + +// 2d CA types (and number types)... + +CGAL_BEGIN_NAMESPACE + +/* this was replaced by a C++ built-in NT ... +struct Test_ft { + Test_ft() { } + Test_ft(const Test_ft& t) { } + + Test_ft& operator=(const Test_ft& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_ft& obj1, const Test_ft& obj2) +{ return true; } + +inline bool operator!=(const Test_ft& obj1, const Test_ft& obj2) +{ return true; } +#endif + +struct Test_rt { + Test_rt() { } + Test_rt(const Test_rt& t) { } + + Test_rt& operator=(const Test_rt& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_rt& obj1, const Test_rt& obj2) +{ return true; } + +inline bool operator!=(const Test_rt& obj1, const Test_rt& obj2) +{ return true; } +#endif +*/ + + +struct Test_point_2 { + Test_point_2() { } + Test_point_2(const Test_point_2& t) { } + + Test_point_2& operator=(const Test_point_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_point_2& obj1, const Test_point_2& obj2) +{ return true; } + +inline bool operator!=(const Test_point_2& obj1, const Test_point_2& obj2) +{ return true; } +#endif + +struct Test_segment_2 { + Test_segment_2() { } + Test_segment_2(const Test_segment_2& t) { } + + Test_segment_2& operator=(const Test_segment_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_segment_2& obj1, const Test_segment_2& obj2) +{ return true; } + +inline bool operator!=(const Test_segment_2& obj1, const Test_segment_2& obj2) +{ return true; } +#endif + +struct Test_line_2 { + Test_line_2() { } + Test_line_2(const Test_line_2& t) { } + + Test_line_2& operator=(const Test_line_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_line_2& obj1, const Test_line_2& obj2) +{ return true; } + +inline bool operator!=(const Test_line_2& obj1, const Test_line_2& obj2) +{ return true; } +#endif + +struct Test_ray_2 { + Test_ray_2() { } + Test_ray_2(const Test_ray_2& t) { } + + Test_ray_2& operator=(const Test_ray_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_ray_2& obj1, const Test_ray_2& obj2) +{ return true; } + +inline bool operator!=(const Test_ray_2& obj1, const Test_ray_2& obj2) +{ return true; } +#endif + +struct Test_vector_2 { + Test_vector_2() { } + Test_vector_2(const Test_vector_2& t) { } + + Test_vector_2& operator=(const Test_vector_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_vector_2& obj1, const Test_vector_2& obj2) +{ return true; } + +inline bool operator!=(const Test_vector_2& obj1, const Test_vector_2& obj2) +{ return true; } +#endif + +struct Test_direction_2 { + Test_direction_2() { } + Test_direction_2(const Test_direction_2& t) { } + + Test_direction_2& operator=(const Test_direction_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_direction_2& obj1, const Test_direction_2& obj2) +{ return true; } + +inline bool operator!=(const Test_direction_2& obj1, const Test_direction_2& obj2) +{ return true; } +#endif + +struct Test_triangle_2 { + Test_triangle_2() { } + Test_triangle_2(const Test_triangle_2& t) { } + + Test_triangle_2& operator=(const Test_triangle_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_triangle_2& obj1, const Test_triangle_2& obj2) +{ return true; } + +inline bool operator!=(const Test_triangle_2& obj1, const Test_triangle_2& obj2) +{ return true; } +#endif + +struct Test_circle_2 { + Test_circle_2() { } + Test_circle_2(const Test_circle_2& t) { } + + Test_circle_2& operator=(const Test_circle_2& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_circle_2& obj1, const Test_circle_2& obj2) +{ return true; } + +inline bool operator!=(const Test_circle_2& obj1, const Test_circle_2& obj2) +{ return true; } +#endif + +struct Test_iso_rectangle_2 { + Test_iso_rectangle_2() { } + Test_iso_rectangle_2(const Test_iso_rectangle_2& t) { } + + Test_iso_rectangle_2& operator=(const Test_iso_rectangle_2& t) + { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_iso_rectangle_2& obj1, + const Test_iso_rectangle_2& obj2) +{ return true; } + +inline bool operator!=(const Test_iso_rectangle_2& obj1, + const Test_iso_rectangle_2& obj2) +{ return true; } +#endif + +CGAL_END_NAMESPACE + +#endif diff --git a/Packages/Kernel_23/include/CGAL/concept_archetype_3.h b/Packages/Kernel_23/include/CGAL/concept_archetype_3.h new file mode 100644 index 00000000000..96dc9b83fe3 --- /dev/null +++ b/Packages/Kernel_23/include/CGAL/concept_archetype_3.h @@ -0,0 +1,204 @@ +// ====================================================================== +// +// Copyright (c) 1999,2003 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------- +// release : +// release_date : +// +// file : concept_archetype_3.h +// package : Kernel_23 +// maintainer : +// revision : $Revision$ +// revision_date : $Date$ +// author(s) : Matthias Baesken +// +// coordinator : MPI, Saarbruecken +// ====================================================================== + +#ifndef CGAL_CONCEPT_ARCHETYPE_3 +#define CGAL_CONCEPT_ARCHETYPE_3 + +// 3d CA types ... + +CGAL_BEGIN_NAMESPACE + +struct Test_point_3 { + Test_point_3() { } + Test_point_3(const Test_point_3& t) { } + + Test_point_3& operator=(const Test_point_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_point_3& obj1, const Test_point_3& obj2) +{ return true; } + +inline bool operator!=(const Test_point_3& obj1, const Test_point_3& obj2) +{ return true; } +#endif + +struct Test_segment_3 { + Test_segment_3() { } + Test_segment_3(const Test_segment_3& t) { } + + Test_segment_3& operator=(const Test_segment_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_segment_3& obj1, const Test_segment_3& obj2) +{ return true; } + +inline bool operator!=(const Test_segment_3& obj1, const Test_segment_3& obj2) +{ return true; } +#endif + +struct Test_line_3 { + Test_line_3() { } + Test_line_3(const Test_line_3& t) { } + + Test_line_3& operator=(const Test_line_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_line_3& obj1, const Test_line_3& obj2) +{ return true; } + +inline bool operator!=(const Test_line_3& obj1, const Test_line_3& obj2) +{ return true; } +#endif + +struct Test_ray_3 { + Test_ray_3() { } + Test_ray_3(const Test_ray_3& t) { } + + Test_ray_3& operator=(const Test_ray_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_ray_3& obj1, const Test_ray_3& obj2) +{ return true; } + +inline bool operator!=(const Test_ray_3& obj1, const Test_ray_3& obj2) +{ return true; } +#endif + +struct Test_vector_3 { + Test_vector_3() { } + Test_vector_3(const Test_vector_3& t) { } + + Test_vector_3& operator=(const Test_vector_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_vector_3& obj1, const Test_vector_3& obj2) +{ return true; } + +inline bool operator!=(const Test_vector_3& obj1, const Test_vector_3& obj2) +{ return true; } +#endif + +struct Test_direction_3 { + Test_direction_3() { } + Test_direction_3(const Test_direction_3& t) { } + + Test_direction_3& operator=(const Test_direction_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_direction_3& obj1, + const Test_direction_3& obj2) +{ return true; } + +inline bool operator!=(const Test_direction_3& obj1, + const Test_direction_3& obj2) +{ return true; } +#endif + +struct Test_plane_3 { + Test_plane_3() { } + Test_plane_3(const Test_plane_3& t) { } + + Test_plane_3& operator=(const Test_plane_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_plane_3& obj1, const Test_plane_3& obj2) +{ return true; } + +inline bool operator!=(const Test_plane_3& obj1, const Test_plane_3& obj2) +{ return true; } +#endif + +struct Test_iso_cuboid_3 { + Test_iso_cuboid_3() { } + Test_iso_cuboid_3(const Test_iso_cuboid_3& t) { } + + Test_iso_cuboid_3& operator=(const Test_iso_cuboid_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_iso_cuboid_3& obj1, + const Test_iso_cuboid_3& obj2) +{ return true; } + +inline bool operator!=(const Test_iso_cuboid_3& obj1, + const Test_iso_cuboid_3& obj2) +{ return true; } +#endif + +struct Test_sphere_3 { + Test_sphere_3() { } + Test_sphere_3(const Test_sphere_3& t) { } + + Test_sphere_3& operator=(const Test_sphere_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_sphere_3& obj1, const Test_sphere_3& obj2) +{ return true; } + +inline bool operator!=(const Test_sphere_3& obj1, const Test_sphere_3& obj2) +{ return true; } +#endif + +struct Test_triangle_3 { + Test_triangle_3() { } + Test_triangle_3(const Test_triangle_3& t) { } + + Test_triangle_3& operator=(const Test_triangle_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_triangle_3& obj1, const Test_triangle_3& obj2) +{ return true; } + +inline bool operator!=(const Test_triangle_3& obj1, const Test_triangle_3& obj2) +{ return true; } +#endif + +struct Test_tetrahedron_3 { + Test_tetrahedron_3() { } + Test_tetrahedron_3(const Test_tetrahedron_3& t) { } + + Test_tetrahedron_3& operator=(const Test_tetrahedron_3& t) { return *this; } +}; + +#if defined(CGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS) +inline bool operator==(const Test_tetrahedron_3& obj1, + const Test_tetrahedron_3& obj2) +{ return true; } + +inline bool operator!=(const Test_tetrahedron_3& obj1, + const Test_tetrahedron_3& obj2) +{ return true; } +#endif + +CGAL_END_NAMESPACE + + +#endif