projects
/
rrq
/
rrqmisc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup Tuple to allow self-typing.
[rrq/rrqmisc.git]
/
vector
/
TupleSchema.h
diff --git
a/vector/TupleSchema.h
b/vector/TupleSchema.h
index 4f5a544bfd54fde656ab3180181e75cac44e8859..72fdc1e5bdc28a5059280c5576a1e042a7477202 100644
(file)
--- a/
vector/TupleSchema.h
+++ b/
vector/TupleSchema.h
@@
-1,12
+1,7
@@
#ifndef tupleitem_H
#define tupleitem_H
#ifndef tupleitem_H
#define tupleitem_H
-#include <ItemKeyFun.h>
-
-/**
- * A tuple is an array of void*
- */
-typedef void *tuple[];
+#include <Tuple.h>
/**
* A TupleSchema record declares the ItemKeyFun functions for tuple
/**
* A TupleSchema record declares the ItemKeyFun functions for tuple
@@
-16,7
+11,7
@@
typedef void *tuple[];
*
* \extends ItemKeyFun
*/
*
* \extends ItemKeyFun
*/
-typedef struct {
+typedef struct
TupleSchema
{
/**
* These are the ItemKeyFun callback functions to support
* HashVector use for tuple items. The functions expects their
/**
* 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;
/**
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;
/**
} TupleSchema;
/**
@@
-42,14
+38,7
@@
typedef struct {
*
* \related TupleSchema
*/
*
* \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
/**
* 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,...);
/**
extern TupleSchema *TupleSchema_mask(TupleSchema *schema,...);
/**
- * \brief Return 1/0 to indicate whether the
q
uery matches the item.
+ * \brief Return 1/0 to indicate whether the
Q
uery matches the item.
*
* \related TupleSchema
*/
*
* \related TupleSchema
*/
-extern int TupleSchema_match(TupleSchema *def,
tuple *query,t
uple *item);
+extern int TupleSchema_match(TupleSchema *def,
Tuple *query,T
uple *item);
/**
* \brief Generic macro to determine the number of expressions in a
/**
* \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
*/
*
* \related TupleSchema
*/
-#define TUPLE(...)
t
uple_create( NUMARGS(__VA_ARGS__), __VA_ARGS__ )
+#define TUPLE(...)
T
uple_create( NUMARGS(__VA_ARGS__), __VA_ARGS__ )
/**
* \brief Create a \ref TupleSchema with the given column "types".
/**
* \brief Create a \ref TupleSchema with the given column "types".