X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fbreak-algorithm.hh;h=025c56406e09da577d00c211654b863d23d525bf;hb=7c93f8e815a77c7735d0ab0f3cc4b21c19a10199;hp=fa0b0d77709c51fde1c56a94fc989d439f07412e;hpb=3c2f386f1385a10dafbb811be245f5a75d6b132c;p=lilypond.git diff --git a/lily/include/break-algorithm.hh b/lily/include/break-algorithm.hh index fa0b0d7770..025c56406e 100644 --- a/lily/include/break-algorithm.hh +++ b/lily/include/break-algorithm.hh @@ -3,53 +3,40 @@ source file of the GNU LilyPond music typesetter - (c) 1996--2000 Han-Wen Nienhuys + (c) 1996--2005 Han-Wen Nienhuys */ - #ifndef BREAK_HH #define BREAK_HH -#include "array.hh" #include "interval.hh" -#include "lily-proto.hh" #include "column-x-positions.hh" - /** Class representation of an algorithm which decides where to put - the column, and where to break lines. + the column, and where to break lines. - JUNKME. - - */ -class Break_algorithm { + JUNKME. +*/ +class Break_algorithm +{ protected: - Paper_score *pscore_l_; - Real linewidth_f_; - - /// search all pcols which are breakable. - Link_array find_breaks() const; + Paper_score *pscore_; + Real linewidth_; - Array find_break_indices() const; - + Link_array find_breaks () const; + Array find_break_indices () const; + void solve_line (Column_x_positions *) const; + bool feasible (Link_array const &) const; - /// helper: solve for the columns in #curline#. - void solve_line (Column_x_positions*) const; - - /// does curline fit on the paper? - bool feasible (Link_array) const; - - - Simple_spacer* generate_spacing_problem (Link_array, Interval) const; - - virtual Array do_solve() const=0; + Simple_spacer_wrapper *generate_spacing_problem (Link_array const &, Interval) const; + virtual Array do_solve () const = 0; public: - Simple_spacer* (*get_line_spacer)(); - Break_algorithm(); - void set_pscore (Paper_score*); - - Array solve() const; + virtual ~Break_algorithm (); + Simple_spacer *(*get_line_spacer) (); + Break_algorithm (); + void set_pscore (Paper_score *); + Array solve () const; }; #endif // BREAK_HH