]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/translator-def.hh
* lily/lily-guile.cc (robust_scm2double): new function. Use throughout.
[lilypond.git] / lily / include / translator-def.hh
index 167cf28551a8f957dc09dd457a6659db4dd5f9d0..ad47f9781c3c7177e28b0f443bbcad6b54f98237 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  translator-def.hh -- declare Translator_def
+  translator-def.hh -- declare Context_def
   
   source file of the GNU LilyPond music typesetter
   
   The definition of a interpretation context as given in the
   input. The lists are stored in order of definition.
 */
-struct Translator_def : public Input
+struct Context_def : public Input
 {
 private:
   /*
     these lists store the definition, in opposite order of entry
   */
-  
-  SCM consists_name_list_;
-  SCM end_consists_name_list_;
-  SCM accepts_name_list_;
+  SCM translator_mods_;
+  SCM accept_mods_;
   SCM property_ops_;
 
-public:
   SCM description_;
-  /*
-    "type" is overloaded.
-   */
-  SCM type_name_;
-  SCM type_aliases_;
+  SCM context_name_;
+  SCM context_aliases_;
   SCM translator_group_type_;
-
-  SCM modify_definition (SCM, SCM, bool);
-  SCM default_child_context_name ();
   
+public:
+  void add_context_mod (SCM);
+  SCM default_child_context_name ();
+  SCM get_context_name () const;
+  SCM get_accepted ()  const;
+  SCM get_property_ops ()  const { return property_ops_; }
+  SCM get_translator_names (SCM) const;
   void set_acceptor (SCM accepts, bool add);
-  void add_element (SCM name);
-  void remove_element (SCM name);
-  void add_last_element (SCM name);
-  void add_property_operation (SCM);
 
-  Link_array<Translator_def> path_to_acceptable_translator (SCM type_string, Music_output_def* odef) const;
-  Translator_group * instantiate (Music_output_def*);
+  Link_array<Context_def> path_to_acceptable_translator (SCM type_string, Music_output_def* odef) const;
+  Translator_group * instantiate (Music_output_def*, SCM extra_ops);
 
   SCM to_alist () const;
-
+  bool is_alias (SCM) const;
   static SCM make_scm () ;
 
   SCM clone_scm ()const;
   void apply_default_property_operations (Translator_group*);
-
 private:
-  DECLARE_SMOBS (Translator_def,foo);
-  Translator_def ();
-  Translator_def (Translator_def const&);
-
-
+  DECLARE_SMOBS (Context_def,foo);
+  Context_def ();
+  Context_def (Context_def const&);
 };
 
-DECLARE_UNSMOB(Translator_def,translator_def);
+DECLARE_UNSMOB(Context_def,context_def);
 
 
 #endif /* TRANSLATOR_DEF_HH */