2 commandrequest.hh -- declare Non musical requests
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef COMMANDREQUEST_HH
11 #define COMMANDREQUEST_HH
16 /** Request which are assumed to be "happening" before the
18 struct Command_req
: virtual Request
{
19 REQUESTMETHODS(Command_req
, command
);
21 virtual Measure_grouping_req
* measuregrouping() { return 0; }
22 virtual Clef_change_req
* clefchange() { return 0; }
23 virtual Key_change_req
* keychange() { return 0; }
24 virtual Partial_measure_req
* partial() { return 0; }
25 virtual Meter_change_req
* meterchange() { return 0; }
26 virtual Bar_req
*bar() { return 0; }
27 virtual Cadenza_req
*cadenza() { return 0; }
28 virtual Timing_req
*timing() { return 0; }
32 /** Baseclass for meter/partial req. It has to be handled by
33 Staff_{walker,column} baseclass. */
34 struct Timing_req
: Command_req
{
35 REQUESTMETHODS(Timing_req
, timing
);
39 struct Partial_measure_req
: Timing_req
{
42 Partial_measure_req(Moment
);
43 REQUESTMETHODS(Partial_measure_req
, partial
);
49 struct Meter_change_req
: Timing_req
{
50 int beats_i_
, one_beat_i_
;
54 REQUESTMETHODS(Meter_change_req
, meterchange
);
57 /// toggle Cadenza mode
58 struct Cadenza_req
: Timing_req
{
62 REQUESTMETHODS(Cadenza_req
,cadenza
);
65 /// check if we're at start of a measure.
66 struct Barcheck_req
: Timing_req
{
68 REQUESTMETHODS(Barcheck_req
,barcheck
);
71 struct Measure_grouping_req
: Timing_req
{
72 Array
<int> beat_i_arr_
;
73 Array
<Moment
> elt_length_arr_
;
75 REQUESTMETHODS(Measure_grouping_req
, measuregrouping
);
78 struct Group_change_req
: Command_req
{
80 REQUESTMETHODS(Group_change_req
, groupchange
);
83 /** draw a (repeat)-bar. This something different than #Barcheck_req#,
84 the latter should only happen at the start of a measure. */
85 struct Bar_req
: Command_req
{
88 int compare(const Bar_req
&)const;
89 REQUESTMETHODS(Bar_req
,bar
);
91 struct Terminate_voice_req
: Command_req
{
92 REQUESTMETHODS(Terminate_voice_req
,terminate
);
95 struct Group_feature_req
: Command_req
{
98 REQUESTMETHODS(Group_feature_req
, groupfeature
);
102 struct Key_change_req
: Command_req
{
103 Array
<Melodic_req
*> melodic_p_arr_
;
106 Key_change_req(Key_change_req
const&);
108 REQUESTMETHODS(Key_change_req
, keychange
);
111 struct Clef_change_req
: Command_req
{
113 Clef_change_req(String
);
114 REQUESTMETHODS(Clef_change_req
, clefchange
);
117 #endif // COMMANDREQUEST_HH