]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/translator.hh
patch::: 1.3.93.jcn2
[lilypond.git] / lily / include / translator.hh
index c97234aa1585425817cd03b1f5296c99ba287e73..05f865082db658324bd60d73f03092f1c9e58f58 100644 (file)
@@ -3,26 +3,27 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef TRANSLATOR_HH
 #define TRANSLATOR_HH
+
 #include "global-ctor.hh"
 #include "string.hh"
 #include "lily-proto.hh"
 #include "virtual-methods.hh"
 #include "lily-guile.hh"
-#include "dictionary.hh"
 #include "parray.hh"
 #include "input.hh"
-
+#include "smobs.hh"
 
 /** Make some kind of #Element#s from Requests. Elements are made by
   hierarchically grouped #Translator#s
   */
 class Translator : public Input {
+  void init ();
 public:
   Music_output_def * output_def_l_;
   String type_str_;
@@ -33,11 +34,10 @@ public:
   VIRTUAL_COPY_CONS(Translator);
   Translator (Translator const &);
   Translator ();
-  virtual ~Translator ();
   
   Translator_group * daddy_trans_l_ ;
  
-  void print () const;
+
   
   /**
     try to fit the request in this engraver
@@ -52,7 +52,7 @@ public:
   void pre_move_processing();
   void add_processing ();
   void creation_processing ();
-  void process_requests();
+  void process_music();
   void post_move_processing();
   void removal_processing();
   /**
@@ -60,12 +60,24 @@ public:
     */
   Music_output_def *output_def_l () const;
 
-  SCM get_property (String, Translator_group **) const;
-  SCM get_property (SCM symbol, Translator_group **) const;
+  SCM get_property (const char *) const;
+  SCM get_property (SCM symbol) const;
   
   virtual Moment now_mom () const;  
 
-protected:
+  /*
+    ugh: bubbled up from Translator_group. 
+   */
+  SCM simple_trans_list_;
+  SCM trans_group_list_;
+  SCM definition_;
+  
+  SCM properties_scm_;
+  DECLARE_SMOBS(Translator, dummy);
+public:
+  /*
+    UGH. Clean this up.
+   */
    enum { 
     ORPHAN,
     VIRGIN,
@@ -75,7 +87,8 @@ protected:
     PROCESSED_REQS,
     ACKED_REQS,
     MOVE_DONE
-  } status;
+  } status_;                   // junkme
+protected:
 
   /*    
        @see{try_request}
@@ -83,10 +96,9 @@ protected:
        */
   virtual void do_add_processing ();
   virtual bool do_try_music (Music *req_l);
-  virtual void do_print () const;
   virtual void do_pre_move_processing();
   virtual void do_post_move_processing();
-  virtual void do_process_requests () ;
+  virtual void do_process_music () ;
   virtual void do_creation_processing() ;
   virtual void do_removal_processing();
 };
@@ -109,5 +121,5 @@ extern Dictionary<Translator*> *global_translator_dict_p;
 void add_translator (Translator*trans_p);
 
 Translator*get_translator_l (String s);
-
+Translator *unsmob_translator (SCM);
 #endif // TRANSLATOR_HH