]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/group-interface.hh
* flower/include/axis.hh: rename from axes.hh
[lilypond.git] / lily / include / group-interface.hh
index 196eea71f9761ad55529baa8370327a35e4418d4..c8c0938e307c992192ce2d5cf19c014ed5af4647 100644 (file)
@@ -1,20 +1,16 @@
-/*   
+/*
   group-interface.hh -- declare Group_interface
-  
+
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+
+  (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
 
 #ifndef GROUP_INTERFACE_HH
 #define GROUP_INTERFACE_HH
 
-#include "lily-proto.hh"
-#include "string.hh"
-#include "lily-guile.hh"
-
 #include "grob.hh"
+#include "string.hh"
 /**
    Look at Score element ELT as thing which has a list property called
    NAME_. Normally the list would contain Grobs, but
 struct Group_interface
 {
 public:
-  static int count (Grob*  , String);
-  static void add_thing (Grob*, SCM, SCM);
-  static void add_thing (Grob*, String nm, SCM);
+  static int count (Grob *, SCM);
+  static void add_thing (Grob *, SCM, SCM);
 };
 
-struct Pointer_group_interface : public Group_interface {
+struct Pointer_group_interface : public Group_interface
+{
 public:
-  static void add_grob (Grob*, SCM nm, Grob*e);
+  static void add_grob (Grob *, SCM nm, Grob *e);
 };
 
-template<class T>
-Link_array<T>
-Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
-{
-  Link_array<T> arr;
-
-  for (SCM s = elt->get_property (name); ly_c_pair_p (s); s = ly_cdr (s))
-    {
-      SCM e = ly_car (s);
-      arr.push (dynamic_cast<T*> (unsmob_grob (e)));
-    }
-
-  arr.reverse ();
-  return arr;
-}
-
-
-
+Link_array<Grob> extract_grob_array (Grob const *elt, SCM symbol);
+Link_array<Item> extract_item_array (Grob const *elt, SCM symbol);
 
 #endif /* GROUP_INTERFACE_HH */