source file of the GNU LilyPond music typesetter
- (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+
#include "group-interface.hh"
-#include "score-element.hh"
-/*
- ugh: clean me, junk elt_l_ field
- */
-Group_interface::Group_interface (Score_element * e)
+void
+Group_interface::add_thing (Grob*me, SCM sym, SCM thing)
{
- elt_l_ = (Score_element*)e;
- name_ = "elements";
+ me->add_to_list_property (sym, thing);
}
-Group_interface::Group_interface (Score_element *e, String s)
-{
- elt_l_ =(Score_element*)e;
- name_ = s;
-}
-bool
-Group_interface::has_interface ()
-{
- SCM el = elt_l_->get_elt_property (name_.ch_C());
-
- return el == SCM_EOL || gh_pair_p (el);
-}
-
-
-
void
-Group_interface::add_thing (SCM s)
+Group_interface::add_thing (Grob*me, String name, SCM thing)
{
- elt_l_->set_elt_property (name_.ch_C (),
- gh_cons (s, elt_l_->get_elt_property (name_.ch_C())));
+ add_thing (me, ly_symbol2scm (name.to_str0 ()), thing);
}
-
int
-Group_interface::count ()
+Group_interface::count (Grob *me, String name)
{
- return scm_ilength (elt_l_->get_elt_property (name_.ch_C()));
+ return scm_ilength (me->get_property (name.to_str0 ()));
}
-
+void
+Pointer_group_interface::add_grob (Grob*me, SCM name, Grob*p)
+{
+ Group_interface::add_thing (me, name, p->self_scm ());
+}