2 input-register.cc -- implement Input_register
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "input-register.hh"
11 Input_register::~Input_register()
14 Input_register::Input_register()
19 Input_register::group_b()const
21 return ireg_list_.size();
25 Input_register::get_nongroups_str_arr()const
28 for (iter_top(ireg_list_, i); i.ok(); i++) {
30 s_arr.push(i->name_str_);
36 Input_register::get_ireg_l(String nm)const
38 for (iter_top(ireg_list_, i); i.ok(); i++) {
39 if (i->name_str_ == nm)
44 Array<Request_register*>
45 Input_register::get_nongroup_p_arr() const
47 Array <Request_register*>a;
48 Array<String> sa(get_nongroups_str_arr());
49 for (int i=0; i < sa.size(); i++)
50 a.push(get_nongroup_register_p(sa[i]));
55 Input_register::add(Input_register *p)
57 ireg_list_.bottom().add(p);
61 Input_register::print() const
64 mtor << name_str_ << " { ";
65 for (iter_top(ireg_list_, i); i.ok(); i++)
72 Input_register::Input_register(Input_register const&s)
75 name_str_ = s.name_str_;
76 for (iter_top(s.ireg_list_, i); i.ok(); i++)
77 add(new Input_register(*i.ptr()));