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;
}
}
Context *
-Context_handle::get_outlet () const
+Context_handle::get_context () const
{
return outlet_;
int
Context_handle::get_count () const
{
- return outlet_->iterator_count_;
+ return outlet_->client_count_;
}
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_);
}
{
daddy_context_ = 0;
aliases_ = SCM_EOL;
- iterator_count_ = 0;
+ client_count_ = 0;
implementation_ = 0;
properties_scm_ = SCM_EOL;
accepts_list_ = SCM_EOL;
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:
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_;
Context *
Music_iterator::get_outlet () const
{
- return handle_.get_outlet ();
+ return handle_.get_context ();
}
void
// 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);
{
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++)
mmrest_event_->unprotect ();
}
- handles_[in].get_outlet ()->event_source ()->broadcast (mmrest_event_);
+ handles_[in].get_context ()->event_source ()->broadcast (mmrest_event_);
}
void
}
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))));
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);
}
}
&& 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_)
{