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

Last change on this file since 25689 was 25689, checked in by giggls, 9 years ago

Minor rework of hstore functionality:

  • Do not add a key to the hstore column if there is an exclusive column for this key by
  • Add an additional commandline switch to restore the original behaviour to add any key
  • remove the "z_order" special key from hstore in any case
File size: 1.2 KB
Line 
1/* Common key-value list processing
2 *
3 * Used as a small general purpose store for
4 * tags, segment lists etc
5 *
6 */
7
8#ifndef KEYVAL_H
9#define KEYVAL_H
10
11struct keyval {
12    char *key;
13    char *value;
14    struct keyval *next;
15    struct keyval *prev;
16};
17
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 *getTag(struct keyval *head, const char *name);
24void removeTag(struct keyval *tag);
25struct keyval *firstItem(struct keyval *head);
26struct keyval *nextItem(struct keyval *head, struct keyval *item);
27struct keyval *popItem(struct keyval *head);
28void pushItem(struct keyval *head, struct keyval *item);
29int addItem(struct keyval *head, const char *name, const char *value, int noDupe);
30void resetList(struct keyval *head);
31struct keyval *getMatches(struct keyval *head, const char *name);
32void updateItem(struct keyval *head, const char *name, const char *value);
33void cloneList( struct keyval *target, struct keyval *source );
34void keyval2hstore(char *hstring, struct keyval *tags);
35void keyval2hstore_manual(char *hstring, char *key, char *value);
36#endif
Note: See TracBrowser for help on using the repository browser.