]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.52
authorfred <fred>
Wed, 16 Apr 1997 00:39:52 +0000 (00:39 +0000)
committerfred <fred>
Wed, 16 Apr 1997 00:39:52 +0000 (00:39 +0000)
lily/collision-reg.cc [new file with mode: 0644]

diff --git a/lily/collision-reg.cc b/lily/collision-reg.cc
new file mode 100644 (file)
index 0000000..954b999
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+  collision-reg.cc -- implement Collision_register
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column.hh"
+#include "collision-reg.hh"
+#include "collision.hh"
+
+void
+Collision_register::acknowledge_element(Staff_elem_info i)
+{
+    if (!(i.elem_l_->name() == Note_column::static_name()))
+       return;
+
+    if (!col_p_)
+       col_p_ = new Collision;
+    
+    col_p_->add((Note_column*)i.elem_l_);
+}
+
+void
+Collision_register::pre_move_processing()
+{
+    if (col_p_) {
+       typeset_element(col_p_);
+       col_p_ =0;
+    }
+}
+Collision_register::Collision_register()
+{
+    col_p_ =0;
+}
+
+IMPLEMENT_STATIC_NAME(Collision_register);
+ADD_THIS_REGISTER(Collision_register);