source: subversion/applications/utils/export/osm2pgsql/keyvals.h @ 22371

Last change on this file since 22371 was 22371, checked in by mazdermind, 8 years ago

add hstore-column option, which allows to create specific hstore columns for sub tags. '--hstore-column name:' will for example create a column "name:" with all the values of name:xx tags ind the form of xx=>Value for any name:xx tagged to an element. This changeset also includes changes to the regular hstore code by moving it to a separate function and also extending keyvals.c/h with an inline wrapper-function.

File size: 1.1 KB
1/* Common key-value list processing
2 *
3 * Used as a small general purpose store for
4 * tags, segment lists etc
5 *
6 */
8#ifndef KEYVAL_H
9#define KEYVAL_H
11struct keyval {
12    char *key;
13    char *value;
14    struct keyval *next;
15    struct keyval *prev;
18void initList(struct keyval *head);
19void freeItem(struct keyval *p);
20unsigned int countList(struct keyval *head);
21int listHasData(struct keyval *head);
22char *getItem(struct keyval *head, const char *name);
23struct keyval *firstItem(struct keyval *head);
24struct keyval *nextItem(struct keyval *head, struct keyval *item);
25struct keyval *popItem(struct keyval *head);
26void pushItem(struct keyval *head, struct keyval *item);
27int addItem(struct keyval *head, const char *name, const char *value, int noDupe);
28void resetList(struct keyval *head);
29struct keyval *getMatches(struct keyval *head, const char *name);
30void updateItem(struct keyval *head, const char *name, const char *value);
31void cloneList( struct keyval *target, struct keyval *source );
32inline void keyval2hstore(char *hstring, struct keyval *tags);
33void keyval2hstore_manual(char *hstring, char *key, char *value);
Note: See TracBrowser for help on using the repository browser.