2 * Hic Est Leo -- Fixed Objects
4 * (c) 2014 Martin Mares <mj@ucw.cz>
26 static clist fixed_objects;
28 static struct cf_section fixed_tag_cf = {
29 #define P(_x) PTR_TO(struct fixed_tag, _x)
30 CF_TYPE(struct fixed_object),
32 CF_STRING("Key", P(key)),
33 CF_STRING("Value", P(val)),
39 static struct cf_section fixed_object_cf = {
40 #define P(_x) PTR_TO(struct fixed_object, _x)
41 CF_TYPE(struct fixed_object),
45 CF_LIST("Tag", P(tags), &fixed_tag_cf),
51 static struct cf_section fixed_cf = {
53 CF_LIST("Object", &fixed_objects, &fixed_object_cf),
58 static void CONSTRUCTOR fixed_preinit(void)
60 cf_declare_section("FixedObjects", &fixed_cf, 0);
66 CLIST_FOR_EACH(struct fixed_object *, fo, fixed_objects)
68 struct osm_node *n = osm_node_new(id++);
71 CLIST_FOR_EACH(struct fixed_tag *, ft, fo->tags)
72 osm_obj_add_tag(&n->o, ft->key, ft->val);