Add an alias name attribute and accessor to CTF IR field type
[babeltrace.git] / include / babeltrace / ctf-ir / event-types-internal.h
index 5471228a6b05be601566f4349e7aca4193a88e0c..dd80bdceb89026560318236b3eaed7286800c9b3 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace/ctf-writer/ref-internal.h>
 #include <babeltrace/ctf-writer/event-fields.h>
 #include <babeltrace/ctf-writer/writer.h>
-#include <babeltrace/ctf-writer/writer-internal.h>
+#include <babeltrace/ctf-ir/trace-internal.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/types.h>
 #include <babeltrace/ctf/events.h>
@@ -44,6 +44,7 @@ typedef int(*type_serialize_func)(struct bt_ctf_field_type *,
 struct bt_ctf_field_type {
        struct bt_ctf_ref ref_count;
        struct bt_declaration *declaration;
+       GString *alias_name;
        type_freeze_func freeze;
        type_serialize_func serialize;
        /*
@@ -59,8 +60,15 @@ struct bt_ctf_field_type_integer {
 };
 
 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;
 };
 
@@ -123,25 +131,12 @@ BT_HIDDEN
 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);
-
-BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_array_get_element_type(
-               struct bt_ctf_field_type_array *array);
-
-BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_sequence_get_element_type(
-               struct bt_ctf_field_type_sequence *sequence);
+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_variant_get_field_type(
-               struct bt_ctf_field_type_variant *variant, int64_t tag_value);
+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
 int bt_ctf_field_type_serialize(struct bt_ctf_field_type *type,
This page took 0.023664 seconds and 4 git commands to generate.