2 register.cc -- implement Request_register
4 Sourcefile of GNU LilyPond musictypesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "music-list.hh"
10 #include "musical-request.hh"
11 #include "register.hh"
12 #include "register-group.hh"
16 Request_register::post_move_processing()
19 if (status
< CREATION_INITED
) {
20 do_creation_processing();
21 status
= CREATION_INITED
;
23 if (status
>= MOVE_INITED
)
26 do_post_move_processing();
31 Request_register::try_request(Request
* r
)
33 if (status
< MOVE_INITED
)
34 post_move_processing();
36 return do_try_request(r
);
40 Request_register::process_requests()
42 if (status
< PROCESSED_REQS
)
43 post_move_processing();
44 else if (status
>= PROCESSED_REQS
)
47 status
= PROCESSED_REQS
;
48 do_process_requests();
52 Request_register::pre_move_processing()
54 do_pre_move_processing();
55 status
= CREATION_INITED
;
59 Request_register::fill_staff_info(Staff_info
&)
65 Request_register::get_feature(String t
)
67 return daddy_reg_l_
->get_feature(t
);
71 Request_register::do_try_request(Request
*)
76 Request_register::Request_register()
83 Request_register::announce_element(Score_elem_info i
)
85 i
.origin_reg_l_arr_
.push(this);
86 daddy_reg_l_
->announce_element(i
);
90 Request_register::typeset_element(Score_elem
*p
)
92 daddy_reg_l_
->typeset_element(p
);
96 Request_register::paper()const
98 return daddy_reg_l_
->paper();
102 Request_register::typeset_breakable_item(Item
* nobreak_p
)
104 daddy_reg_l_
->typeset_breakable_item(nobreak_p
);
108 Request_register::contains_b(Request_register
*reg_l
)const
110 return this == reg_l
;
114 Request_register::get_staff_info() const
116 return daddy_reg_l_
->get_staff_info();
120 Request_register::print() const
123 mtor
<< "\n" << name() << " {";
129 IMPLEMENT_STATIC_NAME(Request_register
);
130 IMPLEMENT_IS_TYPE_B(Request_register
);
133 Request_register::do_print()const