fb6bbd6582df49326f9ceecfcca7f9c88a06d343
[rrq/rrqmisc.git] / vector / Tuple.h
1 #ifndef Tuple_H
2 #define Tuple_H
3
4 #include <ItemKeyFun.h>
5
6 typedef struct TupleSchema TupleSchema;
7
8 /**
9  * A Tuple is a "self typed" array of elements.
10  */
11 typedef struct {
12     TupleSchema *types;
13     void *elements[];
14 } Tuple;
15
16 /**
17  * \brief Create an untyped tuple with given values.
18  *
19  * \related Tuple
20  */
21 extern Tuple *Tuple_create(int arity,...);
22
23 /**
24  * \brief Create an untyped tuple with 0 values.
25  *
26  * \related Tuple
27  */
28 extern Tuple *Tuple_calloc(int arity);
29
30 /**
31  * \brief Create a tuple as a clone of a given tuple.
32  *
33  * \related Tuple
34  */
35 extern Tuple *Tuple_clone(int arity,Tuple *t);
36
37 #endif