blob: e448df37bdbce8ee3f476cb495076e7579cb882c (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#include "rest.hh"
#include "dimen.hh"
#include "debug.hh"
#include "paper.hh"
#include "lookup.hh"
#include "molecule.hh"
Rest::Rest(int t, int d)
{
balltype = t;
dots = d;
}
void
Rest::print()const
{
mtor << "Rest "<<balltype<< "dots " << dots;
Item::print();
}
void
Rest::preprocess()
{
brew_molecole();
}
void
Rest::brew_molecole()
{
assert(pstaff_);
assert(!output);
Paperdef *p =paper();
Symbol s;
s = p->lookup_->rest(balltype);
Molecule *m = new Molecule(Atom(s));
if (dots) {
Symbol d =p->lookup_->dots(dots);
Molecule dm;
dm.add(Atom(d));
m->add_right(dm);
}
output = m;
}
|