]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score.hh
dea8806243156b51f33a561002822ef73cc68c1b
[lilypond.git] / lily / include / score.hh
1 /*
2   score.hh -- declare Score
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef SCORE_HH
11 #define SCORE_HH
12
13 #include "varray.hh"
14 #include "lily-proto.hh"
15 #include "plist.hh"
16 #include "moment.hh"
17 #include "assoc.hh"
18 #include "string.hh"
19 #include "input.hh"
20 #include "lily-proto.hh"
21
22 /// the total music def of one movement
23 class Score: public Input {
24 public:
25     /// paper_, staffs_ and commands_ form the problem definition.
26     Paper_def *paper_p_;
27     Midi_def *midi_p_;
28     Music * music_p_;
29     PScore *pscore_p_;
30
31     int errorlevel_i_;
32     
33     /* *************************************************************** */
34
35     /// construction
36     Score();
37     ~Score();    
38
39     /// do everything except outputting to file
40     void process();
41     
42     /// output to file
43     void output(String fn);
44
45     
46     ///
47     void set(Midi_def* midi_p);
48     ///
49     void set(Paper_def* midi_p);
50
51     void print() const;
52
53     Score(Score const&);
54 private:
55
56
57
58     void run_translator(Global_translator*);
59     void midi_output();
60     void paper_output();
61
62     /// do midi stuff
63     void midi();
64
65     /// do paper stuff
66     void paper();
67
68     // utils:
69     PCursor<Score_column*> create_cols(Moment, PCursor<Score_column*> &last);
70
71
72     /**
73       make the pcol_l_ fields of each Score_column point to the correct PCol,
74       remove any unnecessary Score_column's
75      */
76     void do_cols();
77
78     /// remove unused cols
79     void clean_cols();
80     
81     /// add #Idealspacings# to #pscore_#
82     void calc_idealspacing();
83 };
84 #endif