ctf.fs: bt_ctf_notif_iter_create(): assert() that all medops exist
[babeltrace.git] / include / babeltrace / ctf-ir / field-types-internal.h
index d3a4b0c17edbbb302636e246296924b933a8ba2f..1b340b5b2ad9224935739f93e5a6b3c101b761c1 100644 (file)
@@ -31,6 +31,7 @@
 #include <babeltrace/ctf-writer/event-fields.h>
 #include <babeltrace/ctf-writer/writer.h>
 #include <babeltrace/ctf-ir/trace-internal.h>
+#include <babeltrace/ctf-ir/clock-class.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/object-internal.h>
 #include <babeltrace/types.h>
@@ -63,7 +64,7 @@ struct bt_ctf_field_type {
 struct bt_ctf_field_type_integer {
        struct bt_ctf_field_type parent;
        struct declaration_integer declaration;
-       struct bt_ctf_clock *mapped_clock;
+       struct bt_ctf_clock_class *mapped_clock;
 
        /*
         * This is what the user sets and is never modified by internal
@@ -92,6 +93,26 @@ struct bt_ctf_field_type_enumeration {
        struct bt_ctf_field_type *container;
        GPtrArray *entries; /* Array of ptrs to struct enumeration_mapping */
        struct declaration_enum declaration;
+       /* Only set during validation. */
+       bool has_overlapping_ranges;
+};
+
+enum bt_ctf_field_type_enumeration_mapping_iterator_type {
+       ITERATOR_BY_NAME,
+       ITERATOR_BY_SIGNED_VALUE,
+       ITERATOR_BY_UNSIGNED_VALUE,
+};
+
+struct bt_ctf_field_type_enumeration_mapping_iterator {
+       struct bt_object base;
+       struct bt_ctf_field_type_enumeration *enumeration_type;
+       enum bt_ctf_field_type_enumeration_mapping_iterator_type type;
+       int index;
+       union {
+               GQuark name_quark;
+               int64_t signed_value;
+               uint64_t unsigned_value;
+       } u;
 };
 
 struct bt_ctf_field_type_floating_point {
@@ -176,26 +197,11 @@ int bt_ctf_field_type_serialize(struct bt_ctf_field_type *type,
 BT_HIDDEN
 int bt_ctf_field_type_validate(struct bt_ctf_field_type *type);
 
-BT_HIDDEN
-const char *bt_ctf_field_type_enumeration_get_mapping_name_unsigned(
-               struct bt_ctf_field_type_enumeration *enumeration_type,
-               uint64_t value);
-
-BT_HIDDEN
-const char *bt_ctf_field_type_enumeration_get_mapping_name_signed(
-               struct bt_ctf_field_type_enumeration *enumeration_type,
-               int64_t value);
-
 /* Override field type's byte order only if it is set to "native" */
 BT_HIDDEN
 void bt_ctf_field_type_set_native_byte_order(
                struct bt_ctf_field_type *type, int byte_order);
 
-/* Deep copy a field type */
-BT_HIDDEN
-struct bt_ctf_field_type *bt_ctf_field_type_copy(
-               struct bt_ctf_field_type *type);
-
 BT_HIDDEN
 int bt_ctf_field_type_structure_get_field_name_index(
                struct bt_ctf_field_type *structure, const char *name);
This page took 0.040717 seconds and 4 git commands to generate.