2 translator-group.hh -- declare Translator_group
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef TRANSLATOR_GROUP_HH
11 #define TRANSLATOR_GROUP_HH
14 #include "lily-proto.hh"
15 #include "virtual-methods.hh"
16 #include "translator.hh"
21 typedef void (Translator::*Method_pointer
) (void);
23 class Scheme_hash_table
;
26 /** Make some kind of Elements from Requests. Elements are made by
27 hierarchically grouped Translators
29 class Translator_group
: public virtual Translator
{
31 Scheme_hash_table
*properties_dict () const;
34 friend class Interpretation_context_handle
;
38 SCM
add_translator (SCM
, Translator
*);
39 void execute_single_pushpop_property (SCM prop
, SCM sym
, SCM val
);
40 SCM
get_property (SCM name_sym
) const;
41 void set_property (String var_name
, SCM value
);
42 void unset_property (SCM var_sym
);
43 void set_property (SCM var_sym
, SCM value
);
44 Translator_group
*where_defined (SCM name_sym
) const;
48 VIRTUAL_COPY_CONS (Translator
);
49 Translator_group (Translator_group
const &);
51 void add_group_translator (Translator
*trans_p
);
54 /// Score_register = 0, Staff_registers = 1, etc)
55 Translator_group
* ancestor_l (int l
=1);
57 bool is_bottom_translator_b () const;
58 bool removable_b () const;
59 void terminate_translator (Translator
*r_l
);
60 Translator
*remove_translator_p (Translator
*trans_l
);
61 void check_removal ();
62 // Translator *get_simple_translator (String) const;
63 Translator_group
*find_existing_translator_l (String n
, String id
);
64 Translator_group
*find_create_translator_l (String n
, String id
);
65 Link_array
<Translator_group
> path_to_acceptable_translator (String alias
, Music_output_def
*) const;
67 Translator_group
*get_default_interpreter ();
70 bool try_music_on_nongroup_children (Music
*m
);
72 virtual void do_announces ();
73 virtual bool try_music (Music
* req_l
);
74 virtual void stop_translation_timestep ();
75 virtual void start_translation_timestep ();
76 virtual void initialize ();
77 virtual void finalize ();
78 virtual void each (Method_pointer
);
82 #endif // TRANSLATOR_GROUP_HH