X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fd1_attset.h;h=82f0531f13359d0fe82441547110cc761db9ab9e;hp=42bf4b47b9a54d4542290c96bc563e2226c67811;hb=cb182c3eb21ca4405d0c9f928ceb33f3fd2f95ba;hpb=2004bbd9b3bbce5eb8ecc49520255b3d0bf578b9 diff --git a/include/d1_attset.h b/include/d1_attset.h index 42bf4b4..82f0531 100644 --- a/include/d1_attset.h +++ b/include/d1_attset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1998, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -30,6 +30,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* * This structure describes a attset, perhaps made up by inclusion * (supersetting) of other attribute sets. When indexing and searching, @@ -41,26 +45,49 @@ struct data1_attset; -typedef struct data1_att +typedef struct data1_local_attribute +{ + int local; + struct data1_local_attribute *next; +} data1_local_attribute; + +typedef struct data1_attset data1_attset; +typedef struct data1_att data1_att; +typedef struct data1_attset_child data1_attset_child; + +struct data1_att { - struct data1_attset *parent; /* attribute set */ - char *name; /* symbolic name of this tag */ - int value; /* tag value */ - int local; /* local index value */ - struct data1_att *next; -} data1_att; + data1_attset *parent; /* attribute set */ + char *name; /* symbolic name of this attribute */ + int value; /* attribute value */ + data1_local_attribute *locals; /* local index values */ + data1_att *next; +}; -typedef struct data1_attset +struct data1_attset_child { + data1_attset *child; + data1_attset_child *next; +}; + +struct data1_attset { char *name; /* symbolic name */ oid_value reference; /* external ID of attset */ - int ordinal; /* attset identification in index */ data1_att *atts; /* attributes */ - struct data1_attset *children; /* included attset */ - struct data1_attset *next; /* sibling */ -} data1_attset; + data1_attset_child *children; /* included attset */ + data1_attset *next; /* next in cache */ +}; + +typedef struct data1_handle_info *data1_handle; + +YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, + char *name); +YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file); -data1_att *data1_getattbyname(data1_attset *s, char *name); -data1_attset *data1_read_attset(char *file); +YAZ_EXPORT data1_attset *data1_empty_attset(data1_handle dh); + +#ifdef __cplusplus +} +#endif #endif