lilypond-0.1.12
[lilypond.git] / lily / collision-reg.cc
blob8a895d79c80e32a4fd7c1157f406c48c8c8068de
1 /*
2 collision-reg.cc -- implement Collision_register
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "note-column.hh"
10 #include "collision-reg.hh"
11 #include "collision.hh"
13 void
14 Collision_register::acknowledge_element(Score_elem_info i)
16 if (!(i.elem_l_->name() == Note_column::static_name()))
17 return;
19 if (!col_p_)
20 col_p_ = new Collision;
22 col_p_->add((Note_column*)i.elem_l_->item());
25 void
26 Collision_register::do_pre_move_processing()
28 if (col_p_) {
29 typeset_element(col_p_);
30 col_p_ =0;
33 Collision_register::Collision_register()
35 col_p_ =0;
38 IMPLEMENT_STATIC_NAME(Collision_register);
39 IMPLEMENT_IS_TYPE_B1(Collision_register,Request_register);
40 ADD_THIS_REGISTER(Collision_register);