lilypond-0.1.57
[lilypond.git] / lily / score-align-regs.cc
blobbde475795c7105b07ba1e476db30688a8c4fe446
1 /*
2 score-align-regs.cc -- implement different alignment registers.
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "key-item.hh"
10 #include "clef-item.hh"
11 #include "meter.hh"
12 #include "bar.hh"
13 #include "score-align-reg.hh"
15 #define IMPLEMENT_ALIGN_REG(C,T,p)\
16 class C ## _align_register : public Score_align_register \
17 { \
18 public: \
19 NAME_MEMBERS(); \
20 C ## _align_register() : Score_align_register() \
21 { type_ch_C_ = T::static_name();\
22 priority_i_ = p;} \
23 }; \
24 IMPLEMENT_STATIC_NAME(C ## _align_register) ; \
25 ADD_THIS_REGISTER(C ## _align_register); \
26 IMPLEMENT_IS_TYPE_B1(C ## _align_register, Score_align_register) ;
29 IMPLEMENT_ALIGN_REG(Key,Key_item,3);
30 IMPLEMENT_ALIGN_REG(Clef,Clef_item,2);
31 IMPLEMENT_ALIGN_REG(Meter,Meter,4);
32 IMPLEMENT_ALIGN_REG(Bar, Bar,0);