/** Request which are assumed to be "happening" before the
musical requests. */
-struct Command_req : virtual Request {
+class Command_req : public virtual Request {
+public:
REQUESTMETHODS(Command_req, command);
-
+ virtual Terminate_voice_req *terminate() {return 0;}
+ virtual Group_change_req * groupchange() { return 0;}
+ virtual Group_feature_req * groupfeature() { return 0; }
+
virtual Measure_grouping_req * measuregrouping() { return 0; }
virtual Clef_change_req * clefchange() { return 0; }
virtual Key_change_req * keychange() { return 0; }
/** Baseclass for meter/partial req. It has to be handled by
Staff_{walker,column} baseclass. */
-struct Timing_req : Command_req {
+class Timing_req : public Command_req {
+public:
REQUESTMETHODS(Timing_req, timing);
};
-struct Partial_measure_req : Timing_req {
+class Partial_measure_req : public Timing_req {
+public:
Moment duration_;
Partial_measure_req(Moment);
/**
todo: allow C meter
*/
-struct Meter_change_req : Timing_req {
+class Meter_change_req : public Timing_req {
+public:
int beats_i_, one_beat_i_;
int compare(Meter_change_req const&);
};
/// toggle Cadenza mode
-struct Cadenza_req : Timing_req {
+class Cadenza_req : public Timing_req {
+public:
/// turn on?
bool on_b_;
Cadenza_req(bool);
};
/// check if we're at start of a measure.
-struct Barcheck_req : Timing_req {
+class Barcheck_req : public Timing_req {
+public:
REQUESTMETHODS(Barcheck_req,barcheck);
};
-struct Measure_grouping_req: Timing_req {
+class Measure_grouping_req : public Timing_req {
+public:
Array<int> beat_i_arr_;
Array<Moment> elt_length_arr_;
REQUESTMETHODS(Measure_grouping_req, measuregrouping);
};
-struct Group_change_req : Command_req {
+class Group_change_req : public Command_req {
+public:
String newgroup_str_;
REQUESTMETHODS(Group_change_req, groupchange);
};
/** draw a (repeat)-bar. This something different than #Barcheck_req#,
the latter should only happen at the start of a measure. */
-struct Bar_req : Command_req {
+class Bar_req : public Command_req {
+public:
String type_str_;
Bar_req(String);
int compare(const Bar_req&)const;
REQUESTMETHODS(Bar_req,bar);
};
-struct Terminate_voice_req : Command_req {
+class Terminate_voice_req : public Command_req {
+public:
REQUESTMETHODS(Terminate_voice_req,terminate);
};
-struct Group_feature_req : Command_req {
+class Group_feature_req : public Command_req {
+public:
int stemdir_i_;
Group_feature_req();
REQUESTMETHODS(Group_feature_req, groupfeature);
Routines for sharps and flats are separated,
so that caller may identify non-conventional keys.
*/
-struct Key_change_req : Command_req {
+class Key_change_req : public Command_req {
+public:
Array<Melodic_req*> melodic_p_arr_;
bool minor_b_;
int minor_b();
};
-struct Clef_change_req : Command_req {
+class Clef_change_req : public Command_req {
+public:
String clef_str_;
Clef_change_req(String);
REQUESTMETHODS(Clef_change_req, clefchange);
A request which is coupled to a #Voice_element# with nonzero duration.
Base class only
*/
-struct Musical_req : virtual Request {
+class Musical_req : public virtual Request {
+public:
virtual Skip_req* skip() { return 0; }
virtual Dynamic_req* dynamic() { return 0; }
};
-struct Skip_req : Musical_req {
+class Skip_req : public Musical_req {
+public:
Moment duration_;
virtual Moment duration() const;
/** a request with a duration.
This request is used only a base class.
*/
-struct Rhythmic_req : virtual Musical_req {
+class Rhythmic_req : public virtual Musical_req {
+public:
Duration duration_;
/* *************** */
REQUESTMETHODS(Spacing_req, spacing);
};
-struct Blank_req : Spacing_req, Rhythmic_req {
+class Blank_req : public Spacing_req, Rhythmic_req {
+public:
REQUESTMETHODS(Spacing_req, spacing);
};
/// Put a text above or below (?) this staff.
-struct Text_req : virtual Musical_req {
+class Text_req : public virtual Musical_req {
+public:
/// preferred position (above/below)
int dir_i_;
/// the characteristics of the text
/** Put a text in lyric_staff
@see Lyric_staff
*/
-struct Lyric_req : public Rhythmic_req, Text_req {
+class Lyric_req : public Rhythmic_req, public Text_req {
+public:
Lyric_req(Text_def* t_p);
REQUESTMETHODS(Lyric_req, lreq_l);
};
};
/// Put a note of specified type, height, and with accidental on the staff.
-struct Note_req : Rhythmic_req, virtual Melodic_req {
+class Note_req : public Rhythmic_req, virtual public Melodic_req {
+public:
/// force/supress printing of accidental.
bool forceacc_b_;
attach a stem to the noteball.
Rhythmic_req parent needed to determine if it will fit inside a beam.
*/
-struct Stem_req : Rhythmic_req {
+class Stem_req : public Rhythmic_req {
+public:
/// preferred direction for the stem
int dir_i_;
Stem_req();
Requests to start or stop something.
This type of request typically results in the creation of a #Spanner#
*/
-struct Span_req : virtual Musical_req {
+class Span_req : public virtual Musical_req {
+public:
/// should the spanner start or stop, or is it unwanted?
enum {
NOSPAN, START, STOP
ugr. Place in hierarchy?
*/
-struct Plet_req : virtual Request {
+class Plet_req : public virtual Request {
+public:
char type_c_;
int dur_i_;
int type_i_;
/** Start / stop a beam at this note. if #nplet# is set, the staff will try to put an
appropriate number over the beam
*/
-struct Beam_req : Span_req {
+class Beam_req : public Span_req {
+public:
int nplet;
/* *************** */
};
/// a slur
-struct Slur_req : Span_req {
+class Slur_req : public Span_req {
+public:
REQUESTMETHODS(Slur_req,slur);
};
/** Put a script above or below this ``note''. eg upbow, downbow. Why
a request? These symbols may conflict with slurs and brackets, so
this also a request */
-struct Script_req : Musical_req {
+class Script_req : public Musical_req {
+public:
int dir_i_;
Script_def *scriptdef_p_;
Dynamic request carries a time, measured from the start of its
note.
*/
-struct Subtle_req : virtual Musical_req {
+class Subtle_req : public virtual Musical_req {
+public:
Moment subtime_;
REQUESTMETHODS(Subtle_req, subtle);
};
-struct Dynamic_req : Subtle_req {
+class Dynamic_req : public Subtle_req {
+public:
/// for absolute dynamics
enum Loudness {
FFF, FF, F, MF, MP, P, PP, PPP
REQUESTMETHODS(Dynamic_req, dynamic);
};
-struct Absolute_dynamic_req : Dynamic_req {
+class Absolute_dynamic_req : public Dynamic_req {
+public:
Loudness loudness_;
Absolute_dynamic_req();
REQUESTMETHODS(Absolute_dynamic_req, absdynamic);
};
-struct Span_dynamic_req : Dynamic_req, Span_req {
+class Span_dynamic_req : public Dynamic_req, public Span_req {
+public:
/// Grow or shrink the volume: 1=cresc, -1 = decresc
int dynamic_dir_i_;
Span_dynamic_req();