source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "dots.hh"
#include "rhythmic-head.hh"
void
-Dot_column::add (Dots *d)
+Dot_column::add_dots (Dots *d)
{
dot_l_arr_.push (d);
add_dependency (d);
}
void
-Dot_column::add (Rhythmic_head *r)
+Dot_column::add_head (Rhythmic_head *r)
{
if (!r->dots_l_)
return ;
head_l_arr_.push (r);
add_dependency (r);
- add (r->dots_l_);
+ add_dots (r->dots_l_);
}
void
-Dot_column::do_substitute_dependency (Score_elem*o,Score_elem*n)
+Dot_column::do_substitute_dependency (Score_element*o,Score_element*n)
{
- Item *oi =o->item ();
- Item *ni = n?n->item ():0;
+ Item *oi =dynamic_cast <Item *> (o);
- if (oi&&oi->is_type_b (Rhythmic_head::static_name ()))
- head_l_arr_.substitute ((Rhythmic_head*)oi, (Rhythmic_head*)ni);
- else if (oi && oi->is_type_b (Dots::static_name ()))
- dot_l_arr_.substitute ((Dots*) oi, (Dots*) ni);
+ if (oi && dynamic_cast<Rhythmic_head *> (oi))
+ head_l_arr_.substitute (dynamic_cast<Rhythmic_head*> (oi),
+ dynamic_cast<Rhythmic_head*>(n));
+ else if (oi && dynamic_cast<Dots *> (oi))
+ dot_l_arr_.substitute (dynamic_cast<Dots*> (oi),
+ dynamic_cast<Dots*> (n));
}
void