]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/grob-array.hh
8c5c4d54e2abd136e98b9ba0a2a0bc1b29e1b225
[lilypond.git] / lily / include / grob-array.hh
1 /*
2   grob-array.hh -- declare Grob_array
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef GROB_ARRAY_HH
11 #define GROB_ARRAY_HH
12
13 #include "lily-proto.hh"
14 #include "smobs.hh"
15 #include "parray.hh"
16
17 class Grob_array
18 {
19   Link_array<Grob> grobs_;
20   
21   DECLARE_SIMPLE_SMOBS(Grob_array,);
22
23 public:
24   Item *item (int i);
25   Spanner *spanner (int i);
26   Grob * grob (int i);
27   int size () const;
28   bool is_empty () const;
29   void clear ();  
30   void add (Grob *);
31   void set_array (Link_array<Grob> const &src);
32   Link_array<Grob> &array_reference ();
33   Link_array<Grob> const &array () const;
34   static SCM make_array ();
35 };
36
37 DECLARE_UNSMOB (Grob_array, grob_array);
38
39 Link_array<Grob> const &ly_scm2link_array (SCM x);
40 SCM grob_list_to_grob_array (SCM lst);
41
42
43 #endif /* GROB_ARRAY_HH */
44