source file of the GNU LilyPond music typesetter
- (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#define TIE_FORMATTING_PROBLEM_HH
#include "drul-array.hh"
-#include "std-vector.hh"
#include "skyline.hh"
-#include "lily-proto.hh"
#include "tie-configuration.hh"
#include "tie-details.hh"
+#include "tuple.hh"
#include <map>
#include <set>
-template<class T, int N>
-struct Tuple
-{
- T t_array[N];
- Tuple (T const *src)
- {
- for (int i = 0; i < N; i++)
- t_array[i] = src[i];
- }
-};
-
-template<class T, int N>
-inline bool
-operator<(Tuple<T, N> const &t1,
- Tuple<T, N> const &t2)
-{
- for (int i = 0; i < N ; i++)
- {
- if (t1.t_array[i] > t2.t_array[i])
- return false;
- if (t1.t_array[i] < t2.t_array[i])
- return true;
- }
-
- return false;
-}
-
-
typedef map< Tuple<int,4>, Tie_configuration *> Tie_configuration_map;
struct Tie_specification
Tie_specification ();
int column_span () const;
+ void get_tie_manual_settings (Grob *);
};
struct Tie_configuration_variation
Tie_configuration_variation ();
};
-typedef map <int, vector<Skyline_entry> > Chord_outline_map ;
+typedef map < Tuple<int, 2>, Skyline> Chord_outline_map;
+typedef map < Tuple<int, 2>, Box> Column_extent_map;
class Tie_formatting_problem
{
Chord_outline_map chord_outlines_;
- Drul_array< Box > stem_extents_;
- Drul_array< Box > head_extents_;
+ Column_extent_map stem_extents_;
+ Column_extent_map head_extents_;
+
set<int> dot_positions_;
Interval dot_x_;
vector<Tie_specification> specifications_;
Tie_details details_;
void print_ties_configuration (Ties_configuration const *);
+ Interval get_stem_extent (int, Direction, Axis) const;
+ Interval get_head_extent (int, Direction, Axis) const;
+
public:
Tie_formatting_problem ();
~Tie_formatting_problem ();