X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Ffields-internal.h;h=f7d39d10b23b61e78e4de7f8f0683c8b65f80f16;hb=9be89173152f9f3b2f6c52321d6d60a6c6d2fba2;hp=a75120f3da2cde26f64956d46e5bd53a6e7215f3;hpb=918be0053a529d1e7f93981388a7672534eb5af8;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/fields-internal.h b/include/babeltrace/ctf-ir/fields-internal.h index a75120f3..f7d39d10 100644 --- a/include/babeltrace/ctf-ir/fields-internal.h +++ b/include/babeltrace/ctf-ir/fields-internal.h @@ -27,22 +27,30 @@ * SOFTWARE. */ +#include #include #include #include -#include +#include +#include +#include #include +struct bt_ctf_stream_pos; + struct bt_ctf_field { struct bt_object base; struct bt_ctf_field_type *type; - int payload_set; - int frozen; + bool payload_set; + bool frozen; }; struct bt_ctf_field_integer { struct bt_ctf_field parent; - struct definition_integer definition; + union { + int64_t signd; + uint64_t unsignd; + } payload; }; struct bt_ctf_field_enumeration { @@ -52,13 +60,11 @@ struct bt_ctf_field_enumeration { struct bt_ctf_field_floating_point { struct bt_ctf_field parent; - struct definition_float definition; - struct definition_integer sign, mantissa, exp; + double payload; }; struct bt_ctf_field_structure { struct bt_ctf_field parent; - GHashTable *field_name_to_index; GPtrArray *fields; /* Array of pointers to struct bt_ctf_field */ }; @@ -84,13 +90,6 @@ struct bt_ctf_field_string { GString *payload; }; -/* - * Set a field's value with an already allocated field instance. - */ -BT_HIDDEN -int bt_ctf_field_structure_set_field(struct bt_ctf_field *structure, - const char *name, struct bt_ctf_field *value); - /* Validate that the field's payload is set (returns 0 if set). */ BT_HIDDEN int bt_ctf_field_validate(struct bt_ctf_field *field); @@ -101,9 +100,13 @@ int bt_ctf_field_reset(struct bt_ctf_field *field); BT_HIDDEN int bt_ctf_field_serialize(struct bt_ctf_field *field, - struct ctf_stream_pos *pos); + struct bt_ctf_stream_pos *pos, + enum bt_ctf_byte_order native_byte_order); BT_HIDDEN void bt_ctf_field_freeze(struct bt_ctf_field *field); +BT_HIDDEN +bt_bool bt_ctf_field_is_set(struct bt_ctf_field *field); + #endif /* BABELTRACE_CTF_IR_FIELDS_INTERNAL_H */