]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/global-context.hh
* lily/include/global-context.hh (Context): clean-up data hiding.
[lilypond.git] / lily / include / global-context.hh
1 /*
2   global-context.hh -- declare Global_context
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef GLOBAL_CONTEXT_HH
11 #define GLOBAL_CONTEXT_HH
12
13 #include "context.hh"
14 #include "pqueue.hh"
15
16 class Global_context : public virtual Context
17 {
18   PQueue<Moment> extra_mom_pq_;
19   Music_output_def*  output_def_;
20   
21   friend class Music_output_def;
22 public:
23   Global_context (Music_output_def*, Moment final);
24   int get_moments_left () const;
25   Moment sneaky_insert_extra_moment (Moment);
26   void add_moment_to_process (Moment);
27   void run_iterator_on_me (Music_iterator*);
28   virtual Score_context*get_score_context () const;
29   
30   void apply_finalizations ();
31   void add_finalization (SCM);
32
33   virtual Music_output *get_output ();     
34   virtual void prepare (Moment);
35   virtual void one_time_step ();
36   virtual void finish ();
37   virtual Music_output_def* get_output_def () const; 
38   virtual Moment now_mom () const;
39
40   Moment previous_moment () const;
41 protected:
42   Moment final_mom_;
43   Moment prev_mom_;
44   Moment now_mom_;
45 };
46
47
48
49 #endif // GLOBAL_CONTEXT_HH