2007/10/9, Ralph Little <[EMAIL PROTECTED]>:
> Hi,
> Sorry for my C++ ignorance, but what does the following do?
>
> =========================================
> void
> performer_each (SCM list, Performer_method method)
> {
>   for (SCM p = list; scm_is_pair (p); p = scm_cdr (p))
>     {
>       Performer *e = dynamic_cast<Performer *> (unsmob_translator
> (scm_car (p)));
>       if (e)
>     (e->*method) ();
>     }

this calls the derived method (as specified in the function pointer
method) for the instance e. eg.

  performer_each(l, &Class::member)

will call

  c->member()

for each element of the list.



-- 
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to