1 // Copyright (c) 2000-2004
2 // Utrecht University (The Netherlands),
3 // ETH Zurich (Switzerland),
4 // INRIA Sophia-Antipolis (France),
5 // Max-Planck-Institute Saarbruecken (Germany),
6 // and Tel-Aviv University (Israel).  All rights reserved.
7 //
8 // This file is part of CGAL (www.cgal.org)
9 //
10 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Cartesian_kernel/include/CGAL/Simple_cartesian.h $
11 // $Id: Simple_cartesian.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot
12 // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
13 //
14 //
15 // Author(s)     : Herve Bronnimann, Sylvain Pion
16 
17 #ifndef CGAL_SIMPLE_CARTESIAN_H
18 #define CGAL_SIMPLE_CARTESIAN_H
19 
20 #include <CGAL/Cartesian/Cartesian_base.h>
21 #include <CGAL/Handle_for.h>
22 #include <CGAL/Kernel/Type_equality_wrapper.h>
23 
24 namespace CGAL {
25 
26 template < typename FT_, typename Kernel_ >
27 struct Cartesian_base_no_ref_count
28   : public Cartesian_base< Kernel_, FT_ >
29 {
30     typedef FT_                                           RT;
31     typedef FT_                                           FT;
32 
33     // The mechanism that allows to specify reference-counting or not.
34     template < typename T >
35     struct Handle { typedef T   type; };
36 
37     template < typename Kernel2 >
38     struct Base { typedef Cartesian_base_no_ref_count<FT_, Kernel2>  Type; };
39 
40     typedef Kernel_ K;
41 #define CGAL_Kernel_pred(Y,Z) typedef CartesianKernelFunctors::Y<K> Y; \
42                               Y Z() const { return Y(); }
43 #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z)
44 
45 #include <CGAL/Kernel/interface_macros.h>
46 };
47 
48 template < typename FT_ >
49 struct Simple_cartesian
50   : public Type_equality_wrapper<
51                 Cartesian_base_no_ref_count<FT_, Simple_cartesian<FT_> >,
52                 Simple_cartesian<FT_> >
53 {};
54 
55 } //namespace CGAL
56 
57 #endif // CGAL_SIMPLE_CARTESIAN_H
58