repo.or.cz
/
lilypond.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
flower-1.0.27
[lilypond.git]
/
src
/
rest.cc
blob
e334d17bac332f03144588b45f5ac1bb6e3726d9
1
#include
"rest.hh"
2
#include
"dimen.hh"
3
#include
"debug.hh"
4
#include
"paperdef.hh"
5
#include
"lookup.hh"
6
#include
"molecule.hh"
7
8
9
Rest
::
Rest
(
int
t
,
int
d
)
10
{
11
balltype
=
t
;
12
dots
=
d
;
13
}
14
NAME_METHOD
(
Rest
);
15
16
void
17
Rest
::
do_print
()
const
18
{
19
#ifndef NPRINT
20
mtor
<<
"Rest "
<<
balltype
<<
"dots "
<<
dots
;
21
Item
::
print
();
22
#endif
23
}
24
25
Molecule
*
26
Rest
::
brew_molecule_p
()
const
27
{
28
Paperdef
*
p
=
paper
();
29
30
Symbol s
;
31
s
=
p
->
lookup_p_
->
rest
(
balltype
);
32
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
);
39
}
40
return
m
;
41
}
42