mirror of https://github.com/CGAL/cgal
the landmarks generators inherit from the base generator so remove the overloaded notification methods
This commit is contained in:
parent
3eb3e168e8
commit
8707d403aa
|
|
@ -193,217 +193,6 @@ public:
|
|||
return (lm_pairs[index].first);
|
||||
}
|
||||
|
||||
/// \name Overloaded observer functions on global changes.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Notification before the arrangement is assigned with another
|
||||
* arrangement.
|
||||
* \param arr The arrangement to be copied.
|
||||
*/
|
||||
virtual void before_assign (const Arrangement_2& arr)
|
||||
{
|
||||
clear_landmark_set();
|
||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||
ignore_notifications = true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification after the arrangement has been assigned with another
|
||||
* arrangement.
|
||||
*/
|
||||
virtual void after_assign ()
|
||||
{
|
||||
build_landmark_set();
|
||||
ignore_notifications = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification before the observer is attached to an arrangement.
|
||||
* \param arr The arrangement we are about to attach the observer to.
|
||||
*/
|
||||
virtual void before_attach (const Arrangement_2& arr)
|
||||
{
|
||||
clear_landmark_set();
|
||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||
ignore_notifications = true;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification after the observer has been attached to an arrangement.
|
||||
*/
|
||||
virtual void after_attach ()
|
||||
{
|
||||
build_landmark_set();
|
||||
ignore_notifications = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification before the observer is detached from the arrangement.
|
||||
*/
|
||||
virtual void before_detach ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification after the arrangement is cleared.
|
||||
* \param u A handle to the unbounded face.
|
||||
*/
|
||||
virtual void after_clear ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
build_landmark_set();
|
||||
}
|
||||
|
||||
/*! Notification before a global operation modifies the arrangement. */
|
||||
virtual void before_global_change ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
ignore_notifications = true;
|
||||
}
|
||||
|
||||
/*! Notification after a global operation is completed. */
|
||||
virtual void after_global_change ()
|
||||
{
|
||||
build_landmark_set();
|
||||
ignore_notifications = false;
|
||||
}
|
||||
//@}
|
||||
|
||||
/// \name Overloaded observer functions on local changes.
|
||||
//@{
|
||||
|
||||
/*! Notification after the creation of a new vertex. */
|
||||
virtual void after_create_vertex (Vertex_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after the creation of a new edge. */
|
||||
virtual void after_create_edge (Halfedge_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an edge was split. */
|
||||
virtual void after_split_edge (Halfedge_handle ,
|
||||
Halfedge_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after a face was split. */
|
||||
virtual void after_split_face (Face_handle ,
|
||||
Face_handle ,
|
||||
bool )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an outer CCB was split.*/
|
||||
virtual void after_split_outer_ccb (Face_handle ,
|
||||
Ccb_halfedge_circulator ,
|
||||
Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an inner CCB was split. */
|
||||
virtual void after_split_inner_ccb (Face_handle ,
|
||||
Ccb_halfedge_circulator ,
|
||||
Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an outer CCB was added to a face. */
|
||||
virtual void after_add_outer_ccb (Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an inner CCB was created inside a face. */
|
||||
virtual void after_add_inner_ccb (Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an isolated vertex was created inside a face. */
|
||||
virtual void after_add_isolated_vertex (Vertex_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an edge was merged. */
|
||||
virtual void after_merge_edge (Halfedge_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after a face was merged. */
|
||||
virtual void after_merge_face (Face_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an outer CCB was merged. */
|
||||
virtual void after_merge_outer_ccb (Face_handle ,
|
||||
Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an inner CCB was merged. */
|
||||
virtual void after_merge_inner_ccb (Face_handle ,
|
||||
Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an outer CCB is moved from one face to another. */
|
||||
virtual void after_move_outer_ccb (Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an inner CCB is moved from one face to another. */
|
||||
virtual void after_move_inner_ccb (Ccb_halfedge_circulator )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after an isolated vertex is moved. */
|
||||
virtual void after_move_isolated_vertex (Vertex_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notificaion after the removal of a vertex. */
|
||||
virtual void after_remove_vertex ()
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notification after the removal of an edge. */
|
||||
virtual void after_remove_edge ()
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notificaion after the removal of an outer CCB. */
|
||||
virtual void after_remove_outer_ccb (Face_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
|
||||
/*! Notificaion after the removal of an inner CCB. */
|
||||
virtual void after_remove_inner_ccb (Face_handle )
|
||||
{
|
||||
_handle_local_change_notification();
|
||||
}
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
||||
/*! Handle a change notification. */
|
||||
|
|
|
|||
|
|
@ -158,85 +158,6 @@ public:
|
|||
return (nn.find_nearest_neighbor (q, obj));
|
||||
}
|
||||
|
||||
/// \name Overloaded observer functions.
|
||||
//@{
|
||||
|
||||
/*!
|
||||
* Notification after the arrangement has been assigned with another
|
||||
* arrangement.
|
||||
*/
|
||||
virtual void after_assign ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
build_landmark_set();
|
||||
ignore_notifications = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification before the observer is attached to an arrangement.
|
||||
* \param arr The arrangement we are about to attach the observer to.
|
||||
*/
|
||||
virtual void before_attach (const Arrangement_2& arr)
|
||||
{
|
||||
clear_landmark_set();
|
||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||
ignore_notifications = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification after the observer has been attached to an arrangement.
|
||||
*/
|
||||
virtual void after_attach ()
|
||||
{
|
||||
build_landmark_set();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification before the observer is detached from the arrangement.
|
||||
*/
|
||||
virtual void before_detach ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Notification after the arrangement is cleared.
|
||||
*/
|
||||
virtual void after_clear ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
build_landmark_set();
|
||||
}
|
||||
|
||||
/*! Notification before a global operation modifies the arrangement. */
|
||||
virtual void before_global_change ()
|
||||
{
|
||||
clear_landmark_set();
|
||||
ignore_notifications = true;
|
||||
}
|
||||
|
||||
/*! Notification after a global operation is completed. */
|
||||
virtual void after_global_change ()
|
||||
{
|
||||
build_landmark_set();
|
||||
ignore_notifications = false;
|
||||
}
|
||||
|
||||
/*! Notification after the creation of a new vertex. */
|
||||
virtual void after_create_vertex (Vertex_handle )
|
||||
{
|
||||
if (! ignore_notifications)
|
||||
_handle_local_change();
|
||||
}
|
||||
|
||||
/*! Notificaion after the removal of a vertex. */
|
||||
virtual void after_remove_vertex ()
|
||||
{
|
||||
if (! ignore_notifications)
|
||||
_handle_local_change();
|
||||
}
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
||||
/*! Handle a local change. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue