]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper.cc
* input/regression/beam-quanting-horizontal.ly: update texidoc
[lilypond.git] / lily / music-wrapper.cc
index c91a81df3d9fefd8a9a7febd961ab06e56dacc28..6c5623767f34fe4f5eff221c03d4b86f8da1f261 100644 (file)
@@ -1,51 +1,61 @@
 /*   
-  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 ()
+
+
+
+void
+Music_wrapper::transpose (Pitch p)
 {
-  delete element_p_;
+  if (element ())
+    element ()-> transpose (p);
 }
 
-Music_wrapper::Music_wrapper (Music_wrapper const&s)
-  : Music (s)
+
+Music_wrapper::Music_wrapper ()
+  : Music ()
 {
-  element_p_ = (s.element_p_)?s.element_p_->clone ():0;
 }
 
+Moment
+Music_wrapper::get_length () const
+{
+  return element ()->get_length ();
+}
 
-void
-Music_wrapper::do_print () const
+Pitch
+Music_wrapper::to_relative_octave (Pitch p)
 {
-  element_p_->print ();
+  return element ()->to_relative_octave (p);
 }
 
 
-void
-Music_wrapper::transpose (Musical_pitch p)
+Music*
+Music_wrapper::element () const
 {
-  if (element_p_)
-    element_p_-> transpose (p);
+  return unsmob_music (get_mus_property ("element"));
 }
 
-
-Music_wrapper::Music_wrapper(Music*p)
+void
+Music_wrapper::compress (Moment m)
 {
-  element_p_ = p;
+  element ()->compress (m);
 }
 
+ADD_MUSIC (Music_wrapper);
 
 
 Moment
-Music_wrapper::duration () const
+Music_wrapper::start_mom () const
 {
-  return element_p_->duration ();
+  return element ()->start_mom ();
 }