/*
* BabelTrace - CTF IR: Event types internal
*
- * Copyright 2013 EfficiOS Inc.
+ * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
* Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*
};
struct enumeration_mapping {
- int64_t range_start;
- int64_t range_end;
+ union {
+ uint64_t _unsigned;
+ int64_t _signed;
+ } range_start;
+
+ union {
+ uint64_t _unsigned;
+ int64_t _signed;
+ } range_end;
GQuark string;
};
void bt_ctf_field_type_freeze(struct bt_ctf_field_type *type);
BT_HIDDEN
-enum ctf_type_id bt_ctf_field_type_get_type_id(
- struct bt_ctf_field_type *type);
-
-BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_structure_get_type(
- struct bt_ctf_field_type_structure *structure,
- const char *name);
+struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_signed(
+ struct bt_ctf_field_type_variant *variant, int64_t tag_value);
BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_array_get_element_type(
- struct bt_ctf_field_type_array *array);
+struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type_unsigned(
+ struct bt_ctf_field_type_variant *variant, uint64_t tag_value);
BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_sequence_get_element_type(
- struct bt_ctf_field_type_sequence *sequence);
+int bt_ctf_field_type_serialize(struct bt_ctf_field_type *type,
+ struct metadata_context *context);
BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_variant_get_field_type(
- struct bt_ctf_field_type_variant *variant, int64_t tag_value);
+int bt_ctf_field_type_validate(struct bt_ctf_field_type *type);
BT_HIDDEN
-int bt_ctf_field_type_serialize(struct bt_ctf_field_type *type,
- struct metadata_context *context);
+const char *bt_ctf_field_type_enumeration_get_mapping_name_unsigned(
+ struct bt_ctf_field_type_enumeration *enumeration_type,
+ uint64_t value);
BT_HIDDEN
-int bt_ctf_field_type_validate(struct bt_ctf_field_type *type);
+const char *bt_ctf_field_type_enumeration_get_mapping_name_signed(
+ struct bt_ctf_field_type_enumeration *enumeration_type,
+ int64_t value);
#endif /* BABELTRACE_CTF_IR_EVENT_TYPES_INTERNAL_H */