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_with_history_2.h $ 7 // $Id: graph_traits_dual_arrangement_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_WITH_HISTORY_2_H 16 #define CGAL_GRAPH_TRAITS_DUAL_ARRANGEMENT_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_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_with_history_2... class template. 38 template <typename GeomTraits_2, typename Dcel> 39 class Dual<Arrangement_with_history_2<GeomTraits_2,Dcel> > : 40 public Dual_arrangement_on_surface<Arrangement_with_history_2 41 <GeomTraits_2, Dcel> > 42 { 43 public: 44 typedef Arrangement_with_history_2<GeomTraits_2, Dcel> 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 graph_traits<CGAL::Dual<CGAL::Arrangement_with_history_2... 64 // class template. 65 template <typename GeomTraits_2, typename Dcel> 66 class graph_traits<CGAL::Dual<CGAL::Arrangement_with_history_2 67 <GeomTraits_2, Dcel> > > : 68 public CGAL::Graph_traits_dual_arr_on_surface_impl 69 <CGAL::Arrangement_with_history_2<GeomTraits_2, Dcel> > 70 {}; 71 72 } 73 74 namespace CGAL { 75 76 // Templates of free functions that handle 77 // graph_traits<Dual<Arrangement_with_history_2... class template. 78 CGAL_DUAL_ARRANGEMENT_2_OUT_DEGREE(Arrangement_with_history_2) 79 CGAL_DUAL_ARRANGEMENT_2_OUT_EDGES(Arrangement_with_history_2) 80 CGAL_DUAL_ARRANGEMENT_2_SOURCE(Arrangement_with_history_2) 81 CGAL_DUAL_ARRANGEMENT_2_TARGET(Arrangement_with_history_2) 82 CGAL_DUAL_ARRANGEMENT_2_IN_DEGREE(Arrangement_with_history_2) 83 CGAL_DUAL_ARRANGEMENT_2_IN_EDGES(Arrangement_with_history_2) 84 CGAL_DUAL_ARRANGEMENT_2_DEGREE(Arrangement_with_history_2) 85 CGAL_DUAL_ARRANGEMENT_2_NUM_VERTICES(Arrangement_with_history_2) 86 CGAL_DUAL_ARRANGEMENT_2_VERTICES(Arrangement_with_history_2) 87 CGAL_DUAL_ARRANGEMENT_2_NUM_EDGES(Arrangement_with_history_2) 88 CGAL_DUAL_ARRANGEMENT_2_EDGES(Arrangement_with_history_2) 89 90 } 91 92 #endif 93