X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=vector%2FTupleSchema.h;h=72fdc1e5bdc28a5059280c5576a1e042a7477202;hb=58de9483c458a25a691d648ce13b81227c327d03;hp=4f5a544bfd54fde656ab3180181e75cac44e8859;hpb=6fcd4ffc18696dbf4c11be32837a2035ea5ee92f;p=rrq%2Frrqmisc.git diff --git a/vector/TupleSchema.h b/vector/TupleSchema.h index 4f5a544..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 @@ -61,11 +50,11 @@ extern TupleSchema *TupleSchema_create(int arity,tuple *columns); extern TupleSchema *TupleSchema_mask(TupleSchema *schema,...); /** - * \brief Return 1/0 to indicate whether the query matches the item. + * \brief Return 1/0 to indicate whether the Query matches the item. * * \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".