From bd24b8ad63e7825f8e85cf772cd1a17b2a99b9dc Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 4 May 2005 10:11:32 +0000 Subject: [PATCH] rename Interpretation_context_handle to Context_handle. --- ChangeLog | 5 +++ flower/include/interval.hh | 1 - lily/auto-change-iterator.cc | 4 +- lily/context-handle.cc | 24 ++++++------ lily/include/context.hh | 2 +- lily/include/interpretation-context-handle.hh | 37 ------------------- lily/include/music-iterator.hh | 4 +- lily/main.cc | 2 +- lily/pango-font.cc | 2 +- lily/part-combine-iterator.cc | 12 +++--- lily/quote-iterator.cc | 2 +- 11 files changed, 31 insertions(+), 64 deletions(-) delete mode 100644 lily/include/interpretation-context-handle.hh diff --git a/ChangeLog b/ChangeLog index e00226195f..3406001df9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-04 Han-Wen Nienhuys + + * lily/include/interpretation-context-handle.hh: rename + Interpretation_context_handle to Context_handle. + 2005-05-04 Heikki Junes * input/regression/GNUmakefile (local_delete): use `find` together diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 41f9c7887f..ddfdefd70b 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -205,7 +205,6 @@ Interval_t::center () const return (elem (LEFT) + elem (RIGHT)) / T (2); } -// again? see flower-proto.hh typedef Interval_t Interval; typedef Interval_t Slice; // weird name diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index 05fadd5c48..1d07d6a7de 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -29,8 +29,8 @@ private: void change_to (Music_iterator *, SCM, String); Moment start_moment_; - Interpretation_context_handle up_; - Interpretation_context_handle down_; + Context_handle up_; + Context_handle down_; }; void diff --git a/lily/context-handle.cc b/lily/context-handle.cc index 2af07a4c5e..1799db1461 100644 --- a/lily/context-handle.cc +++ b/lily/context-handle.cc @@ -1,27 +1,27 @@ /* - interpretation-context-handle.cc -- implement Interpretation_context_handle + context-handle.cc -- implement Context_handle source file of the GNU LilyPond music typesetter (c) 1999--2005 Han-Wen Nienhuys */ -#include "interpretation-context-handle.hh" +#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 @@ -34,33 +34,33 @@ Interpretation_context_handle::~Interpretation_context_handle () } void -Interpretation_context_handle::up (Context *t) +Context_handle::up (Context *t) { outlet_ = t; t->iterator_count_++; } void -Interpretation_context_handle::down () +Context_handle::down () { outlet_->iterator_count_--; outlet_ = 0; } bool -Interpretation_context_handle::try_music (Music *m) +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; @@ -71,14 +71,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_; } diff --git a/lily/include/context.hh b/lily/include/context.hh index db69518d27..07299a166c 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -24,7 +24,7 @@ class Context void terminate (); private: - friend class Interpretation_context_handle; + friend class Context_handle; int iterator_count_; bool init_; diff --git a/lily/include/interpretation-context-handle.hh b/lily/include/interpretation-context-handle.hh deleted file mode 100644 index c2aa89734e..0000000000 --- a/lily/include/interpretation-context-handle.hh +++ /dev/null @@ -1,37 +0,0 @@ -/* - interpretation-context-handle.hh -- declare Interpretation_context_handle - - source file of the GNU LilyPond music typesetter - - (c) 1999--2005 Han-Wen Nienhuys -*/ - -#ifndef INTERPRETATION_CONTEXT_HANDLE_HH -#define INTERPRETATION_CONTEXT_HANDLE_HH -#include "lily-proto.hh" - -/* - RENAME ME to Context_handle. -*/ - -class Interpretation_context_handle -{ -public: - ~Interpretation_context_handle (); - Interpretation_context_handle (); - - void set_context (Context *); - bool try_music (Music *); - void operator = (Interpretation_context_handle const &); - Interpretation_context_handle (Interpretation_context_handle const &); - Context *get_outlet () const; - - int get_count () const; -private: - Context *outlet_; - void down (); - void up (Context *); -}; - -#endif /* INTERPRETATION_CONTEXT_HANDLE_HH */ - diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 89619297dd..29d67bbeb8 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -12,7 +12,7 @@ #include "array.hh" #include "moment.hh" #include "virtual-methods.hh" -#include "interpretation-context-handle.hh" +#include "context-handle.hh" /** --- @@ -85,7 +85,7 @@ protected: void descend_to_child (Context *); private: - Interpretation_context_handle handle_; + Context_handle handle_; Music *music_; }; diff --git a/lily/main.cc b/lily/main.cc index 535014510d..5a746d6fad 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -375,7 +375,7 @@ do_chroot_jail () } #endif -void test_pango (); + static void main_with_guile (void *, int, char **) diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 35dd915ea1..5288a25b48 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -30,9 +30,9 @@ Pango_font::Pango_font (PangoFT2FontMap *fontmap, : PANGO_DIRECTION_RTL; context_ = pango_ft2_get_context (PANGO_RESOLUTION, PANGO_RESOLUTION); + // context_ = pango_ft2_font_map_create_context (fontmap); pango_description_ = pango_font_description_copy (description); - // context_ = pango_ft2_font_map_create_context (fontmap); attribute_list_ = pango_attr_list_new (); /* diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 006e0024d1..fea8256ca1 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -60,11 +60,11 @@ private: /* TODO: this is getting of hand... */ - Interpretation_context_handle one_; - Interpretation_context_handle two_; - Interpretation_context_handle null_; - Interpretation_context_handle shared_; - Interpretation_context_handle solo_; + Context_handle one_; + Context_handle two_; + Context_handle null_; + Context_handle shared_; + Context_handle solo_; void substitute_both (Context *to1, Context *to2); @@ -204,7 +204,7 @@ Part_combine_iterator::substitute_both (Context *to1, { Context *tos[] = {to1, to2}; Music_iterator *mis[] = {first_iter_, second_iter_}; - Interpretation_context_handle *hs[] + Context_handle *hs[] = { &null_, &one_, &two_, diff --git a/lily/quote-iterator.cc b/lily/quote-iterator.cc index 61b2d025e9..45e0f066a7 100644 --- a/lily/quote-iterator.cc +++ b/lily/quote-iterator.cc @@ -18,7 +18,7 @@ class Quote_iterator : public Music_wrapper_iterator public: Quote_iterator (); Moment vector_moment (int idx) const; - Interpretation_context_handle quote_outlet_; + Context_handle quote_outlet_; Moment start_moment_; Moment stop_moment_; -- 2.39.5