]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/group-interface.hh
* Documentation/user/refman.itely: Compile fix for \mark #'(music ...).
[lilypond.git] / lily / include / group-interface.hh
index e2303633dcac15232bcba3950b7ac65a6b9bb8e5..5ee3a085e59d54f5ede1f9cf3fc9a70556013425 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
@@ -13,8 +13,8 @@
 #include "lily-proto.hh"
 #include "string.hh"
 #include "lily-guile.hh"
-#include "smobs.hh"
 
+#include "grob.hh"
 /**
    Look at Score element ELT as thing which has a list property called
    NAME_. Normally the list would contain Grobs, but
@@ -27,19 +27,36 @@ struct Group_interface
 {
 public:
   static int count (Grob*  , String);
+  static void add_thing (Grob*, SCM, SCM);
   static void add_thing (Grob*, String nm, SCM);
 };
 
 struct Pointer_group_interface : public Group_interface {
 public:
-  static void add_element (Grob*, String nm, Grob*e);
+  static void add_grob (Grob*, SCM nm, Grob*e);
 };
 /** 
   Put all score elements of ELT's property called NAME into an array,
   and return it.  */
+
+inline Link_array<Grob>
+list_to_grob_array (SCM l)
+{
+  Link_array<Grob> arr;
+
+  for (SCM s = l; gh_pair_p (s); s = gh_cdr (s))
+    {
+      SCM e = gh_car (s);
+      arr.push (unsmob_grob (e));
+    }
+
+  arr.reverse ();
+  return arr;
+}
+
 template<class T>
 Link_array<T>
-Pointer_group_interface__extract_elements (Grob const *elt, T *, const char* name)
+Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
 {
   Link_array<T> arr;