]> git.donarmstrong.com Git - lilypond.git/blob - lily/performer.cc
release: 0.0.77.jcn1
[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 bool 
69 Performer::do_try_request( Request* req_l )
70 {
71     return false;
72 }
73
74 bool
75 Performer::try_request(Request*r)
76 {
77     if (!init_b_) { 
78         creation_processing();
79     }
80     return do_try_request(r);
81 }
82
83 void
84 Performer::creation_processing()
85 {
86     if (!init_b_) { 
87 /*      if ( daddy_perf_l_ ) {
88             init_b_ = true;     // ugh. avoid recursion
89             daddy_perf_l_->creation_processing();
90             init_b_ = false;
91         }
92         
93         */
94         do_creation_processing();
95         init_b_ = true;
96     }
97 }
98 void
99 Performer::do_creation_processing()
100 {
101 }
102
103 void
104 Performer::do_removal_processing()
105 {
106 }