]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/global-translator.hh
release: 0.0.78
[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.hh"
14 #include "pqueue.hh"
15
16 class Global_translator : public virtual Translator {
17     PQueue<Moment> extra_mom_pq_;
18     Moment last_mom_;
19 public:
20     Score *score_l_;
21     
22     Global_translator();
23     int moments_left_i()const;
24     void modify_next(Moment&);
25     void add_moment_to_process(Moment);
26
27     virtual void set_score(Score*);
28     virtual void prepare(Moment);
29     virtual void process() {}
30     virtual void finish() {}
31     virtual void start() {}
32     
33     DECLARE_MY_RUNTIME_TYPEINFO;
34 protected:
35     
36     virtual Global_translator *global_l() { return this; }
37     virtual int depth_i() const;
38     virtual Translator *ancestor_l(int);
39 };
40
41
42
43 #endif // GLOBAL_TRANSLATOR_HH