]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rod.cc
release: 1.5.29
[lilypond.git] / lily / rod.cc
index 90af9edf1b67c577cdbd9ef2f3be5aa970a116d7..1577baa310eec1b9711a0fd47c0aaece4c84e07e 100644 (file)
@@ -3,15 +3,14 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 #include "rod.hh"
 #include "paper-column.hh"
 #include "debug.hh"
 #include "dimensions.hh"
-#include "single-malt-grouping-item.hh"
-
+#include "spaceable-grob.hh"
 
 Rod::Rod ()
 {
@@ -20,18 +19,6 @@ Rod::Rod ()
 }
 
 
-Column_rod::Column_rod ()
-{
-  distance_f_ = 0;
-  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::columnize ()
@@ -48,9 +35,10 @@ Rod::columnize ()
 void
 Rod::add_to_cols ()
 {
-  columnize();
+  columnize ();
   if (item_l_drul_[LEFT] != item_l_drul_[RIGHT])
-    dynamic_cast<Paper_column*> (item_l_drul_[LEFT])->
-      add_rod(dynamic_cast<Paper_column*>(item_l_drul_[RIGHT]), distance_f_ );
+    Spaceable_grob::add_rod (item_l_drul_[LEFT],
+                               item_l_drul_[RIGHT],
+                               distance_f_);
 }