2 p-col.cc -- implement PCol
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
19 for (iter_top(its,i); i.ok(); i++)
22 w.unite(Interval(0,0));
29 assert(rank_i_ != -1);
38 prebreak_p_->rank_i_ = i;
40 postbreak_p_->rank_i_ = i;
49 mtor << "rank: " << rank_i_ << '\n';
51 mtor << "# symbols: " << its.size() ;
53 mtor << "\npre,post: ";
55 postbreak_p_->print();
56 } else if (daddy_l_) {
57 mtor<<'\n' << ((this == daddy_l_->prebreak_p_) ?
58 "prebreak" : "postbreak");
61 mtor << "extent: " << width().str() << "\n";
67 PCol::compare(PCol const &c1, PCol const &c2)
69 return c1.rank() - c2.rank();
76 if (prebreak_p_ || postbreak_p_ ) {
77 assert(prebreak_p_&&postbreak_p_);
78 assert(prebreak_p_->daddy_l_ == this);
79 assert(postbreak_p_->daddy_l_ == this);
90 prebreak_p_ = new PCol(this);
91 postbreak_p_ = new PCol(this);
92 prebreak_p_->pscore_l_ = pscore_l_;
93 postbreak_p_->pscore_l_ = pscore_l_;
97 PCol::breakable_b() const
99 return prebreak_p_||postbreak_p_;
102 PCol::PCol(PCol *parent)
129 return breakable_b() || its.size();