]> git.donarmstrong.com Git - lilypond.git/blob - lily/rhythmic-head.cc
release: 1.1.57
[lilypond.git] / lily / rhythmic-head.cc
1 /*
2   rhythmic-head.cc -- implement 
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "rhythmic-head.hh"
10 #include "debug.hh"
11 #include "molecule.hh"
12 #include "paper-def.hh"
13 #include "lookup.hh"
14 #include "rest.hh"
15 #include "dots.hh"
16 #include "axis-group-element.hh"
17 #include "p-score.hh"
18 #include "stem.hh"
19
20 void
21 Rhythmic_head::do_add_processing ()
22 {
23   if (dots_i_ && !dots_l_)
24     {
25       assert (false);
26     }
27   if (dots_l_)
28     {
29       dots_l_->no_dots_i_ = dots_i_;
30     }
31 }
32
33 void
34 Rhythmic_head::add_dots (Dots *dot_l)
35 {
36   dots_l_ = dot_l;  
37   dot_l->add_dependency (this);  
38 }
39
40
41 Rhythmic_head::Rhythmic_head ()
42 {
43   dots_l_ =0;
44   balltype_i_ =0;
45   dots_i_ = 0;
46   stem_l_ =0;
47 }
48
49 void
50 Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n)
51 {
52   if (o == dots_l_)
53     dots_l_ = dynamic_cast<Dots *> (n) ;
54   else if (o == stem_l_)
55     stem_l_ = dynamic_cast<Stem*>(n);
56 }
57
58
59 void
60 Rhythmic_head::do_print () const
61 {
62 #ifndef NPRINT
63   DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i_;
64 #endif
65 }
66