2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2005--2011 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 POINTER_GROUP_INTERFACE_HH
21 #define POINTER_GROUP_INTERFACE_HH
23 #include "std-vector.hh"
24 #include "lily-proto.hh"
25 #include "lily-guile.hh"
27 struct Pointer_group_interface
30 static int count (Grob *, SCM);
31 static void add_grob (Grob *, SCM nm, Grob *e);
32 static void add_grob (Grob *, SCM nm, SCM x);
33 static void add_unordered_grob (Grob *, SCM nm, Grob *);
34 static void set_ordered (Grob *, SCM, bool);
35 static Grob_array *get_grob_array (Grob *, SCM);
36 static Grob *find_grob (Grob *, SCM, bool (*pred) (Grob *));
39 vector<Grob *> const &internal_extract_grob_array (Grob const *elt, SCM symbol);
40 vector<Item *> internal_extract_item_array (Grob const *elt, SCM symbol);
42 #define extract_grob_array(x, prop) internal_extract_grob_array (x, ly_symbol2scm (prop))
43 #define extract_item_array(x, prop) internal_extract_item_array (x, ly_symbol2scm (prop))
46 This is dubious coding style, but lets not risk that we change the
47 representation of grob sets again.
49 #define extract_grob_set(grob, prop, set) \
50 vector<Grob*> const &set (internal_extract_grob_array (grob, ly_symbol2scm (prop)))
51 #define extract_item_set(grob, prop, set) \
52 vector<Item*> set (internal_extract_item_array (grob, ly_symbol2scm (prop)))
54 #endif /* POINTER_GROUP_INTERFACE_HH */