Add FiguredBass to ChoirStaff's accepts list.
[lilypond/mpolesky.git] / lily / include / grob-array.hh
blobc51f88ef02cb9a744441223a4f0550621ba364e6
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GROB_ARRAY_HH
21 #define GROB_ARRAY_HH
23 #include "lily-proto.hh"
24 #include "smobs.hh"
25 #include "std-vector.hh"
27 class Grob_array
29 vector<Grob*> grobs_;
30 bool ordered_;
32 DECLARE_SIMPLE_SMOBS (Grob_array);
34 Grob_array ();
35 public:
36 bool ordered () const { return ordered_; }
37 void set_ordered (bool b) { ordered_ = b; }
38 Item *item (vsize i);
39 Spanner *spanner (vsize i);
40 Grob *grob (vsize i) { return grobs_.at (i); }
41 vsize size () const { return grobs_.size (); }
42 bool empty () const;
43 void remove_duplicates ();
44 void clear ();
45 void add (Grob *x) { grobs_.push_back (x); }
46 void set_array (vector<Grob*> const &src);
47 vector<Grob*> &array_reference ();
48 vector<Grob*> const &array () const;
49 static SCM make_array ();
52 DECLARE_UNSMOB (Grob_array, grob_array);
54 vector<Grob*> const &ly_scm2link_array (SCM x);
55 SCM grob_list_to_grob_array (SCM lst);
57 #endif /* GROB_ARRAY_HH */