--- /dev/null
+/*
+ rod.cc -- implement Rod, Column_rod
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+
+ */
+#include "rod.hh"
+#include "p-col.hh"
+#include "debug.hh"
+
+Rod::Rod (Item *l, Item *r)
+{
+ item_l_drul_[LEFT] =l;
+ item_l_drul_[RIGHT]=r;
+ distance_f_ = l->width () [RIGHT] + r->width ()[LEFT];
+}
+
+Rod::Rod ()
+{
+ distance_f_ = 0.0;
+ item_l_drul_[LEFT] = item_l_drul_[RIGHT] =0;
+}
+
+void
+Column_rod::print () const
+{
+#ifndef NDEBUG
+ DOUT << "Column_rod { rank = "
+ << other_l_->rank_i () << ", dist = " << distance_f_ << "}\n";
+#endif
+}
+
+Column_rod::Column_rod ()
+{
+ distance_f_ = 0;
+ dir_ = CENTER;
+ other_l_ = 0;
+}
+
+int
+Column_rod::compare (const Column_rod &r1, const Column_rod &r2)
+{
+ return r1.other_l_->rank_i() - r2.other_l_->rank_i();
+}
+void
+Rod::add_to_cols ()
+{
+ item_l_drul_[RIGHT]->column_l ()->add_rod
+ (item_l_drul_[LEFT]->column_l (), distance_f_, LEFT);
+ item_l_drul_[LEFT]->column_l ()->add_rod
+ (item_l_drul_[RIGHT]->column_l (), distance_f_,RIGHT);
+}
--- /dev/null
+/*
+ separating-group-spanner.cc -- implement Separating_group_spanner
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
+
+ */
+
+#include "separating-group-spanner.hh"
+#include "single-malt-grouping-item.hh"
+
+Array<Rod>
+Separating_group_spanner::get_rods () const
+{
+ Array<Rod> a;
+
+ for (int i=0; i < spacing_unit_l_arr_.size () -1; i++)
+ {
+ a.push (Rod (spacing_unit_l_arr_[i], spacing_unit_l_arr_[i+1]));
+ if (spacing_unit_l_arr_[i]->breakable_b_)
+ {
+ a.push (Rod (spacing_unit_l_arr_[i]->find_prebroken_piece (RIGHT), spacing_unit_l_arr_[i+1]));
+ }
+ if (spacing_unit_l_arr_[i+1]->breakable_b_)
+ {
+ a.push (Rod (spacing_unit_l_arr_[i], spacing_unit_l_arr_[i+1]->find_prebroken_piece (LEFT)));
+ }
+ }
+
+ return a;
+}
+
+void
+Separating_group_spanner::add_spacing_unit (Single_malt_grouping_item*i)
+{
+ spacing_unit_l_arr_.push (i);
+ add_dependency (i);
+}
+
+IMPLEMENT_IS_TYPE_B1(Separating_group_spanner, Spanner);
+
+void
+Separating_group_spanner::do_substitute_dependency (Score_elem*o, Score_elem*n)
+{
+ if (o->is_type_b (Single_malt_grouping_item::static_name ()))
+ {
+ Single_malt_grouping_item*ns = n ? (Single_malt_grouping_item*)n->item () : 0;
+ spacing_unit_l_arr_.substitute ((Single_malt_grouping_item*)o->item (), ns);
+ }
+}
+