]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/interpretation-context-handle.cc
release: 1.5.38
[lilypond.git] / lily / interpretation-context-handle.cc
index 185991b74807f18199b359fb3af017174d4a6116..176dbbe97d9c9c57176f56f205837ee99932d0f9 100644 (file)
@@ -3,13 +3,38 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
+  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
  */
 
 #include "interpretation-context-handle.hh"
 #include "translator-group.hh"
 
+Interpretation_context_handle::Interpretation_context_handle ()
+{
+  report_to_l_ =0;
+}
+
+Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
+{
+  report_to_l_ =0;
+  if (s.report_to_l_)
+    up (s.report_to_l_);
+}
+
+Interpretation_context_handle*
+Interpretation_context_handle::clone () const
+{
+  Interpretation_context_handle* handle = new Interpretation_context_handle;
+  handle->report_to_l_ = this->report_to_l_;
+  return handle;
+}
+
+Interpretation_context_handle::~Interpretation_context_handle ()
+{
+  if (report_to_l_)
+    down ();
+}
+
 void
 Interpretation_context_handle::up (Translator_group*t)
 {
@@ -18,7 +43,7 @@ Interpretation_context_handle::up (Translator_group*t)
 }
 
 void
-Interpretation_context_handle::down()
+Interpretation_context_handle::down ()
 {
   report_to_l_->iterator_count_ --;
   report_to_l_ = 0;
@@ -30,13 +55,6 @@ Interpretation_context_handle::try_music (Music *m)
   return  report_to_l_->try_music (m);
 }
 
-Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
-{
-  report_to_l_ =0;
-  if (s.report_to_l_)
-    up (s.report_to_l_ );
-}
-
 void
 Interpretation_context_handle::operator = (Interpretation_context_handle const &s)
 {
@@ -60,14 +78,4 @@ Interpretation_context_handle::report_to_l ()const
   return report_to_l_;
 }
 
-Interpretation_context_handle::Interpretation_context_handle()
-{
-  report_to_l_ =0;
-}
-
-Interpretation_context_handle::~Interpretation_context_handle ()
-{
-  if (report_to_l_)
-    down ();
-}