]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/p-col.hh
release: 0.0.72pre
[lilypond.git] / lily / include / p-col.hh
index 48d6c62a1958e7c01287d9ff25336e0bc02d2890..593420cea0894a977551c27a27ac55695044a9b4 100644 (file)
     \end{itemize}
   */
 
-struct PCol { 
-    PointerList<Item const *> its;
-    PointerList<Spanner const *> stoppers, starters;
+class PCol { 
+public:
+    Link_list<Item *> its;
+    Link_list<Spanner *> stoppers, starters;
     
-
-
     /** prebreak is put before end of line.
     if broken here, then (*this) column is discarded, and prebreak
     is put at end of line, owned by Col
@@ -40,19 +39,25 @@ struct PCol {
     PCol *daddy_l_;
     
     /// if lines are broken then this column is in #line#
-    Line_of_score const *line_l_;
+    Line_of_score *line_l_;
 
-    /// if lines are broken then this column x-coord #hpos#
-    Real hpos;
+    /** if lines are broken then this column x-coord #hpos# if not
+      known, then hpos == -1.(ugh?)  */
 
+    Real hpos;                 // should use ptr?
+
+    bool error_mark_b_;
+    
     PScore * pscore_l_;
 
     /* *************** */
     /// which  one (left =0)
-    int rank() const;
+    int rank_i() const;
 
     /// does this column have items
     bool used_b() const;
+    bool breakpoint_b() const;
+    void clean_breakable_items();
     
     void add(Item *i);
 
@@ -68,13 +73,20 @@ struct PCol {
       signed compare on columns.
 
       @return < 0 if c1 < c2.
-    */static int compare(const PCol &c1, const PCol &c2);
-    
+    */
+    static int compare(const PCol &c1, const PCol &c2);
+    void set_rank(int);
 
     void OK() const;
     void set_breakable();
     void print()const;
 private:
+    
+    /**
+      The ranking: left is smaller than right 
+      -1 is uninitialised.
+     */
+    int rank_i_;
     PCol(PCol const&){}
 };