X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fgroup-interface.hh;h=a39373d27d8e7946f6c3f31a525f5d2ba339f387;hb=545092a25d8ca41dc90b87482474b3719f7130a9;hp=66308caf4443c5d58c07356a56b4ffc38f8250e1;hpb=422004486569407b8809da7f3c7053c1e4767bff;p=lilypond.git diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 66308caf44..a39373d27d 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -1,23 +1,19 @@ -/* +/* group-interface.hh -- declare Group_interface - + source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ + + (c) 1999--2005 Han-Wen Nienhuys +*/ #ifndef GROUP_INTERFACE_HH #define GROUP_INTERFACE_HH -#include "lily-proto.hh" +#include "grob.hh" #include "string.hh" -#include "lily-guile.hh" -#include "smobs.hh" - /** Look at Score element ELT as thing which has a list property called - NAME_. Normally the list would contain Score_elements, but + NAME_. Normally the list would contain Grobs, but sometimes it can be different things. todo: reename as list_interface? @@ -25,50 +21,10 @@ struct Group_interface { - Score_element * elt_l_; - String name_; -public: - Group_interface (Score_element *); - Group_interface (Score_element *, String); - int count (); - void add_thing (SCM); - bool has_interface (); - void set_interface (); -}; - -struct Pointer_group_interface { - Score_element * elt_l_; - String name_; public: - Pointer_group_interface (Score_element*); - Pointer_group_interface (Score_element*, String); - int count (); - void set_interface (); - static bool has_interface (Score_element*); - bool has_interface (); - void add_element (Score_element*); + static int count (Grob *, SCM); + static void add_thing (Grob *, SCM, SCM); }; -/** - Put all score elements of ELT's property called NAME into an array, - and return it. */ -template -Link_array -Pointer_group_interface__extract_elements (Score_element const *elt, T *, const char* name) -{ - Link_array arr; - - for (SCM s = elt->get_elt_property (name); gh_pair_p (s); s = gh_cdr (s)) - { - SCM e = gh_car (s); - arr.push (dynamic_cast (unsmob_element (e))); - } - - arr.reverse (); - return arr; -} - - - #endif /* GROUP_INTERFACE_HH */