]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/grob-interface.hh
use classnames for interface naming; remove inclusion of
[lilypond.git] / lily / include / grob-interface.hh
index 29cf625874f7ccd4c1d0edd4b37b7f64d993e998..f6a92c0afed034a5859c8ff2a54d38d03e7c5746 100644 (file)
 
 #include "lily-guile.hh"
 
-#define ADD_INTERFACE(cl, a, b, c)                             \
+#define DECLARE_GROB_INTERFACE() \
+  static SCM interface_symbol_;           \
+  static bool has_interface (Grob*)
+
+#define ADD_INTERFACE(cl, b, c)                                \
+  SCM cl::interface_symbol_; \
   bool cl::has_interface (Grob *me)                            \
   {                                                            \
-    return me->internal_has_interface (ly_symbol2scm (a));     \
+    return me->internal_has_interface (interface_symbol_);     \
   }                                                            \
   void cl ## _init_ifaces ()                                   \
   {                                                            \
-    add_interface (#cl, a, b, c);                              \
+    cl::interface_symbol_ = add_interface (#cl, b, c);         \
   }                                                            \
   ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
 
-void add_interface (char const *cxx_name,
-                   char const *symbol,
+SCM add_interface (char const *cxx_name,
                    char const *descr,
                    char const *vars);