+
+bool
+is_child_context (Context *me, Context *child)
+{
+ while (child && child != me)
+ child = child->get_parent_context ();
+
+ return child == me;
+}
+
+/*
+ move to context of child iterator if it is deeper down in the
+ hierarchy.
+*/
+void
+Music_iterator::descend_to_child (Context *child_report)
+{
+ Context *me_report = get_outlet ();
+ if (is_child_context (me_report, child_report))
+ set_context (child_report);
+}