2 engravergroup.cc -- implement Engraver_group_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "engraver-group-engraver.hh"
11 #include "engraver.hh"
13 #include "paper-score.hh"
14 #include "score-element.hh"
17 ADD_THIS_TRANSLATOR(Engraver_group_engraver
);
20 Engraver_group_engraver::announce_element (Score_element_info info
)
22 announce_info_arr_
.push (info
);
23 Engraver::announce_element (info
);
27 Engraver_group_engraver::do_announces()
29 for (Cons
<Translator
> *p
= trans_p_list_
.head_
; p
; p
= p
->next_
)
31 if (Engraver_group_engraver
*trg
= dynamic_cast <Engraver_group_engraver
*> (p
->car_
))
37 while (announce_info_arr_
.size ())
39 for (int j
=0; j
< announce_info_arr_
.size(); j
++)
41 Score_element_info info
= announce_info_arr_
[j
];
44 info
.req_l_
= &dummy_req
;
46 for (Cons
<Translator
> *p
= trans_p_list_
.head_
; p
; p
= p
->next_
)
48 if (!dynamic_cast <Engraver_group_engraver
*> (p
->car_
))
50 Engraver
* eng
= dynamic_cast<Engraver
*> (p
->car_
);
51 if (eng
&& eng
!= info
.origin_trans_l_arr (this)[0])
52 eng
->acknowledge_element (info
);
57 announce_info_arr_
.clear ();
58 for (Cons
<Translator
> *p
= trans_p_list_
.head_
; p
; p
= p
->next_
)
60 if (!dynamic_cast <Engraver_group_engraver
*> (p
->car_
))
62 Engraver
* eng
= dynamic_cast<Engraver
*> (p
->car_
);
64 eng
->process_acknowledged ();
72 Engraver_group_engraver::get_staff_info() const
74 Staff_info inf
= Engraver::get_staff_info();