]> git.donarmstrong.com Git - lilypond.git/blob - flower/include/axis.hh
741ce181b685e296a11d5b650c0ecb9216c81465
[lilypond.git] / flower / include / axis.hh
1 /*
2   axes.hh -- declare Axis
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef AXES_HH
10 #define AXES_HH
11
12 #include <cassert>
13 using namespace std;
14
15 enum Axis
16   {
17     X_AXIS = 0,
18     Y_AXIS = 1,
19     NO_AXES = 2,
20   };
21
22 static inline
23 Axis
24 incr (Axis &a)
25 {
26   assert (a < NO_AXES);
27   a = Axis (int (a) + 1);
28   return a;
29 }
30
31 static inline
32 Axis
33 other_axis (Axis a)
34 {
35   return a == Y_AXIS ? X_AXIS : Y_AXIS;
36 }
37
38 #endif // AXES_HH