(children_contexts): new accessor function.
* lily/include/context.hh (class Context): make daddy_context_
private.
* lily/lyric-engraver.cc (get_voice_to_lyrics): recursively go
higher for finding Voice. (backportme)
* lily/include/context.hh (class Context): remove
find_context_below() as a method.
current = current->get_parent_context ();
}
- if (current && current->id_string_ == to_id)
+ if (current && current->id_string () == to_id)
{
String msg;
msg += _ ("Can't switch translators, I'm there already");
*/
String warn2= "Change_iterator::process (): "
+ get_outlet ()->context_name () + " = `"
- + get_outlet ()->id_string_ + "': ";
+ + get_outlet ()->id_string () + "': ";
warning (warn2);
get_music ()->origin ()->warning (warn1);
}
current = current->get_parent_context ();
}
- if (current && current->id_string_ == to_id)
+ if (current && current->id_string () == to_id)
{
String msg;
msg += _ ("Can't switch translators, I'm there already");
We could change the current translator's id, but that would make
errors hard to catch
- last->translator_id_string_ = get_change ()->change_to_id_string_;
+ last->translator_id_string () = get_change ()->change_to_id_string ();
*/
error (_ ("I'm one myself"));
}
Context *tr = unsmob_context (context);
SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
- return scm_makfrom0str (tr->id_string_. to_str0 ());
+ return scm_makfrom0str (tr->id_string (). to_str0 ());
}
LY_DEFINE (ly_context_name, "ly:context-name",
if (n == ly_symbol2scm ("Bottom"))
{
Context* tg = get_default_interpreter ();
- tg->id_string_ = id;
+ tg->id_string () = id;
return tg;
}
if (i == path.size () -1)
{
- new_group->id_string_ = id;
+ new_group->id_string () = id;
}
current->add_context (new_group);
{
if (where->is_alias (type))
{
- if (id == "" || where->id_string_ == id)
+ if (id == "" || where->id_string () == id)
return where;
}
SCM accepts_list_;
SCM aliases_;
SCM implementation_;
+ String id_string_;
friend class Context_def;
public:
+ String id_string () const { return id_string_; }
SCM children_contexts () const { return context_list_; }
SCM default_child_context_name () const;
Link_array<Context> path_to_acceptable_context (SCM alias,
Music_output_def*) const;
- String id_string_;
};
/*
return c;
SCM voice_name = lyrics->get_property ("associatedVoice");
- String nm = lyrics->id_string_;
+ String nm = lyrics->id_string ();
if (ly_c_string_p (voice_name))
nm = ly_scm2string (voice_name);
audio_staff_ = new Audio_staff;
announce_element (Audio_element_info (audio_staff_, 0));
- name_ = new Audio_text (Audio_text::TRACK_NAME, context ()->id_string_);
+ name_ = new Audio_text (Audio_text::TRACK_NAME, context ()->id_string ());
announce_element (Audio_element_info (name_, 0));
tempo_ = new Audio_tempo (get_tempo ());