diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt index 7c143578c89..4d95b4e71d3 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt @@ -5706,17 +5706,19 @@ changes when they occur. In our case observers can be attached to an arrangement object. An attached observer receives notifications about the changes this arrangement undergoes. -An observer object, the type of which is an instance of the -`Arr_observer` class template, stores a pointer to an -arrangement object. When the `Arr_observer` class -template is instantiated, the `Arrangement` parameter must be -substituted with the type of the arrangement object. The observer -receives notifications just before a structural change occurs -in the arrangement and immediately after such a change takes -place. `Arr_observer` serves as a base class for other -observer classes and defines a set of virtual notification -functions, with default empty implementations. The set of functions -can be divided into three categories, as follows: +An observer object that observes changes that an arrangement object of +type `Arrangement` undergoes must be of a type derived from +`Arrangement::Observer`. The observer object stores a pointer to the +observed arrangement object. The observer receives notifications +just before a structural change occurs in the arrangement and +immediately after such a change takes place. +`Arrangement::Observer` is an alias to +`Arr_observer>`, where +`CGAL::Arrangement_on_surface_2<>` is the type of the arrangement +object or its base type. It serves as a base type for other observer +classes and defines a set of virtual notification functions, with +default empty implementations. The set of functions can be divided +into three categories, as follows:
    diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h index bcb0d5c378f..4c48eb10207 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_face_index_map.h @@ -21,12 +21,11 @@ to dynamically maintain the mapping of face handles to indices. \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} -\sa `Arr_observer` \sa `Arr_vertex_index_map` */ template< typename Arrangement > -class Arr_face_index_map: public Arr_observer { +class Arr_face_index_map: public Arrangement::Observer { public: /// \name Types @@ -74,4 +73,3 @@ Arr_face_index_map(Arrangement_2& arr); }; /* end Arr_accessor */ } /* end namespace CGAL */ - diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h index 5106f32ec36..2bd83d5a125 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h @@ -23,7 +23,6 @@ namespace CGAL { */ template -class Arr_triangulation_point_location : public Arr_observer -{} +class Arr_triangulation_point_location : public Arrangement_::Observer {} } diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h index 1c915a6b23c..af17eafb8a7 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_vertex_index_map.h @@ -21,12 +21,11 @@ to dynamically maintain the mapping of vertex handles to indices. \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap} -\sa `Arr_observer` \sa `Arr_face_index_map` */ template< typename Arrangement > -class Arr_vertex_index_map: public Arr_observer { +class Arr_vertex_index_map: public Arrangement::Observer { public: /// \name Types @@ -74,9 +73,3 @@ Arr_vertex_index_map(Arrangement_2& arr); }; /* end Arr_accessor */ } /* end namespace CGAL */ - - - - - - diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp index 8befee7dafc..21494ebb891 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension.cpp @@ -3,7 +3,6 @@ #include #include -#include #include "arr_exact_construction_segments.h" @@ -12,15 +11,16 @@ using Ex_arrangement = CGAL::Arrangement_2; // An arrangement observer, used to receive notifications of face splits and // to update the indices of the newly created faces. -class Face_index_observer : public CGAL::Arr_observer { +class Face_index_observer : public Ex_arrangement::Observer { private: size_t n_faces; // the current number of faces public: Face_index_observer(Ex_arrangement& arr) : - CGAL::Arr_observer(arr), n_faces(0) + Ex_arrangement::Observer(arr), + n_faces(0) { - CGAL_precondition (arr.is_empty()); + CGAL_precondition(arr.is_empty()); arr.unbounded_face()->set_data (0); } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer.cpp index d4261d64dd2..547fdab09c0 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer.cpp @@ -2,15 +2,14 @@ // Using a simple arrangement observer. #include -#include #include "arr_exact_construction_segments.h" #include "arr_print.h" // An observer that receives notifications of face splits and face mergers. -class My_observer : public CGAL::Arr_observer { +class My_observer : public Arrangement::Observer { public: - My_observer(Arrangement& arr) : CGAL::Arr_observer(arr) {} + My_observer(Arrangement& arr) : Arrangement::Observer(arr) {} virtual void before_split_face(Face_handle, Halfedge_handle e) { std::cout << "-> The insertion of : [ " << e->curve() diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h index 1e03af5e1c6..3fb3915b65a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h @@ -21,7 +21,6 @@ * Definition of the Arr_face_index_map class. */ -#include #include #include @@ -35,8 +34,7 @@ namespace CGAL { * of faces in the arrangement. */ template -class Arr_face_index_map : public Arr_observer -{ +class Arr_face_index_map : public Arrangement_::Observer { public: typedef Arrangement_ Arrangement_2; @@ -51,7 +49,7 @@ public: private: typedef Arr_face_index_map Self; - typedef Arr_observer Base; + typedef typename Arrangement_2::Observer Base; typedef Unique_hash_map Index_map; @@ -73,14 +71,14 @@ public: /*! Constructor with an associated arrangement. */ Arr_face_index_map (const Arrangement_2& arr) : - Base (const_cast (arr)) + Base(const_cast(arr)) { _init(); } /*! Copy constructor. */ Arr_face_index_map (const Self& other) : - Base (const_cast (*(other.arrangement()))) + Base(const_cast(*(other.arrangement()))) { _init(); } @@ -92,7 +90,7 @@ public: return (*this); this->detach(); - this->attach (const_cast (*(other.arrangement()))); + this->attach(const_cast(*(other.arrangement()))); return (*this); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h index daf08604ed2..07cf7520a13 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_generator_base.h @@ -20,7 +20,6 @@ * Definition of the Arr_landmarks_generator_base template. */ #include -#include #include #include #include @@ -43,8 +42,8 @@ namespace CGAL { */ template > -class Arr_landmarks_generator_base : public Arr_observer { + Arr_landmarks_nearest_neighbor > +class Arr_landmarks_generator_base : public Arrangement_::Observer { public: typedef Arrangement_ Arrangement_2; typedef Nearest_neighbor_ Nearest_neighbor; @@ -110,7 +109,7 @@ public: * \param arr (in) The arrangement. */ Arr_landmarks_generator_base(const Arrangement_2& arr) : - Arr_observer (const_cast(arr)), + Arrangement_2::Observer(const_cast(arr)), m_traits(static_cast(arr.geometry_traits())), m_ignore_notifications(false), m_ignore_remove_edge(false), diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h index 57478ec7936..01fd5aba052 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_vertices_generator.h @@ -98,14 +98,13 @@ public: virtual void build_landmark_set() { // Go over the arrangement, and insert all its vertices as landmarks. - NN_Point_list nnp_list; - const Arrangement_2* arr = this->arrangement(); - Vertex_const_iterator vit; + NN_Point_list nnp_list; + const auto* arr = this->arrangement(); num_landmarks = 0; - for (vit = arr->vertices_begin(); vit != arr->vertices_end(); ++vit) { + for (auto vit = arr->vertices_begin(); vit != arr->vertices_end(); ++vit) { Vertex_const_handle vh = vit; nnp_list.push_back(NN_Point_2(vh->point(), this->pl_make_result(vh))); - num_landmarks++; + ++num_landmarks; } // Update the search structure. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h index 7a4042e9601..d04136967ba 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h @@ -26,7 +26,6 @@ #include #include #include -#include namespace CGAL { @@ -36,7 +35,7 @@ namespace CGAL { * The Arrangement parameter corresponds to an arrangement instantiation. */ template -class Arr_trapezoid_ric_point_location : public Arr_observer { +class Arr_trapezoid_ric_point_location : public Arrangement_::Observer { public: //type of arrangement on surface typedef Arrangement_ Arrangement_on_surface_2; @@ -148,8 +147,8 @@ public: bool with_guarantees = true, double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD, double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD) : - Arr_observer - (const_cast(arr)), + Arrangement_on_surface_2:: + Observer(const_cast(arr)), m_with_guarantees(with_guarantees) { m_traits = static_cast (arr.geometry_traits()); @@ -352,7 +351,7 @@ protected: std::vector he_container; Edge_const_iterator eit; Halfedge_const_handle he_cst; - Arrangement_on_surface_2 *arr = this->arrangement(); + auto* arr = this->arrangement(); //collect the arrangement halfedges for (eit = arr->edges_begin(); eit != arr->edges_end(); ++eit) { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h index e3f5c3565ff..98e0f1742fd 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h @@ -39,8 +39,7 @@ namespace CGAL { * triangulation algorithm. */ template -class Arr_triangulation_point_location : public Arr_observer -{ +class Arr_triangulation_point_location : public Arrangement_::Observer { public: typedef Arrangement_ Arrangement_2; @@ -129,7 +128,7 @@ public: * \param arr (in) The arrangement. */ Arr_triangulation_point_location(const Arrangement_2& arr) : - Arr_observer(const_cast(arr)), + Arrangement_2::Observer(const_cast(arr)), m_traits(static_cast(arr.geometry_traits())), m_ignore_notifications(false), m_ignore_remove_edge(false) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h index ac6902cc9e2..92f412d2495 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h @@ -22,7 +22,6 @@ /*! \file * Definition of the Arr_vertex_index_map class. */ -#include #include #include @@ -36,8 +35,7 @@ namespace CGAL { * of vertices in the arrangement. */ template -class Arr_vertex_index_map : public Arr_observer -{ +class Arr_vertex_index_map : public Arrangement_::Observer { public: typedef Arrangement_ Arrangement_2; @@ -52,7 +50,7 @@ public: private: typedef Arr_vertex_index_map Self; - typedef Arr_observer Base; + typedef typename Arrangement_2::Observer Base; typedef Unique_hash_map Index_map; @@ -67,21 +65,21 @@ public: /*! Default constructor. */ Arr_vertex_index_map () : - Base (), + Base(), n_vertices (0), rev_map (MIN_REV_MAP_SIZE) {} /*! Constructor with an associated arrangement. */ Arr_vertex_index_map (const Arrangement_2& arr) : - Base (const_cast (arr)) + Base(const_cast(arr)) { _init(); } /*! Copy constructor. */ Arr_vertex_index_map (const Self& other) : - Base (const_cast (*(other.arrangement()))) + Base(const_cast (*(other.arrangement()))) { _init(); } @@ -93,7 +91,7 @@ public: return (*this); this->detach(); - this->attach (const_cast (*(other.arrangement()))); + this->attach (const_cast (*(other.arrangement()))); return (*this); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h index 5ff66d78b30..1861d50cbae 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h @@ -115,12 +115,9 @@ public: typedef typename Base::Inner_ccb_const_iterator Hole_const_iterator; private: - - friend class Arr_observer; friend class Arr_accessor; public: - /// \name Constructors. //@{ @@ -215,34 +212,6 @@ public: } //@} - -protected: - - /// \name Managing and notifying the arrangement observers. - //@{ - typedef Arr_observer Observer; - - /*! - * Register a new observer (so it starts receiving notifications). - * \param p_obs A pointer to the observer object. - */ - void _register_observer (Observer *p_obs) - { - Base::_register_observer ((typename Base::Observer*)p_obs); - return; - } - - /*! - * Unregister a new observer (so it stops receiving notifications). - * \param p_obs A pointer to the observer object. - * \return Whether the observer was successfully unregistered. - */ - bool _unregister_observer (Observer *p_obs) - { - return (Base::_unregister_observer ((typename Base::Observer*)p_obs)); - } - //@} - }; } //namespace CGAL diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h index b60f198906f..8c63a3344c1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_on_surface_with_history_2_impl.h @@ -273,29 +273,6 @@ bool Arrangement_on_surface_with_history_2::are_mergeable e2->curve())); } -//----------------------------------------------------------------------------- -// Register a new observer (so it starts receiving notifications). -// -template -void Arrangement_on_surface_with_history_2:: -_register_observer(Arr_observer *p_obs) -{ - Base_arr_2::_register_observer - (reinterpret_cast*>(p_obs)); - return; -} - -//----------------------------------------------------------------------------- -// Unregister an observer (so it stops receiving notifications). -// -template -bool Arrangement_on_surface_with_history_2:: -_unregister_observer(Arr_observer *p_obs) -{ - return (Base_arr_2::_unregister_observer - (reinterpret_cast*>(p_obs))); -} - } //namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index ae87c8ddb28..f99be868ac0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -109,6 +109,8 @@ public: typedef typename Topology_traits::Dcel Dcel; typedef typename Dcel::Size Size; + typedef Arr_observer Observer; + protected: friend class Arr_observer; friend class Arr_accessor; @@ -892,7 +894,6 @@ protected: typedef CGAL_ALLOCATOR(Point_2) Points_alloc; typedef CGAL_ALLOCATOR(X_monotone_curve_2) Curves_alloc; - typedef Arr_observer Observer; typedef std::list Observers_container; typedef typename Observers_container::iterator Observers_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h index af560449961..ad1413f9f1c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -75,10 +74,7 @@ public: typedef typename Geometry_traits_2::Curve_2 Curve_2; typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2; - typedef Arr_observer Observer; - protected: - friend class Arr_observer; friend class Arr_accessor; friend class Arr_with_history_accessor; @@ -582,24 +578,6 @@ public: //@} protected: - - /// \name Managing and notifying the arrangement observers. - //@{ - - /*! - * Register a new observer (so it starts receiving notifications). - * \param p_obs A pointer to the observer object. - */ - void _register_observer (Observer *p_obs); - - /*! - * Unregister an observer (so it stops receiving notifications). - * \param p_obs A pointer to the observer object. - * \return Whether the observer was successfully unregistered. - */ - bool _unregister_observer (Observer *p_obs); - //@} - /// \name Curve insertion and deletion. //@{ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h index 134c2f0c20e..24853e94b9c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h @@ -119,7 +119,6 @@ public: private: typedef Arrangement_with_history_2 Self; - friend class Arr_observer; friend class Arr_accessor; public: @@ -233,35 +232,8 @@ public: return (Face_const_handle (p_oc->face())); } + //@} - -protected: - - /// \name Managing and notifying the arrangement observers. - //@{ - typedef Arr_observer Observer; - - /*! - * Register a new observer (so it starts receiving notifications). - * \param p_obs A pointer to the observer object. - */ - void _register_observer (Observer *p_obs) - { - Base::_register_observer ((typename Base::Observer*)p_obs); - return; - } - - /*! - * Unregister a new observer (so it stops receiving notifications). - * \param p_obs A pointer to the observer object. - * \return Whether the observer was successfully unregistered. - */ - bool _unregister_observer (Observer *p_obs) - { - return (Base::_unregister_observer ((typename Base::Observer*)p_obs)); - } - //@} - }; } //namespace CGAL diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cpp index 6f12f6e8c73..bc03ddc0957 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_observer.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -57,14 +56,11 @@ void compare_results(std::string str) // An arrangement observer, used to receive notifications of face splits and // face mergers. -class Test_observer : public CGAL::Arr_observer -{ +class Test_observer : public Arrangement_2::Observer { public: - Test_observer (Arrangement_2& arr) : - CGAL::Arr_observer (arr) - {} + Test_observer(Arrangement_2& arr) : Arrangement_2::Observer(arr) {} /// \name Notification functions on global arrangement operations. //@{ diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h index 9b3136be2b4..757ef127412 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -134,7 +133,8 @@ protected: typedef typename Minimization_diagram_2::Inner_ccb_iterator Inner_ccb_iterator; - typedef Arr_observer Md_observer; + typedef typename Minimization_diagram_2::Observer + Md_observer; typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator Envelope_data_iterator; diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index e5184ba9a2a..d5e118bf8d7 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -96,7 +96,7 @@ protected: typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator Envelope_data_iterator; - typedef Arr_observer Md_observer; + typedef typename Minimization_diagram_2::Observer Md_observer; typedef Arr_accessor Md_accessor; typedef typename Topology_traits::Default_point_location_strategy diff --git a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h index 5db68c8abaa..d040ccb7158 100644 --- a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h @@ -77,9 +77,9 @@ private: // An arrangement observer, used to receive notifications of face splits and // face mergers. - class My_observer : public CGAL::Arr_observer { + class My_observer : public Arrangement_2::Observer { public: - My_observer(Arrangement_2& arr) : Arr_observer(arr) {} + My_observer(Arrangement_2& arr) : Arrangement_2::Observer(arr) {} virtual void after_split_face(Face_handle f, Face_handle new_f, bool /* is_hole */) diff --git a/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h b/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h index 408bf95c847..72465c5c97f 100644 --- a/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h +++ b/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -86,10 +85,10 @@ private: }; // Observer to track any changes of the attached arrangement. - class Observer : public Arr_observer + class Observer : public Arrangement_2::Observer { - typedef Arr_observer Base; + typedef typename Arrangement_2::Observer Base; typedef Observer Self;