2 registergroup.cc -- implement Register_group_register
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "registergroup.hh"
12 #include "register.hh"
15 Register_group_register::acceptable_request_b(Request
* r
)
17 for (iter_top(reg_list_
, i
); i
.ok(); i
++) {
18 if (i
->acceptable_request_b(r
))
25 Register_group_register::set_feature(Features d
)
27 for (iter_top(reg_list_
, i
); i
.ok(); i
++) {
33 Register_group_register::pre_move_processing()
35 for (iter_top(reg_list_
, i
); i
.ok(); i
++)
36 i
->pre_move_processing();
40 Register_group_register::process_requests()
42 for (iter_top(reg_list_
, i
); i
.ok(); i
++)
43 i
->process_requests();
47 Register_group_register::post_move_processing()
49 for (iter_top(reg_list_
, i
); i
.ok(); i
++)
50 i
->post_move_processing();
54 Register_group_register::acknowledge_element(Staff_elem_info info
)
56 if (!contains_b(info
.origin_reg_l_arr_
[0]))
59 for (iter_top(reg_list_
, i
); i
.ok(); i
++)
60 i
->acknowledge_element(info
);
64 Register_group_register::contains_b(Request_register
* reg_l
)
66 bool parent_b
= Request_register::contains_b(reg_l
);
70 for (iter_top(reg_list_
, j
); j
.ok(); j
++)
71 if (j
->contains_b(reg_l
))
79 Register_group_register::try_request(Request
*req_l
)
81 for (iter_top(reg_list_
, i
); i
.ok(); i
++)
82 if (i
->try_request(req_l
))
88 Register_group_register::add(Request_register
*reg_p
)
90 reg_list_
.bottom().add(reg_p
);
91 reg_p
->daddy_reg_l_
= this;
95 Register_group_register::~Register_group_register()
101 Register_group_register::get_register_p(Request_register
*reg_l
)
103 iterator(reg_list_
) reg_cur
= reg_list_
.find(reg_l
);
104 assert(reg_cur
.ok());
105 return reg_cur
.remove_p();
109 Register_group_register::terminate_register(Request_register
*r_l
)
111 delete get_register_p(r_l
);
115 Register_group_register::do_print()const
118 for (iter_top(reg_list_
, i
); i
.ok(); i
++)