]> git.donarmstrong.com Git - lilypond.git/commitdiff
lily/context-handle: rename function, variable
authorKeith OHara <k-ohara5a5a@oco.net>
Sat, 6 Aug 2011 08:28:08 +0000 (01:28 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 13 Aug 2011 03:32:58 +0000 (20:32 -0700)
lily/context-handle.cc
lily/context.cc
lily/include/context-handle.hh
lily/include/context.hh
lily/music-iterator.cc
lily/part-combine-iterator.cc
lily/quote-iterator.cc
lily/tuplet-iterator.cc

index 0ee1778661529a029963841dd06a4561044037d3..639b2292a548f1a525ec8430b61990ca572be036 100644 (file)
@@ -48,13 +48,13 @@ void
 Context_handle::up (Context *t)
 {
   outlet_ = t;
-  t->iterator_count_++;
+  t->client_count_++;
 }
 
 void
 Context_handle::down ()
 {
-  outlet_->iterator_count_--;
+  outlet_->client_count_--;
   outlet_ = 0;
 }
 
@@ -76,7 +76,7 @@ Context_handle::set_context (Context *trans)
 }
 
 Context *
-Context_handle::get_outlet () const
+Context_handle::get_context () const
 {
 
   return outlet_;
@@ -85,5 +85,5 @@ Context_handle::get_outlet () const
 int
 Context_handle::get_count () const
 {
-  return outlet_->iterator_count_;
+  return outlet_->client_count_;
 }
index 3454ab1f1735fcc257ec58a46c46d0adc21c1e3f..83b8ae17dd21d6f1e2575f6303a039b921b1b9c1 100644 (file)
@@ -35,7 +35,7 @@
 bool
 Context::is_removable () const
 {
-  return context_list_ == SCM_EOL && ! iterator_count_
+  return context_list_ == SCM_EOL && ! client_count_
          && !dynamic_cast<Global_context const *> (daddy_context_);
 }
 
@@ -82,7 +82,7 @@ Context::Context ()
 {
   daddy_context_ = 0;
   aliases_ = SCM_EOL;
-  iterator_count_ = 0;
+  client_count_ = 0;
   implementation_ = 0;
   properties_scm_ = SCM_EOL;
   accepts_list_ = SCM_EOL;
index aa5850afc883a6cb50f85ae91b98def5c6b1ad38..f88298a026d9f3c5b5e5c15f0efdea370ef226e6 100644 (file)
@@ -31,7 +31,7 @@ public:
   void set_context (Context *);
   void operator = (Context_handle const &);
   Context_handle (Context_handle const &);
-  Context *get_outlet () const;
+  Context *get_context () const;
 
   int get_count () const;
 private:
index 9cf21cbce46a9f67f2f6069f54f3c35deedb8885..b946ebdc079677d2667befb7a97016587434c874 100644 (file)
@@ -39,7 +39,8 @@ class Context
 
 private:
   friend class Context_handle;
-  int iterator_count_;
+  /* how many Context_handles point to this Context */
+  int client_count_;
 
   /* Used internally by create_context */
   Stream_event *infant_event_;
index c1603c8709f10353d739f6063228a22b982268cf..52f280c58ecadb697487380a4d462df971c812df 100644 (file)
@@ -50,7 +50,7 @@ Music_iterator::~Music_iterator ()
 Context *
 Music_iterator::get_outlet () const
 {
-  return handle_.get_outlet ();
+  return handle_.get_context ();
 }
 
 void
index 5bd85b05b372fb4c8aad6934f0b5f857dfbd7dfa..4521abc15e24889b8004e0f4afad5643f5a61c95 100644 (file)
@@ -116,7 +116,7 @@ Part_combine_iterator::do_quit ()
   // Add listeners to all contexts except Devnull.
   for (int i = 0; i < NUM_OUTLETS; i++)
     {
-      Context *c = handles_[i].get_outlet ();
+      Context *c = handles_[i].get_context ();
       if (c->is_alias (ly_symbol2scm ("Voice")))
         c->event_source ()->remove_listener (GET_LISTENER (set_busy), ly_symbol2scm ("music-event"));
       handles_[i].set_context (0);
@@ -200,7 +200,7 @@ Part_combine_iterator::substitute_both (Outlet_type to1,
     {
       for (int j = 0; j < NUM_OUTLETS; j++)
         if (j != tos[i])
-          mis[i]->substitute_outlet (handles_[j].get_outlet (), handles_[tos[i]].get_outlet ());
+          mis[i]->substitute_outlet (handles_[j].get_context (), handles_[tos[i]].get_context ());
     }
 
   for (int j = 0; j < NUM_OUTLETS; j++)
@@ -221,7 +221,7 @@ Part_combine_iterator::kill_mmrest (int in)
       mmrest_event_->unprotect ();
     }
 
-  handles_[in].get_outlet ()->event_source ()->broadcast (mmrest_event_);
+  handles_[in].get_context ()->event_source ()->broadcast (mmrest_event_);
 }
 
 void
@@ -363,10 +363,10 @@ Part_combine_iterator::construct_children ()
     }
 
   SCM lst = get_music ()->get_property ("elements");
-  Context *one = handles_[CONTEXT_ONE].get_outlet ();
+  Context *one = handles_[CONTEXT_ONE].get_context ();
   set_context (one);
   first_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_car (lst))));
-  Context *two = handles_[CONTEXT_TWO].get_outlet ();
+  Context *two = handles_[CONTEXT_TWO].get_context ();
   set_context (two);
   second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst))));
 
index b13d5e1cd5bee4f09008834a741825815a816d9c..c8bcee378b39128ce671dd14c8e7482bbbf3e1b0 100644 (file)
@@ -269,7 +269,7 @@ Quote_iterator::process (Moment m)
                   transpose_mutable (ev->get_property_alist (true), diff);
                   transposed_musics_ = scm_cons (ev->unprotect (), transposed_musics_);
                 }
-              quote_outlet_.get_outlet ()->event_source ()->broadcast (ev);
+              quote_outlet_.get_context ()->event_source ()->broadcast (ev);
             }
         }
 
index 5f3548e4905975f41392f5b5d40ca3a98dce631b..f3c3c8285696ae7a30fd01b592cbea1de235a1f6 100644 (file)
@@ -104,8 +104,8 @@ Tuplet_iterator::process (Moment m)
       && m.main_part_ == next_split_mom_)
     {
       descend_to_bottom_context ();
-      if (tuplet_handler_.get_outlet ())
-        create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ());
+      if (tuplet_handler_.get_context ())
+        create_event (STOP)->send_to_context (tuplet_handler_.get_context ());
 
       if (m.main_part_ < music_get_length ().main_part_)
         {