2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
28 #define ITEM2(x,y) type_##y=x,
29 #define ITEM(x) type_##x,
37 #define item_is_equal_id(a,b) ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
38 #define item_is_equal(a,b) (item_is_equal_id(a,b) && (a).map == (b).map)
43 void (*item_coord_rewind)(void *priv_data);
44 int (*item_coord_get)(void *priv_data, struct coord *c, int count);
45 void (*item_attr_rewind)(void *priv_data);
46 int (*item_attr_get)(void *priv_data, enum attr_type attr_type, struct attr *attr);
47 int (*item_coord_is_segment)(void *priv_data);
55 struct item_methods *meth;
66 void item_coord_rewind(struct item *it);
67 int item_coord_get(struct item *it, struct coord *c, int count);
68 /* does the next returned coordinate mark a segment */
69 int item_coord_is_segment(struct item *it);
70 void item_attr_rewind(struct item *it);
71 int item_attr_get(struct item *it, enum attr_type attr_type, struct attr *attr);
72 struct item *item_new(char *type, int zoom);
73 enum item_type item_from_name(const char *name);
74 char *item_to_name(enum item_type item);
75 struct item_hash *item_hash_new(void);
76 void item_hash_insert(struct item_hash *h, struct item *item, void *val);
77 int item_hash_remove(struct item_hash *h, struct item *item);
78 void *item_hash_lookup(struct item_hash *h, struct item *item);
79 void item_hash_destroy(struct item_hash *h);
80 /* end of prototypes */