#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>
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
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 {
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);