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_2.h $ 7 // $Id: graph_traits_dual_arrangement_on_surface_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_2_H 16 #define CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_ON_SURFACE_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_2> class, 23 * 2. the specialized boost::graph_traits<Dual<Arrangement_on_surface_2> > class, 24 * 3. The free functions required by the various graph concepts. 25 */ 26 27 // include this to avoid a VC15 warning 28 #include <CGAL/boost/graph/Named_function_parameters.h> 29 30 #include <CGAL/Arrangement_on_surface_2.h> 31 #include <CGAL/Arrangement_2/graph_traits_dual.h> 32 #include <CGAL/disable_warnings.h> 33 34 namespace CGAL { 35 36 // The specialized Dual<Arrangement_on_surface_2... class template. 37 template <typename GeomTraits_2, typename TopolTraits> 38 class Dual<Arrangement_on_surface_2<GeomTraits_2, TopolTraits> > : 39 public Dual_arrangement_on_surface<Arrangement_on_surface_2 40 <GeomTraits_2, TopolTraits> > 41 { 42 public: 43 typedef Arrangement_on_surface_2<GeomTraits_2, TopolTraits> Arrangement; 44 typedef typename Arrangement::Geometry_traits_2 Geometry_traits_2; 45 typedef typename Arrangement::Topology_traits Topology_traits; 46 47 private: 48 typedef Dual_arrangement_on_surface<Arrangement> Base; 49 50 public: 51 /*! Default constructor. */ Dual()52 Dual() : Base() {} 53 54 /*! Constructor from an arrangement. */ Dual(const Arrangement & arr)55 Dual(const Arrangement& arr) : Base(arr) {} 56 }; 57 58 } 59 60 namespace boost { 61 62 // The specialized graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2... 63 // class template. 64 template <typename GeomTraits_2, typename TopolTraits> 65 class graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2 66 <GeomTraits_2, TopolTraits> > > : 67 public CGAL::Graph_traits_dual_arr_on_surface_impl 68 <CGAL::Arrangement_on_surface_2<GeomTraits_2, TopolTraits> > 69 {}; 70 71 } 72 73 namespace CGAL { 74 75 // Templates of free functions that handle 76 // graph_traits<CGAL::Dual<CGAL::Arrangement_on_surface_2... class template. 77 CGAL_DUAL_ARRANGEMENT_2_OUT_DEGREE(Arrangement_on_surface_2) 78 CGAL_DUAL_ARRANGEMENT_2_OUT_EDGES(Arrangement_on_surface_2) 79 CGAL_DUAL_ARRANGEMENT_2_SOURCE(Arrangement_on_surface_2) 80 CGAL_DUAL_ARRANGEMENT_2_TARGET(Arrangement_on_surface_2) 81 CGAL_DUAL_ARRANGEMENT_2_IN_DEGREE(Arrangement_on_surface_2) 82 CGAL_DUAL_ARRANGEMENT_2_IN_EDGES(Arrangement_on_surface_2) 83 CGAL_DUAL_ARRANGEMENT_2_DEGREE(Arrangement_on_surface_2) 84 CGAL_DUAL_ARRANGEMENT_2_NUM_VERTICES(Arrangement_on_surface_2) 85 CGAL_DUAL_ARRANGEMENT_2_VERTICES(Arrangement_on_surface_2) 86 CGAL_DUAL_ARRANGEMENT_2_NUM_EDGES(Arrangement_on_surface_2) 87 CGAL_DUAL_ARRANGEMENT_2_EDGES(Arrangement_on_surface_2) 88 89 } 90 91 #endif 92