]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/translator-def.hh
bb641d5bf5d3ca2da96a56854ebd1b640f85c1fc
[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--2003 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 /*
18   The definition of a interpretation context as given in the
19   input. The lists are stored in order of definition.
20 */
21 struct Translator_def : public Input
22 {
23 private:
24   /*
25     these lists store the definition, in opposite order of entry
26   */
27   SCM translator_mods_;
28   SCM accept_mods_;
29   SCM property_ops_;
30
31   SCM description_;
32   SCM context_name_;
33   SCM context_aliases_;
34   SCM translator_group_type_;
35   
36 public:
37   void add_context_mod (SCM);
38   SCM default_child_context_name ();
39   SCM get_context_name () const;
40   SCM get_accepted ()  const;
41   SCM get_translator_names () const;
42   void set_acceptor (SCM accepts, bool add);
43
44   Link_array<Translator_def> path_to_acceptable_translator (SCM type_string, Music_output_def* odef) const;
45   Translator_group * instantiate (Music_output_def*);
46
47   SCM to_alist () const;
48   bool is_alias (SCM) const;
49   static SCM make_scm () ;
50
51   SCM clone_scm ()const;
52   void apply_default_property_operations (Translator_group*);
53 private:
54   DECLARE_SMOBS (Translator_def,foo);
55   Translator_def ();
56   Translator_def (Translator_def const&);
57 };
58
59 DECLARE_UNSMOB(Translator_def,translator_def);
60
61
62 #endif /* TRANSLATOR_DEF_HH */
63