]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/grob-interface.hh
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / include / grob-interface.hh
index 8590373a0ab7d2b58601396b081737b5640f4272..bde5f5263d4130091afbd44a803501ee9fc9da69 100644 (file)
 #define INTERFACE_HH
 
 #include "lily-guile.hh"
+#include "protected-scm.hh"
 
 class Grob;
 
-// TODO: remove DECLARE_GROB_INTERFACE
-#define DECLARE_GROB_INTERFACE() \
-  static bool has_interface (Grob *g)
-
-// TODO: remove cl::has_interface and use ::has_interface directly
 #define ADD_INTERFACE(cl, b, c)                                 \
   Grob_interface<cl> cl ## _interface_initializer;              \
   template <> char const *Grob_interface<cl>::cxx_name_ (#cl);  \
   template <> char const *Grob_interface<cl>::description_ (b); \
-  template <> char const *Grob_interface<cl>::variables_ (c);   \
-  bool cl::has_interface (Grob *me)                             \
-  {                                                             \
-    return ::has_interface<cl> (me);                            \
-  }
+  template <> char const *Grob_interface<cl>::variables_ (c);
 
 SCM add_interface (char const *cxx_name,
                    char const *descr,
@@ -66,14 +58,14 @@ private:
   friend bool has_interface(Grob *);
 
 private:
-  static SCM interface_symbol_;
+  static Protected_scm interface_symbol_;
   static char const *cxx_name_;
   static char const *description_;
   static char const *variables_;
 };
 
 template <class Interface>
-SCM Grob_interface<Interface>::interface_symbol_;
+Protected_scm Grob_interface<Interface>::interface_symbol_;
 
 #endif /* INTERFACE_HH */