]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper.cc
2003 -> 2004
[lilypond.git] / lily / music-wrapper.cc
index 72971abf50c40efc4bece48003a0e46c1ff768b5..8118cc23aeb9969af6319159b9fdddb7537886df 100644 (file)
@@ -1,49 +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--2004 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);
 
-MInterval
-Music_wrapper::time_int () const
+ADD_MUSIC (Music_wrapper);
+
+
+Moment
+Music_wrapper::start_mom () const
 {
-  return element_p_->time_int ();
+  return element ()->start_mom ();
 }