]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pointer-group-interface.hh
(parse_symbol_list): Bugfix.
[lilypond.git] / lily / include / pointer-group-interface.hh
1 /*
2   pointer-group-interface.hh -- declare Pointer_group_interface
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef POINTER_GROUP_INTERFACE_HH
10 #define POINTER_GROUP_INTERFACE_HH
11
12 #include "parray.hh"
13 #include "lily-proto.hh"
14 #include "lily-guile.hh"
15
16 struct Pointer_group_interface
17 {
18 public:
19   static int count (Grob *, SCM);
20   static void add_grob (Grob *, SCM nm, Grob *e);
21   static void add_grob (Grob *, SCM nm, SCM x);
22 };
23
24 Link_array<Grob> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
25 Link_array<Item> internal_extract_item_array (Grob const *elt, SCM symbol);
26
27 #define extract_grob_array(x, prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
28 #define extract_item_array(x, prop) internal_extract_item_array (x, ly_symbol2scm (prop))
29
30 /*
31   This is dubious coding style, but lets not risk that we change the
32   representation of grob sets again.
33 */
34 #define extract_grob_set(grob, prop, set)                               \
35   Link_array<Grob> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop)))
36 #define extract_item_set(grob, prop, set)                               \
37   Link_array<Item> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
38
39
40 #endif /* POINTER_GROUP_INTERFACE_HH */
41