]> git.donarmstrong.com Git - lilypond.git/blob - lily/performer.cc
patch::: 0.1.1.jcn1: zachte pats
[lilypond.git] / lily / performer.cc
1 /*
2   performer.cc -- implement Performer
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7                  Jan Nieuwenhuizen <jan@digicash.com>
8  */
9
10
11 #include "performer-group-performer.hh"
12 #include "debug.hh"
13
14
15 IMPLEMENT_IS_TYPE_B(Performer);
16
17 Performer::Performer()
18 {
19     daddy_perf_l_ = 0;
20     init_b_ =false;
21 }
22
23 Performer::~Performer()
24 {
25 }
26
27 void
28 Performer::do_print() const
29 {
30 }
31
32 Moment
33 Performer::get_mom() const
34 {
35     return daddy_perf_l_->get_mom();
36 }
37
38 void 
39 Performer::play( Audio_item* p ) 
40
41     daddy_perf_l_->play( p ); 
42 }
43
44 void 
45 Performer::play( Midi_item* l ) 
46
47     daddy_perf_l_->play( l ); 
48 }
49
50 int
51 Performer::get_tempo_i()const
52 {
53     return daddy_perf_l_->get_tempo_i();
54 }
55
56 void
57 Performer::print() const
58 {
59 #ifndef NPRINT
60     mtor << "\n" << name() << " {";
61     do_print();
62     mtor << "}";
63 #endif
64 }
65
66 void
67 Performer::process_requests()
68 {
69 }
70
71 void
72 Performer::set( Moment )
73 {
74
75
76 //<ugh>
77 int
78 Performer::get_track_i() const
79 {
80     return daddy_perf_l_->get_track_i();
81 }
82
83 void
84 Performer::set_track( int& )
85 {
86 }
87 //</ugh>
88
89 bool 
90 Performer::do_try_request( Request* req_l )
91 {
92     return false;
93 }
94
95 bool
96 Performer::try_request(Request*r)
97 {
98     if (!init_b_) { 
99         creation_processing();
100     }
101     return do_try_request(r);
102 }
103
104 void
105 Performer::creation_processing()
106 {
107     if (!init_b_) { 
108 /*      if ( daddy_perf_l_ ) {
109             init_b_ = true;     // ugh. avoid recursion
110             daddy_perf_l_->creation_processing();
111             init_b_ = false;
112         }
113         
114         */
115         do_creation_processing();
116         init_b_ = true;
117     }
118 }
119 void
120 Performer::do_creation_processing()
121 {
122 }
123
124 void
125 Performer::do_removal_processing()
126 {
127 }