]> git.donarmstrong.com Git - lilypond.git/blob - hdr/score.hh
152e578493ca4c2ac12b7970f44eece2316a6931
[lilypond.git] / hdr / score.hh
1 #ifndef SCORE_HH
2 #define SCORE_HH
3 #include "varray.hh"
4 #include "proto.hh"
5 #include "plist.hh"
6 #include "moment.hh"
7 #include "assoc.hh"
8
9 /// the total music def of one movement
10 struct Score {
11     /// paper_, staffs_ and commands_ form the problem definition.
12     Paperdef *paper_p_;
13     IPointerList<Staff*> staffs_;
14     
15     /// "runtime" fields for setting up spacing    
16     IPointerList<Score_column*> cols_;
17     PScore *pscore_p_;
18
19     String define_spot_str_;
20     
21     Assoc<String, Moment> markers_assoc_;
22     /****************************************************************/
23
24     /// construction
25     Score(Paperdef*);
26     ~Score();    
27     void add(Staff*);
28
29     void add_marks(Array<String>, Array<Moment>);
30     /// do everything except outputting to file
31     void process();
32     
33     /// output to file
34     void output(String fn);
35
36     // standard
37     void OK() const;
38     void print() const;
39
40     // utils:
41     PCursor<Score_column*> create_cols(Moment);
42     PCursor<Score_column *> find_col(Moment,bool);
43     /// when does the last *musical* element finish?
44     Moment last() const;
45
46 private:
47     Score(Score const&){}
48     ///
49     void do_cols();
50     /**
51       make the pcol_l_ fields of each Score_column point to the correct PCol,
52       remove any unnecessary Score_column's
53      */
54
55     /// remove unused cols
56     void clean_cols();
57     
58     /// add #Idealspacings# to #pscore_#
59     void calc_idealspacing();
60     /** add the score wide commands (bars, breaks) to each staff so
61     they can process (typeset) them if needed */
62 };
63 /**
64         
65     */
66 #endif