#include "parray.hh"
#include "virtual-methods.hh"
-#include "directed-graph.hh"
#include "graphical-element.hh"
#include "lily-guile.hh"
*/
void calculate_dependencies (int final, int busy, Score_element_method_pointer funcptr);
+
+ virtual Score_element *find_broken_piece (Line_of_score*) const;
protected:
Score_element* dependency (int) const;
int dependency_size () const;
virtual void output_processing ();
virtual Interval do_height () const;
virtual Interval do_width () const;
-
+
+
/// do printing of derived info.
virtual void do_print () const;
/// generate the molecule
/// generate rods & springs
virtual void do_space_processing ();
+ /// do postbreak substs on array of pointers.
+ virtual void do_substitute_arrays ();
+
virtual void do_breakable_col_processing ();
/// do calculations after determining horizontal spacing
virtual void do_post_processing ();
};
+template<class T>
+void
+substitute_element_array (Link_array<T> &arr, Line_of_score * to)
+{
+ Link_array<T> newarr;
+ for (int i =0; i < arr.size (); i++)
+ {
+ T * t = arr[i];
+ if (t->line_l () != to)
+ {
+ t = dynamic_cast<T*> (t->find_broken_piece (to));
+ }
+
+ if (t)
+ newarr.push (t);
+ }
+ arr = newarr;
+}
+
+
+
#endif // STAFFELEM_HH