]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/global-translator.hh
1d3d91ed5df438919a0056a4583d8bad3fc00f15
[lilypond.git] / lily / include / global-translator.hh
1 /*
2   global-translator.hh -- declare Global_translator
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef GLOBAL_TRANSLATOR_HH
11 #define GLOBAL_TRANSLATOR_HH
12
13 #include "translator-group.hh"
14 #include "pqueue.hh"
15
16 class Global_translator : public virtual Translator_group{
17   PQueue<Moment> extra_mom_pq_;
18 public:
19   TRANSLATOR_CLONE(Global_translator);
20   Moment last_mom_;
21   Moment now_mom_;
22   Global_translator();
23
24   int moments_left_i() const;
25   void modify_next (Moment&);
26   void add_moment_to_process (Moment);
27
28   virtual Music_output *get_output_p ();     
29   virtual void prepare (Moment);
30   virtual void process() {}
31   virtual void finish() {}
32   virtual void start() {}
33
34   DECLARE_MY_RUNTIME_TYPEINFO;
35 protected:
36   virtual Moment now_moment () const;
37   virtual Global_translator *global_l() { return this; }
38 };
39
40
41
42 #endif // GLOBAL_TRANSLATOR_HH