]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper.cc
release: 1.1.14
[lilypond.git] / lily / music-wrapper.cc
1 /*   
2   music-wrapper.cc --  implement 
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10
11 #include "music-wrapper.hh"
12
13 Music_wrapper::~Music_wrapper ()
14 {
15   delete element_p_;
16 }
17
18 Music_wrapper::Music_wrapper (Music_wrapper const&s)
19   : Music (s)
20 {
21   element_p_ = (s.element_p_)?s.element_p_->clone ():0;
22 }
23
24
25 void
26 Music_wrapper::do_print () const
27 {
28   element_p_->print ();
29 }
30
31
32 void
33 Music_wrapper::transpose (Musical_pitch p)
34 {
35   if (element_p_)
36     element_p_-> transpose (p);
37 }
38
39
40 Music_wrapper::Music_wrapper(Music*p)
41 {
42   element_p_ = p;
43 }
44
45
46
47 Moment
48 Music_wrapper::duration () const
49 {
50   return element_p_->duration ();
51 }
52
53
54 Musical_pitch
55 Music_wrapper::to_relative_octave (Musical_pitch p)
56 {
57   return element_p_->to_relative_octave (p);
58 }
59
60 Music*
61 Music_wrapper::element_l () const
62 {
63   return element_p_;
64 }