2 group-interface.hh -- declare Group_interface
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef GROUP_INTERFACE_HH
11 #define GROUP_INTERFACE_HH
16 Look at Score element ELT as thing which has a list property called
17 NAME_. Normally the list would contain Grobs, but
18 sometimes it can be different things.
20 todo: reename as list_interface?
23 struct Group_interface
26 static int count (Grob* , String);
27 static void add_thing (Grob*, SCM, SCM);
28 static void add_thing (Grob*, String nm, SCM);
31 struct Pointer_group_interface : public Group_interface {
33 static void add_grob (Grob*, SCM nm, Grob*e);
38 Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
42 for (SCM s = elt->get_property (name); scm_is_pair (s); s = scm_cdr (s))
45 arr.push (dynamic_cast<T*> (unsmob_grob (e)));
55 #endif /* GROUP_INTERFACE_HH */