]> git.donarmstrong.com Git - lilypond.git/blob - lily/context-specced-music-iterator.cc
*** empty log message ***
[lilypond.git] / lily / context-specced-music-iterator.cc
1 /*   
2 context-specced-music-iterator.cc --  implement 
3
4 source file of the GNU LilyPond music typesetter
5
6 (c) 2002--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7
8  */
9
10 #include "music-wrapper-iterator.hh"
11 #include "translator-group.hh"
12
13 class Context_specced_music_iterator : public Music_wrapper_iterator
14 {
15 public:
16   VIRTUAL_COPY_CONS(Music_iterator);
17   DECLARE_SCHEME_CALLBACK(constructor,());
18   virtual void construct_children ();
19 };
20
21 void
22 Context_specced_music_iterator::construct_children ()
23 {
24   SCM ct = get_music ()->get_mus_property ("context-type");
25   String c_type;
26   if (gh_string_p (ct))
27     c_type =  ly_scm2string (ct);
28   
29   String c_id;
30   SCM ci = get_music ()->get_mus_property ("context-id");
31   if (gh_string_p (ci))
32     c_id = ly_scm2string (ci);
33   
34   Translator_group* a
35     =report_to ()->find_create_translator (c_type, c_id);
36   
37   set_translator (a);
38
39   Music_wrapper_iterator::construct_children();
40 }
41 IMPLEMENT_CTOR_CALLBACK(Context_specced_music_iterator);