9 #define ITEM2(x,y) type_##y=x,
10 #define ITEM(x) type_##x,
18 #define item_is_equal_id(a,b) ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
19 #define item_is_equal(a,b) (item_is_equal_id(a,b) && (a).map == (b).map)
24 void (*item_coord_rewind)(void *priv_data);
25 int (*item_coord_get)(void *priv_data, struct coord *c, int count);
26 void (*item_attr_rewind)(void *priv_data);
27 int (*item_attr_get)(void *priv_data, enum attr_type attr_type, struct attr *attr);
28 int (*item_coord_is_segment)(void *priv_data);
36 struct item_methods *meth;
47 void item_coord_rewind(struct item *it);
48 int item_coord_get(struct item *it, struct coord *c, int count);
49 /* does the next returned coordinate mark a segment */
50 int item_coord_is_segment(struct item *it);
51 void item_attr_rewind(struct item *it);
52 int item_attr_get(struct item *it, enum attr_type attr_type, struct attr *attr);
53 struct item *item_new(char *type, int zoom);
54 enum item_type item_from_name(const char *name);
55 char *item_to_name(enum item_type item);
56 struct item_hash *item_hash_new(void);
57 void item_hash_insert(struct item_hash *h, struct item *item, void *val);
58 int item_hash_remove(struct item_hash *h, struct item *item);
59 void *item_hash_lookup(struct item_hash *h, struct item *item);
60 void item_hash_destroy(struct item_hash *h);
61 /* end of prototypes */