X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/91a9c7db94f2c7c5706ff63c6098599399080aa1..60f31f9d24bd348ccad2ea99ba96424360b11a92:/include/gras/datadesc.h diff --git a/include/gras/datadesc.h b/include/gras/datadesc.h index e2827dfca2..111ea93d08 100644 --- a/include/gras/datadesc.h +++ b/include/gras/datadesc.h @@ -50,6 +50,7 @@ typedef struct s_gras_cbps gras_cbps_t; /* callbacks prototypes */ typedef void (*gras_datadesc_type_cb_void_t)(gras_cbps_t *vars, void *data); typedef int (*gras_datadesc_type_cb_int_t)(gras_cbps_t *vars, void *data); +typedef gras_datadesc_type_t *(*gras_datadesc_selector_t)(gras_cbps_t *vars, void *data); /*********************************************** **** Search and retrieve declared datatype **** @@ -62,44 +63,44 @@ gras_datadesc_type_t *gras_datadesc_by_name(const char *name); gras_error_t gras_datadesc_struct(const char *name, - gras_datadesc_type_t **dst); + gras_datadesc_type_t **dst); gras_error_t gras_datadesc_struct_append(gras_datadesc_type_t *struct_type, - const char *name, - gras_datadesc_type_t *field_type); + const char *name, + gras_datadesc_type_t *field_type); void gras_datadesc_struct_close(gras_datadesc_type_t *struct_type); gras_error_t gras_datadesc_union(const char *name, - gras_datadesc_type_cb_int_t selector, - gras_datadesc_type_t **dst); + gras_datadesc_type_cb_int_t selector, + gras_datadesc_type_t **dst); gras_error_t gras_datadesc_union_append(gras_datadesc_type_t *union_type, - const char *name, - gras_datadesc_type_t *field_type); + const char *name, + gras_datadesc_type_t *field_type); void gras_datadesc_union_close(gras_datadesc_type_t *union_type); gras_error_t gras_datadesc_ref(const char *name, - gras_datadesc_type_t *referenced_type, - gras_datadesc_type_t **dst); + gras_datadesc_type_t *referenced_type, + gras_datadesc_type_t **dst); gras_error_t -gras_datadesc_ref_generic(const char *name, - gras_datadesc_type_cb_int_t discriminant, - gras_datadesc_type_t **dst); +gras_datadesc_ref_generic(const char *name, + gras_datadesc_selector_t selector, + gras_datadesc_type_t **dst); gras_error_t gras_datadesc_array_fixed(const char *name, - gras_datadesc_type_t *element_type, - long int fixed_size, - gras_datadesc_type_t **dst); + gras_datadesc_type_t *element_type, + long int fixed_size, + gras_datadesc_type_t **dst); gras_error_t gras_datadesc_array_dyn(const char *name, - gras_datadesc_type_t *element_type, - gras_datadesc_type_cb_int_t dynamic_size, - gras_datadesc_type_t **dst); + gras_datadesc_type_t *element_type, + gras_datadesc_type_cb_int_t dynamic_size, + gras_datadesc_type_t **dst); gras_error_t gras_datadesc_ref_pop_arr(gras_datadesc_type_t *element_type, - gras_datadesc_type_t **dst); + gras_datadesc_type_t **dst); /********************************* * Change stuff within datadescs *