]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper.cc
* input/test/improv.ly: update: do not use Thread switching.
[lilypond.git] / lily / music-wrapper.cc
index 1785b386d4d688d0520ef34c8c62db3b2205364b..4486f589c8071c8621833e2c9ff33f3025312fc5 100644 (file)
@@ -1,51 +1,41 @@
 /*   
-  music-wrapper.cc --  implement 
+  music-wrapper.cc --  implement Music_wrapper
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 
 #include "music-wrapper.hh"
 
-Music_wrapper::~Music_wrapper ()
-{
-  delete element_p_;
-}
 
-Music_wrapper::Music_wrapper (Music_wrapper const&s)
-  : Music (s)
-{
-  element_p_ = (s.element_p_)?s.element_p_->clone ():0;
-}
 
 
-void
-Music_wrapper::do_print () const
+Music_wrapper::Music_wrapper ()
+  : Music ()
 {
-  element_p_->print ();
 }
 
-
-void
-Music_wrapper::transpose (Musical_pitch p)
+Moment
+Music_wrapper::get_length () const
 {
-  if (element_p_)
-    element_p_-> transpose (p);
+  return element ()->get_length ();
 }
 
-
-Music_wrapper::Music_wrapper(Music*p)
+Music*
+Music_wrapper::element () const
 {
-  element_p_ = p;
+  return unsmob_music (get_mus_property ("element"));
 }
 
-IMPLEMENT_IS_TYPE_B1 (Music_wrapper, Music);
+
+ADD_MUSIC (Music_wrapper);
+
 
 Moment
-Music_wrapper::duration () const
+Music_wrapper::start_mom () const
 {
-  return element_p_->duration ();
+  return element ()->start_mom ();
 }