/*
- class-name.hh -- declare
+ virtual-methods.hh -- declare
- source file of the LilyPond music typesetter
+ source file of the Flower Library
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#ifndef CLASS_NAME_HH
-#define CLASS_NAME_HH
+#ifndef VIRTUAL_METHODS_HH
+#define VIRTUAL_METHODS_HH
/** a macro to declare the classes name as a static and virtual function.
The static_name() can *not* be inlined (this might have the effect that
#define VIRTUAL_COPY_CONS(T, R)\
virtual R *clone() const { return new T(*this); } \
+ int yet_another_stupid_function_to_allow_semicolon()
#define IMPLEMENT_IS_TYPE_B(D) \
bool D::is_type_b(const char *s) const \
return s == static_name() || BA::is_type_b(s) || BB::is_type_b(s); \
}
-#endif // CLASS-NAME_HH
+#endif
String type_str_;
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Bar)
+ SCORE_ELEM_CLONE(Bar);
Bar();
private:
void do_print() const;
NAME_MEMBERS();
Beam();
void add(Stem*);
-
void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current);
void set_stemlens();
- SCORE_ELEM_CLONE(Beam)
+ SCORE_ELEM_CLONE(Beam);
protected:
virtual Interval do_width()const;
virtual Offset center() const;
virtual void do_pre_processing();
public:
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Break_align_item)
+ SCORE_ELEM_CLONE(Break_align_item);
};
#endif // BREAK_ALIGN_ITEM_HH
/* *************** */
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Clef_item)
+ SCORE_ELEM_CLONE(Clef_item);
Clef_item();
void read(Clef_register const&);
void read(String);
bool left_dyn_b_;
Crescendo();
protected:
- SCORE_ELEM_CLONE(Crescendo)
+ SCORE_ELEM_CLONE(Crescendo);
virtual Molecule*brew_molecule_p()const;
NAME_MEMBERS();
class Horizontal_vertical_group_item : public Item, public Horizontal_vertical_group {
public:
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_vertical_group_item)
+ SCORE_ELEM_CLONE(Horizontal_vertical_group_item);
protected:
virtual void do_print() const;
};
class Horizontal_group_item : public Item, public Horizontal_group {
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_group_item)
+ SCORE_ELEM_CLONE(Horizontal_group_item);
protected:
virtual void do_print() const { Elbement_group::do_print(); }
};
*/
class General_script_def : public Input {
public:
- VIRTUAL_COPY_CONS(General_script_def,General_script_def)
+ VIRTUAL_COPY_CONS(General_script_def,General_script_def);
NAME_MEMBERS();
virtual int staff_dir_i()const;
void print() const;
/**
Order elems left to right.
+
+
TODO: insert(order, elem)
*/
class Horizontal_align_item : public Item {
protected:
Link_array<Item> item_l_arr_;
Array<int> priority_i_arr_;
- int align_i_;
public:
+ Item * center_l_;
+ /**
+ Which side to align?
+ -1: left side, 0: centered (around center_l_ if not nil), 1: right side
+ */
+ int align_i_;
+
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Horizontal_align_item)
+ SCORE_ELEM_CLONE(Horizontal_align_item);
void add(Item*, int p);
Horizontal_align_item();
protected:
+
virtual void do_substitute_dependency(Score_elem * , Score_elem *);
/// do calculations before determining horizontal spacing
virtual void do_pre_processing();
/* *************** */
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Key_item)
+ SCORE_ELEM_CLONE(Key_item);
Key_item(int cposition);
void add(int pitch, int acc);
public:
Meter(Array<Scalar> args) ;
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Meter)
+ SCORE_ELEM_CLONE(Meter);
};
#endif // METER_HH
Music_list(Music_list const&);
Music_list();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Music_list,Music)
+ VIRTUAL_COPY_CONS(Music_list,Music);
virtual void add(Music*);
virtual void transpose(Melodic_req const *);
public:
Chord();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Chord,Music)
+ VIRTUAL_COPY_CONS(Chord,Music);
virtual void translate(Moment dt);
virtual MInterval time_int()const;
};
class Voice_element : public Chord {
public:
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Voice_element,Music)
+ VIRTUAL_COPY_CONS(Voice_element,Music);
};
/**
Voice();
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Voice, Music)
+ VIRTUAL_COPY_CONS(Voice, Music);
virtual void translate(Moment dt);
virtual MInterval time_int()const;
};
String id_str_;
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Change_reg, Music)
+ VIRTUAL_COPY_CONS(Change_reg, Music);
};
#endif // MUSIC_LIST_HH
void print() const;
virtual void transpose(Melodic_req const *);
virtual void translate(Moment dt);
- VIRTUAL_COPY_CONS(Music,Music)
+ VIRTUAL_COPY_CONS(Music,Music);
NAME_MEMBERS();
Music();
protected:
virtual ~Request(){}
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Request,Music)
+ VIRTUAL_COPY_CONS(Request,Music);
void print()const ;
virtual MInterval time_int() const;
#define REQUESTMETHODS(T,accessor) \
virtual T * accessor() { return this;}\
NAME_MEMBERS();\
-VIRTUAL_COPY_CONS(T, Request)\
+VIRTUAL_COPY_CONS(T, Request);\
virtual void do_print() const
virtual void do_substitute_dependency(Score_elem*,Score_elem*);
virtual Interval do_width()const;
virtual void do_print() const;
- SCORE_ELEM_CLONE(Line_of_score)
+ SCORE_ELEM_CLONE(Line_of_score);
};
#endif
virtual void do_post_processing();
virtual void do_substitute_dependency(Score_elem*, Score_elem*);
virtual void do_pre_processing();
- SCORE_ELEM_CLONE(Slur)
+ SCORE_ELEM_CLONE(Slur);
NAME_MEMBERS();
};
protected:
virtual Interval do_width()const;
virtual void do_print() const;
- SCORE_ELEM_CLONE(Spanner_elem_group)
+ SCORE_ELEM_CLONE(Spanner_elem_group);
public:
NAME_MEMBERS();
};
bool broken_b() const;
Spanner* find_broken_piece(Line_of_score*)const;
protected:
- SCORE_ELEM_CLONE(Spanner)
+ SCORE_ELEM_CLONE(Spanner);
virtual void break_into_pieces();
Link_array<Spanner> broken_into_l_arr_;
Real inter_note_f()const;
int steps_i()const;
protected:
- SCORE_ELEM_CLONE(Staff_symbol)
+ SCORE_ELEM_CLONE(Staff_symbol);
virtual Molecule* brew_molecule_p() const;
virtual void do_print()const;
};
/// one broken line of staff.
struct Line_of_staff : public Spanner_elem_group{
- SCORE_ELEM_CLONE(Line_of_staff)
+ SCORE_ELEM_CLONE(Line_of_staff);
public:
NAME_MEMBERS();
protected:
virtual Atom get_atom(Paper_def* p, int dir_i_)const;
NAME_MEMBERS();
- VIRTUAL_COPY_CONS(Text_def,General_script_def)
+ VIRTUAL_COPY_CONS(Text_def,General_script_def);
public:
/**
centered , or aligned?
String style_str_;
/* *************** */
+ virtual void do_print() const;
virtual ~Text_def() {};
bool do_equal_b(const Text_def&)const;
Text_def();
Tie();
NAME_MEMBERS();
- SCORE_ELEM_CLONE(Tie)
+ SCORE_ELEM_CLONE(Tie);
};
#endif // TIE_HH