#define GRAS_DATADESC_PRIVATE_H
#include "gras_private.h"
-#include "DataDesc/datadesc_interface.h"
+#include "gras/DataDesc/datadesc_interface.h"
/**
* aligned:
char *name;
long int offset[gras_arch_count];
- int code;
+ gras_datadesc_type_t *type;
gras_datadesc_type_cb_void_t pre;
gras_datadesc_type_cb_void_t post;
};
typedef struct s_gras_dd_cat_scalar {
enum e_gras_dd_scalar_encoding encoding;
+ gras_ddt_scalar_type_t type; /* to check easily that redefinition matches*/
} gras_dd_cat_scalar_t;
/**
* Specific fields of a reference
*/
typedef struct s_gras_dd_cat_ref {
- int code;
+ gras_datadesc_type_t *type;
/* callback used to return the referenced type number */
- gras_datadesc_type_cb_int_t selector;
+ gras_datadesc_selector_t selector;
} gras_dd_cat_ref_t;
* Specific fields of an array
*/
typedef struct s_gras_dd_cat_array {
- int code;
+ gras_datadesc_type_t *type;
/* element_count < 0 means dynamically defined */
long int fixed_size;
char *name;
unsigned int name_len;
- unsigned int refcounter;
-
/* payload */
long int size[gras_arch_count];
};
/***************************
- * Type creation functions *
+ * constructor/desctructor *
***************************/
+void gras_datadesc_free(gras_datadesc_type_t *type);
+
gras_error_t
gras_datadesc_scalar(const char *name,
gras_ddt_scalar_type_t type,