]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.75
authorfred <fred>
Sun, 24 Mar 2002 19:47:51 +0000 (19:47 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:47:51 +0000 (19:47 +0000)
lily/include/break.hh

index 85b5ef01450b3716959de5f22de73a939e71f6c8..703f9bb8164ba1dd9401715a5cd6b96f842fc8b8 100644 (file)
   a like. A "parindent", caching of breakpoints
   
   */
-struct Break_algorithm {
+class Break_algorithm {
+    void generate_spacing_problem(Line_of_cols,Spacing_problem&)const;
+protected:
     PScore &pscore_;
     Real linelength;
 
-    /* *************** */
-
-    Break_algorithm(PScore&);
-
-    /// check if the spacing/breaking problem is well-stated
-    void problem_OK()const;
-
     /// search all pcols which are breakable.
     Line_of_cols find_breaks() const;
 
@@ -40,16 +35,23 @@ struct Break_algorithm {
     /// does curline fit on the paper?    
     bool feasible(Line_of_cols)const;
     
-    virtual Array<Col_hpositions> solve()=0;
 
     /** generate a solution with no regard to idealspacings or
       constraints.  should always work */
     Col_hpositions stupid_solution(Line_of_cols) const;
+    virtual Array<Col_hpositions> do_solve()const=0;
+public:
+    Break_algorithm(PScore&);
+
+    /// check if the spacing/breaking problem is well-stated
+    void problem_OK()const;
+
+    Array<Col_hpositions> solve()const;
 };
 
 /// wordwrap type algorithm: move to next line if current is optimal.
 struct Word_wrap : Break_algorithm {
-    virtual Array<Col_hpositions> solve();
+    virtual Array<Col_hpositions> do_solve()const;
     Word_wrap(PScore&);
 };
 #endif // BREAK_HH