X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-handle.cc;h=ae613fb86b279cbc2f444d5c45ee7959c42479d4;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=03698a48d489cb9f3a25e8d16095a2f2641754eb;hpb=332da9f4d25f9f63a3222efc87fae06b0c7abbdd;p=lilypond.git diff --git a/lily/context-handle.cc b/lily/context-handle.cc index 03698a48d4..ae613fb86b 100644 --- a/lily/context-handle.cc +++ b/lily/context-handle.cc @@ -1,77 +1,60 @@ -/* - interpretation-context-handle.cc -- implement Interpretation_context_handle - +/* + context-handle.cc -- implement Context_handle + source file of the GNU LilyPond music typesetter - - (c) 1999--2004 Han-Wen Nienhuys - */ -#include "interpretation-context-handle.hh" + (c) 1999--2008 Han-Wen Nienhuys +*/ + +#include "context-handle.hh" #include "context.hh" -Interpretation_context_handle::Interpretation_context_handle () +Context_handle::Context_handle () { outlet_ = 0; } -Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s) +Context_handle::Context_handle (Context_handle const &s) { outlet_ = 0; if (s.outlet_) up (s.outlet_); } - -Interpretation_context_handle::~Interpretation_context_handle () +Context_handle::~Context_handle () { /* Don't do if (outlet_) - down (); + down (); with GC, this is asynchronous. - */ + */ } void -Interpretation_context_handle::up (Context *t) +Context_handle::up (Context *t) { outlet_ = t; - t->iterator_count_ ++; + t->iterator_count_++; } void -Interpretation_context_handle::down () +Context_handle::down () { - outlet_->iterator_count_ --; + outlet_->iterator_count_--; outlet_ = 0; } void -Interpretation_context_handle::quit () -{ - if (outlet_) - { - outlet_->iterator_count_ --; - outlet_ = 0; - } -} - -bool -Interpretation_context_handle::try_music (Music *m) -{ - return outlet_->try_music (m); -} - -void -Interpretation_context_handle::operator = (Interpretation_context_handle const &s) +Context_handle::operator = (Context_handle const &s) { set_context (s.outlet_); } void -Interpretation_context_handle::set_context (Context *trans) +Context_handle::set_context (Context *trans) { if (outlet_ == trans) return; @@ -82,14 +65,14 @@ Interpretation_context_handle::set_context (Context *trans) } Context * -Interpretation_context_handle::get_outlet () const +Context_handle::get_outlet () const { - + return outlet_; } int -Interpretation_context_handle::get_count () const +Context_handle::get_count () const { - return outlet_->iterator_count_ ; + return outlet_->iterator_count_; }