]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-wrapper.cc
* lily/include/debug.hh: deprecate.
[lilypond.git] / lily / music-wrapper.cc
index 4512e26fc2033bbb0b9ff8df701cc871dbc95ed1..3d58fca2ef3f6311465ce70df906f233faa6999e 100644 (file)
@@ -3,73 +3,64 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1998--2002 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::transpose (Pitch p)
 {
-  element_p_->print ();
+  if (element ())
+    element ()-> transpose (p);
 }
 
 
-void
-Music_wrapper::transpose (Musical_pitch p)
+Music_wrapper::Music_wrapper (SCM l)
+  : Music (l)
 {
-  if (element_p_)
-    element_p_-> transpose (p);
 }
 
-
-Music_wrapper::Music_wrapper(Music*p)
-{
-  element_p_ = p;
-}
-
-
-
 Moment
 Music_wrapper::length_mom () const
 {
-  return element_p_->length_mom ();
+  return element ()->length_mom ();
 }
 
-Musical_pitch
-Music_wrapper::to_relative_octave (Musical_pitch p)
+Pitch
+Music_wrapper::to_relative_octave (Pitch p)
 {
-  return element_p_->to_relative_octave (p);
+  return element ()->to_relative_octave (p);
 }
 
-Music_iterator*
-Music_wrapper::to_rhythm (Music_iterator* r)
-{
-  return element_p_->to_rhythm (r);
-}
 
 Music*
-Music_wrapper::element_l () const
+Music_wrapper::element () const
 {
-  return element_p_;
+  return unsmob_music (get_mus_property ("element"));
 }
 
 void
 Music_wrapper::compress (Moment m)
 {
-  element_l ()->compress (m);
+  element ()->compress (m);
+}
+
+ADD_MUSIC (Music_wrapper);
+
+Music_wrapper::Music_wrapper ()
+  : Music (SCM_EOL)
+{
+  
+}
+
+Moment
+Music_wrapper::start_mom () const
+{
+  return element ()->start_mom ();
 }