]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/axes.hh
* lily/ledger-line-engraver.cc: new file.
[lilypond.git] / flower / include / axes.hh
index 74d44ac8a31dfc3a8fadfd6dc1199b7467cbbf41..d2d57e0fbf6cfcb0c37f6d37225c7fce0fd4d789 100644 (file)
@@ -3,33 +3,35 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef AXES_HH
 #define AXES_HH
 
+#include <assert.h>
+
 enum Axis {
     X_AXIS =0,
     Y_AXIS =1,
     NO_AXES=2,
 };
 
-
-class String;
-
-String axis_name_string (Axis);
-
-
-/**
-  the operator ++ for Axis. 
- */
-Axis other_axis (Axis); 
-Axis post_incr (Axis &);
-Axis incr (Axis &);
-//Axis operator++ (Axis);
-
-
+static inline
+Axis
+incr (Axis &a)
+{
+  assert (a < NO_AXES);
+  a = Axis (int (a) + 1);
+  return a;
+}
+
+static inline
+Axis
+other_axis (Axis a)
+{
+  return a ==  Y_AXIS ? X_AXIS : Y_AXIS;
+}
 
 #endif // AXES_HH