source file of the GNU LilyPond music typesetter
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "dot-column.hh"
#include "note-column.hh"
#include "rest.hh"
#include "debug.hh"
-
-
bool
Note_column::rest_b () const
{
return iv;
}
-/*
-Interval
-Note_column::do_width () const
-{
- if (head_l_arr_.size ())
- return head_l_arr_[0]->extent (X_AXIS);
- else
- return Interval (0,0);
-}
-*/
void
Note_column::do_pre_processing()
{
dir_ = stem_l_->dir_;
else if (head_l_arr_.size ())
{
- assert (false); // looks obsolete?
+ // assert (false); // looks obsolete?
dir_ = sign (head_positions_interval().center ());
}
}
}
void
-Note_column::do_substitute_dependency (Score_element*o, Score_element*n)
+Note_column::do_substitute_element_pointer (Score_element*o, Score_element*n)
{
if (stem_l_ == o)
{
head_l_arr_.substitute (dynamic_cast<Note_head *> (o),
(n)? dynamic_cast<Note_head *> (n) : 0);
}
- Script_column::do_substitute_dependency (o,n);
+ Script_column::do_substitute_element_pointer (o,n);
if (dynamic_cast<Rest *> (o))
{
rest_l_arr_.substitute (dynamic_cast<Rest *> (o),
void
Note_column::add_head (Rhythmic_head *h)
{
- if (dynamic_cast<Rest *> (h))
+ if (Rest*r=dynamic_cast<Rest *> (h))
{
- rest_l_arr_.push ((Rest*)h);
- add_support (h);
+ rest_l_arr_.push (r);
+ add_support (r);
}
- if (dynamic_cast<Note_head *> (h))
+ if (Note_head *nh=dynamic_cast<Note_head *> (h))
{
- head_l_arr_.push ((Note_head*) h);
- add_support (h);
+ head_l_arr_.push (nh);
+ add_support (nh);
}
}