diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h index b9f922ef699..b21fa6b9a6b 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_diagram_on_surface_2.h @@ -7,10 +7,10 @@ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // -// Author(s) : Michal Meyerovitch -// Baruch Zukerman -// Ophir Setter -// Efi Fogel +// Author(s) : Michal Meyerovitch +// Baruch Zukerman +// Ophir Setter +// Efi Fogel #ifndef CGAL_ENVELOPE_DIAGRAM_ON_SURFACE_2_H #define CGAL_ENVELOPE_DIAGRAM_ON_SURFACE_2_H @@ -21,9 +21,7 @@ #include #include #include - #include - #include namespace CGAL { @@ -32,114 +30,93 @@ namespace CGAL { * Representation of an envelope diagram (a minimization diagram or a * maximization diagram). */ -template >::Traits - > +template >::Traits> class Envelope_diagram_on_surface_2 : -public Arrangement_on_surface_2 -{ + public Arrangement_on_surface_2 { public: - typedef GeomTraits_ Traits_3; - typedef TopTraits_ TopTraits; - typedef typename Traits_3::Xy_monotone_surface_3 Xy_monotone_surface_3; + using Traits_3 = GeomTraits_; + using TopTraits = TopTraits_; + using Xy_monotone_surface_3 = typename Traits_3::Xy_monotone_surface_3; protected: - typedef Envelope_3::Envelope_pm_dcel Env_dcel; - typedef Envelope_diagram_on_surface_2 Self; + using Self = Envelope_diagram_on_surface_2; + friend class Arr_accessor; public: - typedef Arrangement_on_surface_2 Base; - // This is yacky, but we have not choice because of observer stuff. - typedef Base Arrangement; + using Base = Arrangement_on_surface_2; - typedef typename Env_dcel::Dcel_data_const_iterator Surface_const_iterator; + // The following is not needed anymore, but kept for backward compatibility + using Arrangement = Base; + + using Face = typename Base::Face; + using Surface_iterator = typename Face::Data_iterator; + using Surface_const_iterator = typename Face::Data_const_iterator; /*! Default constructor. */ - Envelope_diagram_on_surface_2() : - Base() - {} + Envelope_diagram_on_surface_2() : Base() {} /*! Constructor with a traits-class instance. */ - Envelope_diagram_on_surface_2 (Traits_3* tr) : - Base (tr) - {} - + Envelope_diagram_on_surface_2(const Traits_3* tr) : Base(tr) {} }; - /*! \class * Representation of an envelope diagram (a minimization diagram or a * maximization diagram). */ - -template - > +template > class Envelope_diagram_2 : - public Envelope_diagram_on_surface_2< GeomTraits_, - typename Default_planar_topology::Traits - > + public Envelope_diagram_on_surface_2::Traits> { public: - typedef GeomTraits_ Traits_3; - typedef typename Traits_3::Xy_monotone_surface_3 Xy_monotone_surface_3; + using Traits_3 = GeomTraits; + using Xy_monotone_surface_3 = typename Traits_3::Xy_monotone_surface_3; protected: - typedef Dcel_ Env_dcel; - typedef Envelope_diagram_2 Self; + using Env_dcel = Dcel_; + using Self = Envelope_diagram_2; + friend class Arr_accessor; public: - typedef typename Default_planar_topology< Traits_3, - Env_dcel >::Traits Topology_traits; - typedef Envelope_diagram_on_surface_2 - Base; - typedef typename Env_dcel::Dcel_data_const_iterator Surface_const_iterator; - - // This is yacky, but we have not choice because of observer stuff. - typedef typename Base::Base Arrangement; + using Topology_traits = + typename Default_planar_topology< Traits_3, Env_dcel>::Traits; + using Base = Envelope_diagram_on_surface_2; + using Surface_iterator = typename Base::Surface_iterator; + using Surface_const_iterator = typename Base::Surface_const_iterator; + // The following is not needed anymore, but kept for backward compatibility + using Arrangement = typename Base::Base; /*! Default constructor. */ - Envelope_diagram_2() : - Base() - {} + Envelope_diagram_2() : Base() {} /*! Constructor with a traits-class instance. */ - Envelope_diagram_2 (Traits_3* tr) : - Base (tr) - {} - + Envelope_diagram_2(const Traits_3* tr) : Base(tr) {} }; - //-------------------------------- Envelope_on_surface_3 // specialization -template -class is_arrangement_2< - Envelope_diagram_on_surface_2 -> : public std::true_type +template +class is_arrangement_2> : + public std::true_type {}; // specialization -template -class is_arrangement_2< - Envelope_diagram_2 -> : public std::true_type +template +class is_arrangement_2> : + public std::true_type {}; - // /*! \class // * Representation of an envelope diagram (a minimization diagram or a // * maximization diagram). @@ -185,7 +162,6 @@ class is_arrangement_2< // }; - } //namespace CGAL #endif