X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=vector%2FTupleSchema.h;h=72fdc1e5bdc28a5059280c5576a1e042a7477202;hb=4e5a12ca4bfd6541fac14c1b0fa0d6e12168ce88;hp=0549284e2fe91d31af7d4d1db8f43187f2af1fbf;hpb=e938f8c45fd191d96da48f65262e4efcfada7805;p=rrq%2Frrqmisc.git diff --git a/vector/TupleSchema.h b/vector/TupleSchema.h index 0549284..72fdc1e 100644 --- a/vector/TupleSchema.h +++ b/vector/TupleSchema.h @@ -1,12 +1,7 @@ #ifndef tupleitem_H #define tupleitem_H -#include - -/** - * A tuple is an array of void* - */ -typedef void *tuple[]; +#include /** * A TupleSchema record declares the ItemKeyFun functions for tuple @@ -16,7 +11,7 @@ typedef void *tuple[]; * * \extends ItemKeyFun */ -typedef struct { +typedef struct TupleSchema { /** * These are the ItemKeyFun callback functions to support * HashVector use for tuple items. The functions expects their @@ -31,10 +26,11 @@ typedef struct { int arity; /** - * This points to an array of pointers to the tuple item domains - * as represented by their associated ItemKeyFun records. + * This points to tuple whose elements is array of pointers to the + * tuple item domains as represented by their associated + * ItemKeyFun records. */ - ItemKeyFun **columns; + Tuple *columns; } TupleSchema; /** @@ -42,14 +38,7 @@ typedef struct { * * \related TupleSchema */ -extern tuple *tuple_create(int arity,...); - -/** - * Create a tuples with given values. - * - * \related TupleSchema - */ -extern TupleSchema *TupleSchema_create(int arity,tuple *columns); +extern TupleSchema *TupleSchema_create(int arity,Tuple *columns); /** * Copy the given TupleSchema into a new TupleSchema with some columns @@ -65,7 +54,7 @@ extern TupleSchema *TupleSchema_mask(TupleSchema *schema,...); * * \related TupleSchema */ -extern int TupleSchema_match(TupleSchema *def,tuple *Query,tuple *item); +extern int TupleSchema_match(TupleSchema *def,Tuple *query,Tuple *item); /** * \brief Generic macro to determine the number of expressions in a @@ -83,7 +72,7 @@ extern int TupleSchema_match(TupleSchema *def,tuple *Query,tuple *item); * * \related TupleSchema */ -#define TUPLE(...) tuple_create( NUMARGS(__VA_ARGS__), __VA_ARGS__ ) +#define TUPLE(...) Tuple_create( NUMARGS(__VA_ARGS__), __VA_ARGS__ ) /** * \brief Create a \ref TupleSchema with the given column "types".