2 * Hic Est Leo -- Fixed Objects
4 * (c) 2014 Martin Mares <mj@ucw.cz>
27 static clist fixed_objects;
29 static struct cf_section fixed_tag_cf = {
30 #define P(_x) PTR_TO(struct fixed_tag, _x)
31 CF_TYPE(struct fixed_object),
33 CF_STRING("Key", P(key)),
34 CF_STRING("Value", P(val)),
40 static struct cf_section fixed_object_cf = {
41 #define P(_x) PTR_TO(struct fixed_object, _x)
42 CF_TYPE(struct fixed_object),
46 CF_LIST("Tag", P(tags), &fixed_tag_cf),
52 static struct cf_section fixed_cf = {
54 CF_LIST("Object", &fixed_objects, &fixed_object_cf),
59 static void CONSTRUCTOR fixed_preinit(void)
61 cf_declare_section("FixedObjects", &fixed_cf, 0);
67 CLIST_FOR_EACH(struct fixed_object *, fo, fixed_objects)
69 struct osm_node *n = osm_node_new(id++);
72 CLIST_FOR_EACH(struct fixed_tag *, ft, fo->tags)
73 osm_obj_add_tag(&n->o, ft->key, ft->val);