2 interface.hh -- declare Interface
4 source file of the GNU LilyPond music typesetter
6 (c) 2002--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "lily-guile.hh"
14 #define DECLARE_GROB_INTERFACE() \
15 static SCM interface_symbol_; \
16 static bool has_interface (Grob*)
18 #define ADD_INTERFACE(cl, b, c) \
19 SCM cl::interface_symbol_; \
20 bool cl::has_interface (Grob *me) \
22 return me->internal_has_interface (interface_symbol_); \
24 void cl ## _init_ifaces () \
26 cl::interface_symbol_ = add_interface (#cl, b, c); \
28 ADD_SCM_INIT_FUNC (cl ## ifaces, cl ## _init_ifaces);
30 SCM add_interface (char const *cxx_name,
34 SCM ly_add_interface (SCM, SCM, SCM);
35 void internal_add_interface (SCM, SCM, SCM);
36 SCM ly_all_grob_interfaces ();
38 #endif /* INTERFACE_HH */