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