X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=osm.h;h=cb6b24e9eb7fb139c6a4302b8cd4f3de67f65f37;hb=eadd63b657be979276b0f7bab89f76a632473ab4;hp=4eb90ef4b0a09738da628ad9342c49b1a7be0f0c;hpb=44b0ec8816c3cf1a5858fec0c51e075cedefc3eb;p=leo.git diff --git a/osm.h b/osm.h index 4eb90ef..cb6b24e 100644 --- a/osm.h +++ b/osm.h @@ -4,8 +4,8 @@ * (c) 2014 Martin Mares */ -#ifndef _BRUM_OSM_H -#define _BRUM_OSM_H +#ifndef _LEO_OSM_H +#define _LEO_OSM_H #include "dict.h" @@ -77,10 +77,18 @@ struct osm_mpg_boundary { clist nodes; // List of osm_ref's (without back-references, since the boundary is not a regular object) }; -void osm_init(void); -void osm_dump(void); +struct osm { + struct mempool *pool; + clist obj_list[OSM_TYPE_MAX]; + struct osm_id_hash_table *id_hash[OSM_TYPE_MAX]; + uint obj_cnt[OSM_TYPE_MAX]; +}; + +extern struct osm *osm_this; -extern clist osm_obj_list[OSM_TYPE_MAX]; +struct osm *osm_init(void); +void osm_dump(void); +void osm_stats(void); osm_id_t osm_parse_id(const char *str); struct osm_object *osm_obj_find_by_id(enum osm_object_type type, osm_id_t id); @@ -161,4 +169,8 @@ enum value_names { #undef P }; +/* xml.c */ + +void osm_xml_parse(const char *name); + #endif