* the signal is copied by another triangulation using
* Triangulation::copy_triangulation (i.e. it is triggered on the <i>old</i>
* triangulation, but the new one is passed as a argument).
+ * - clear: This signal is triggered whenever the Trianagultion::clear
+ * function is called.
+ * - any_change: This is a catch-all signal that is triggered whenever the
+ * create, post_refinement, or clear signals are triggered. In effect, it
+ * can be used to indicate to an object connected to the signal that the
+ * triangulation has been changed, whatever the exact cause of the change.
*
*
* <h3>Technical details</h3>
boost::signals2::signal<void ()> pre_refinement;
boost::signals2::signal<void ()> post_refinement;
boost::signals2::signal<void (const Triangulation<dim, spacedim> &original_tria)> copy;
+ boost::signals2::signal<void ()> clear;
+ boost::signals2::signal<void ()> any_change;
};
/**
tria_listener.disconnect ();
invalidate_present_cell();
tria_listener =
- cell->get_triangulation().signals.post_refinement.connect
+ cell->get_triangulation().signals.any_change.connect
(std_cxx1x::bind (&FEValuesBase<dim,spacedim>::invalidate_present_cell,
std_cxx1x::ref(static_cast<FEValuesBase<dim,spacedim>&>(*this))));
}
// possible components
for (unsigned int i=0;i<255;++i)
boundary[i] = &straight_boundary;
+
+ // connect the any_change signal to the other signals
+ signals.create.connect (signals.any_change);
+ signals.post_refinement.connect (signals.any_change);
+ signals.clear.connect (signals.any_change);
}
void Triangulation<dim, spacedim>::clear ()
{
clear_despite_subscriptions();
+ signals.clear();
}