+#define BT_ASSERT_PRE_FT_IS_INT(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_ENUMERATION, \
+ _name " is not an integer field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_UNSIGNED_INT(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_INTEGER || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION, \
+ _name " is not an unsigned integer field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_ENUM(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_UNSIGNED_ENUMERATION || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_SIGNED_ENUMERATION, \
+ _name " is not an enumeration field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_IS_ARRAY(_ft, _name) \
+ BT_ASSERT_PRE( \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_STATIC_ARRAY || \
+ ((struct bt_field_type *) (_ft))->id == BT_FIELD_TYPE_ID_DYNAMIC_ARRAY, \
+ _name " is not an array field type: %![ft-]+F", (_ft))
+
+#define BT_ASSERT_PRE_FT_HAS_ID(_ft, _id, _name) \
+ BT_ASSERT_PRE(((struct bt_field_type *) (_ft))->id == (_id), \
+ _name " has the wrong ID: expected-id=%s, " \
+ "%![ft-]+F", bt_common_field_type_id_string(_id), (_ft))
+
+#define BT_ASSERT_PRE_FT_HOT(_ft, _name) \
+ BT_ASSERT_PRE_HOT((struct bt_field_type *) (_ft), \
+ (_name), ": %!+F", (_ft))
+
+#define BT_FIELD_TYPE_NAMED_FT_AT_INDEX(_ft, _index) \
+ (&g_array_index(((struct bt_field_type_named_field_types_container *) (_ft))->named_fts, \
+ struct bt_named_field_type, (_index)))
+
+#define BT_FIELD_TYPE_ENUM_MAPPING_AT_INDEX(_ft, _index) \
+ (&g_array_index(((struct bt_field_type_enumeration *) (_ft))->mappings, \
+ struct bt_field_type_enumeration_mapping, (_index)))
+
+#define BT_FIELD_TYPE_ENUM_MAPPING_RANGE_AT_INDEX(_mapping, _index) \
+ (&g_array_index((_mapping)->ranges, \
+ struct bt_field_type_enumeration_mapping_range, (_index)))
+
+struct bt_field;
+struct bt_field_type;
+
+struct bt_field_type {