1 // Copyright (c) 2018 Tel-Aviv University (Israel).
2 // All rights reserved.
3 //
4 // This file is part of CGAL (www.cgal.org).
5 //
6 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Arrangement_on_surface_2/include/CGAL/graph_traits_dual_arrangement_on_surface_with_history_2.h $
7 // $Id: graph_traits_dual_arrangement_on_surface_with_history_2.h 254d60f 2019-10-19T15:23:19+02:00 Sébastien Loriot
8 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
9 //
10 // Author(s) : Ron Wein         <wein@post.tau.ac.il>
11 //             Ophir Setter     <ophirset@post.tau.ac.il>
12 //             Sebastien Loriot <sebastien.loriot@cgal.org>
13 //             Efi Fogel        <efifogel@gmail.com>
14 
15 #ifndef CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_ON_SURFACE_WITH_HISTORY_2_H
16 #define CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_ON_SURFACE_WITH_HISTORY_2_H
17 
18 #include <CGAL/license/Arrangement_on_surface_2.h>
19 
20 /*! \file
21  * Definition of:
22  * 1. the specialized Dual<Arrangement_on_surface_with_history_2> class,
23  * 2. the specialized
24  *      boost::graph_traits<Dual<Arrangement_on_surface_with_history_2> >class,
25  * 3. The free functions required by the various graph concepts.
26  */
27 
28 // include this to avoid a VC15 warning
29 #include <CGAL/boost/graph/Named_function_parameters.h>
30 
31 #include <CGAL/Arrangement_on_surface_with_history_2.h>
32 #include <CGAL/Arrangement_2/graph_traits_dual.h>
33 #include <CGAL/disable_warnings.h>
34 
35 namespace CGAL {
36 
37 // The specialized Dual<Arrangement_on_surface_with_history_2... class template.
38 template <typename GeomTraits_2, typename TopolTraits>
39 class Dual<Arrangement_on_surface_with_history_2<GeomTraits_2, TopolTraits> > :
40     public Dual_arrangement_on_surface<Arrangement_on_surface_with_history_2
41                                        <GeomTraits_2, TopolTraits> >
42 {
43 public:
44   typedef Arrangement_on_surface_with_history_2<GeomTraits_2, TopolTraits>                Arrangement;
45   typedef typename Arrangement::Geometry_traits_2         Geometry_traits_2;
46   typedef typename Arrangement::Topology_traits           Topology_traits;
47 
48 private:
49   typedef Dual_arrangement_on_surface<Arrangement>        Base;
50 
51 public:
52   /*! Default constructor. */
Dual()53   Dual() : Base() {}
54 
55   /*! Constructor from an arrangement. */
Dual(const Arrangement & arr)56   Dual(const Arrangement& arr) : Base(arr) {}
57 };
58 
59 }
60 
61 namespace boost {
62 
63 // The specialized
64 // graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_with_history_2... class
65 // template.
66 template <typename GeomTraits_2, typename TopolTraits>
67 class graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_with_history_2
68                               <GeomTraits_2, TopolTraits> > > :
69     public CGAL::Graph_traits_dual_arr_on_surface_impl
70              <CGAL::Arrangement_on_surface_with_history_2<GeomTraits_2,
71                                                           TopolTraits> >
72 {};
73 
74 }
75 
76 namespace CGAL {
77 
78 // Templates of free functions that handle
79 //   graph_traits<Dual<Arrangement_on_surface_with_history_2...
80 // class template.
81 CGAL_DUAL_ARRANGEMENT_2_OUT_DEGREE(Arrangement_on_surface_with_history_2)
82 CGAL_DUAL_ARRANGEMENT_2_OUT_EDGES(Arrangement_on_surface_with_history_2)
83 CGAL_DUAL_ARRANGEMENT_2_SOURCE(Arrangement_on_surface_with_history_2)
84 CGAL_DUAL_ARRANGEMENT_2_TARGET(Arrangement_on_surface_with_history_2)
85 CGAL_DUAL_ARRANGEMENT_2_IN_DEGREE(Arrangement_on_surface_with_history_2)
86 CGAL_DUAL_ARRANGEMENT_2_IN_EDGES(Arrangement_on_surface_with_history_2)
87 CGAL_DUAL_ARRANGEMENT_2_DEGREE(Arrangement_on_surface_with_history_2)
88 CGAL_DUAL_ARRANGEMENT_2_NUM_VERTICES(Arrangement_on_surface_with_history_2)
89 CGAL_DUAL_ARRANGEMENT_2_VERTICES(Arrangement_on_surface_with_history_2)
90 CGAL_DUAL_ARRANGEMENT_2_NUM_EDGES(Arrangement_on_surface_with_history_2)
91 CGAL_DUAL_ARRANGEMENT_2_EDGES(Arrangement_on_surface_with_history_2)
92 
93 }
94 
95 #endif
96