2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
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
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
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/>.
20 #ifndef TIE_CONFIGURATION_HH
21 #define TIE_CONFIGURATION_HH
23 #include "direction.hh"
24 #include "interval.hh"
25 #include "std-vector.hh"
26 #include "main.hh" // DEBUG_SLUR_SCORING
28 class Tie_configuration
30 #if DEBUG_SLUR_SCORING
35 friend class Tie_formatting_problem;
38 Real score () const { return score_; }
39 string card () const { return score_card_; }
44 Drul_array<int> column_ranks_;
47 Interval attachment_x_;
49 void add_score (Real, string);
51 void center_tie_vertically (Tie_details const &);
52 Bezier get_transformed_bezier (Tie_details const &) const;
53 Bezier get_untransformed_bezier (Tie_details const &) const;
54 Real height (Tie_details const&) const;
55 int column_span_length () const;
57 static int compare (Tie_configuration const &a,
58 Tie_configuration const &b);
59 static Real distance (Tie_configuration const &a,
60 Tie_configuration const &b);
63 INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare);
65 class Ties_configuration : public vector<Tie_configuration>
70 vector<string> tie_score_cards_;
72 friend class Tie_formatting_problem;
74 Ties_configuration ();
75 void add_score (Real amount, string description);
76 void add_tie_score (Real amount, int i, string description);
80 string tie_card (int i) const { return tie_score_cards_[i]; }
81 string complete_tie_card (vsize i) const;
82 string complete_score_card () const;
85 #endif /* TIE_CONFIGURATION_HH */