]> git.donarmstrong.com Git - lilypond.git/blob - lily/music-wrapper.cc
(class Music): include SCM init argument.
[lilypond.git] / lily / music-wrapper.cc
1 /*   
2   music-wrapper.cc --  implement Music_wrapper
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "music-wrapper.hh"
11
12 Music_wrapper::Music_wrapper (SCM x)
13   : Music (x)
14 {
15 }
16
17
18 MAKE_SCHEME_CALLBACK(Music_wrapper,length_callback,1);
19 SCM
20 Music_wrapper::length_callback (SCM m)
21 {
22   Music * me = unsmob_music (m);
23   Music *elt = unsmob_music (me->get_property ("element"));
24   return elt->get_length ().smobbed_copy ();
25 }
26
27 Music*
28 Music_wrapper::element () const
29 {
30   return unsmob_music (get_property ("element"));
31 }
32
33
34 ADD_MUSIC (Music_wrapper);
35
36
37 Moment
38 Music_wrapper::start_mom () const
39 {
40   return element ()->start_mom ();
41 }