flower-1.0.27
[lilypond.git] / src / rest.cc
blobe334d17bac332f03144588b45f5ac1bb6e3726d9
1 #include "rest.hh"
2 #include "dimen.hh"
3 #include "debug.hh"
4 #include "paperdef.hh"
5 #include "lookup.hh"
6 #include "molecule.hh"
9 Rest::Rest(int t, int d)
11 balltype = t;
12 dots = d;
14 NAME_METHOD(Rest);
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 Paperdef *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;