lilypond-1.1.40
[lilypond.git] / src / rest.cc
blob0e4394a3c6f5694fb7c5d3218e1cd2dd33e7c45c
1 #include "rest.hh"
2 #include "dimen.hh"
3 #include "debug.hh"
4 #include "paper-def.hh"
5 #include "lookup.hh"
6 #include "molecule.hh"
9 Rest::Rest(int t, int d)
11 balltype = t;
12 dots = d;
16 void
17 Rest::do_print()const
19 #ifndef NPRINT
20 mtor << "Rest "<<balltype<< "dots " << dots;
21 Item::print();
22 #endif
25 Molecule*
26 Rest::brew_molecule_p()const
28 Paper_def *p =paper();
30 Symbol s;
31 s = p->lookup_p_->rest(balltype);
33 Molecule *m = new Molecule(Atom(s));
34 if (dots) {
35 Symbol d =p->lookup_p_->dots(dots);
36 Molecule dm;
37 dm.add(Atom(d));
38 m->add_right(dm);
40 return m;