]> git.donarmstrong.com Git - lilypond.git/blob - lily/voice-group-regs.cc
release: 0.0.70pre
[lilypond.git] / lily / voice-group-regs.cc
1 /*
2   voicegroup.cc -- implement Voice_group_registers
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8 #include "music-list.hh"
9 #include "proto.hh"
10 #include "plist.hh"
11 #include "musical-request.hh"
12 #include "voice-regs.hh"
13 #include "voice-group-regs.hh"
14 #include "register.hh"
15 #include "command-request.hh"
16 #include "debug.hh"
17 #include "input-register.hh"
18 #include "time-description.hh"
19
20
21 Voice_group_registers::Voice_group_registers()
22 {
23     dir_i_ =0;
24 }
25
26 bool
27 Voice_group_registers::do_try_request(Request*r_l)
28 {
29     Command_req* c_l = r_l->command();
30     if (c_l&& c_l->groupfeature()) {
31         Feature f;
32         f.type_ = c_l->groupfeature()->type_str_;
33         f.value_ = c_l->groupfeature()->value_str_;
34         set_feature(f);
35         return true;
36     }
37     return Register_group_register::do_try_request(r_l);
38 }
39
40
41 IMPLEMENT_STATIC_NAME(Voice_group_registers);
42 IMPLEMENT_IS_TYPE_B1(Voice_group_registers,Register_group_register);
43
44 void
45 Voice_group_registers::do_print() const
46 {
47 #ifndef NPRINT
48     Register_group_register::do_print();
49 #endif
50 }
51
52
53
54 Scalar
55 Voice_group_registers::get_feature(String f)
56 {
57     if (f == "vdir")
58         return dir_i_;
59     Register_group_register::get_feature(f);
60 }
61
62 ADD_THIS_REGISTER(Voice_group_registers);