]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/translator-def.hh
release: 1.3.85
[lilypond.git] / lily / include / translator-def.hh
1 /*   
2   translator-def.hh -- declare Translator_def
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef TRANSLATOR_DEF_HH
11 #define TRANSLATOR_DEF_HH
12
13 #include "lily-proto.hh"
14 #include "smobs.hh"
15 #include "input.hh"
16
17 struct Translator_def : public Input
18 {
19   SCM consists_name_list_;
20   SCM end_consists_name_list_;
21   SCM accepts_name_list_;
22   SCM property_ops_;
23   SCM type_name_;
24   SCM translator_group_type_;
25
26   SCM modify_definition (SCM, SCM, bool);
27   
28   void set_acceptor (SCM accepts, bool add);
29   void add_element (SCM name);
30   void remove_element (SCM name);
31   void add_last_element (SCM name);
32
33   void add_push_property (SCM,SCM,SCM);
34   void add_pop_property (SCM,SCM);
35   void add_property_assign (SCM, SCM);
36   Link_array<Translator_def> path_to_acceptable_translator (SCM type_str, Music_output_def* odef) const;
37   Translator_group * instantiate (Music_output_def*);
38
39   static SCM make_scm () ;
40   static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val);
41
42   SCM clone_scm ()const;
43   DECLARE_SMOBS(Translator_def,foo);
44 private:
45
46   Translator_def ();
47   Translator_def (Translator_def const&);
48
49
50 };
51
52 Translator_def* unsmob_translator_def (SCM);
53
54
55 #endif /* TRANSLATOR_DEF_HH */
56