Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Side by Side Diff: lily/include/system.hh

Issue 581270043: Issue 5607: typedef System::rank_type (Closed)
Patch Set: typedef System::rank_type Created 5 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lily/break-substitution.cc ('k') | lily/system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1996--2019 Han-Wen Nienhuys 4 Copyright (C) 1996--2019 Han-Wen Nienhuys
5 5
6 LilyPond is free software: you can redistribute it and/or modify 6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 LilyPond is distributed in the hope that it will be useful, 11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>. 17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
18 */ 18 */
19 19
20 #ifndef SYSTEM_HH 20 #ifndef SYSTEM_HH
21 #define SYSTEM_HH 21 #define SYSTEM_HH
22 22
23 #include <cstdint>
23 #include <limits> 24 #include <limits>
24 25
25 #include "column-x-positions.hh" 26 #include "column-x-positions.hh"
26 #include "paper-column.hh" 27 #include "paper-column.hh"
27 #include "spanner.hh" 28 #include "spanner.hh"
28 #include "skyline.hh" 29 #include "skyline.hh"
29 30
30 /* 31 /*
31 If you keep following offset reference points, you will always end 32 If you keep following offset reference points, you will always end
32 up at the root object. This root object is called @ref{System}, and it 33 up at the root object. This root object is called @ref{System}, and it
33 represents a system (i.e. a line of music). 34 represents a system (i.e. a line of music).
34 */ 35 */
35 class System : public Spanner 36 class System : public Spanner
36 { 37 {
37 int rank_; 38 public:
39 typedef int16_t rank_type;
40
41 private:
42 rank_type rank_;
38 Grob_array *all_elements_; 43 Grob_array *all_elements_;
39 void init_elements (); 44 void init_elements ();
40 friend class Paper_score; // ugh. 45 friend class Paper_score; // ugh.
41 Paper_score *pscore_; // ugh. 46 Paper_score *pscore_; // ugh.
42 47
43 public: 48 public:
44 Paper_score *paper_score () const; 49 Paper_score *paper_score () const;
45 Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interva l_t<int> bounds); 50 Grob *get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interva l_t<int> bounds);
46 virtual bool accepts_as_bound_item (const Item *) const; 51 virtual bool accepts_as_bound_item (const Item *) const;
47 virtual bool accepts_as_bound_paper_column (const Paper_column *) const; 52 virtual bool accepts_as_bound_paper_column (const Paper_column *) const;
48 Paper_column *get_bound (Direction d) const { 53 Paper_column *get_bound (Direction d) const {
49 // This is safe because only Paper_columns are accepted as bounds. 54 // This is safe because only Paper_columns are accepted as bounds.
50 return static_cast<Paper_column *> (Spanner::get_bound (d)); 55 return static_cast<Paper_column *> (Spanner::get_bound (d));
51 } 56 }
52 Grob *get_pure_bound (Direction dir, int start, int end); 57 Grob *get_pure_bound (Direction dir, int start, int end);
53 Grob *get_maybe_pure_bound (Direction dir, bool pure, int start, int end); 58 Grob *get_maybe_pure_bound (Direction dir, bool pure, int start, int end);
54 int get_rank () const; 59 rank_type get_rank () const { return rank_; }
55 vector<Real> get_footnote_heights_in_range (vsize st, vsize end); 60 vector<Real> get_footnote_heights_in_range (vsize st, vsize end);
56 vector<Real> get_in_note_heights_in_range (vsize st, vsize end); 61 vector<Real> get_in_note_heights_in_range (vsize st, vsize end);
57 vector<Real> internal_get_note_heights_in_range (vsize st, vsize end, bool foo t); 62 vector<Real> internal_get_note_heights_in_range (vsize st, vsize end, bool foo t);
58 vector<Grob *> get_footnote_grobs_in_range (vsize st, vsize end); 63 vector<Grob *> get_footnote_grobs_in_range (vsize st, vsize end);
59 vsize num_footnotes (); 64 vsize num_footnotes ();
60 void do_break_substitution_and_fixup_refpoints (); 65 void do_break_substitution_and_fixup_refpoints ();
61 void post_processing (); 66 void post_processing ();
62 SCM get_paper_system (); 67 SCM get_paper_system ();
63 SCM get_paper_systems (); 68 SCM get_paper_systems ();
64 SCM get_broken_system_grobs (); 69 SCM get_broken_system_grobs ();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 virtual System *clone () const { return new System (*this); } 110 virtual System *clone () const { return new System (*this); }
106 111
107 private: 112 private:
108 Interval part_of_line_pure_height (vsize start, vsize end, bool begin); 113 Interval part_of_line_pure_height (vsize start, vsize end, bool begin);
109 }; 114 };
110 115
111 void set_loose_columns (System *which, Column_x_positions const *posns); 116 void set_loose_columns (System *which, Column_x_positions const *posns);
112 117
113 #endif /* SYSTEM_HH */ 118 #endif /* SYSTEM_HH */
114 119
OLDNEW
« no previous file with comments | « lily/break-substitution.cc ('k') | lily/system.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b