return named_fc->fc;
}
+struct bt_field_class *
+bt_field_class_structure_member_borrow_field_class(
+ struct bt_field_class_structure_member *member)
+{
+ struct bt_named_field_class *named_fc = (void *) member;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(member, "Structure field class member");
+ return named_fc->fc;
+}
+
static
void destroy_option_field_class(struct bt_object *obj)
{
return opt_fc->content_fc;
}
+struct bt_field_class *bt_field_class_option_borrow_field_class(
+ struct bt_field_class *fc)
+{
+ struct bt_field_class_option *opt_fc = (void *) fc;
+
+ BT_ASSERT_PRE_NON_NULL(fc, "Field class");
+ BT_ASSERT_PRE_DEV_FC_HAS_ID(fc, BT_FIELD_CLASS_TYPE_OPTION,
+ "Field class");
+ return opt_fc->content_fc;
+}
+
const struct bt_field_path *
bt_field_class_option_borrow_selector_field_path_const(
const struct bt_field_class *fc)
return named_fc->fc;
}
+struct bt_field_class *
+bt_field_class_variant_option_borrow_field_class(
+ struct bt_field_class_variant_option *option)
+{
+ struct bt_named_field_class *named_fc = (void *) option;
+
+ BT_ASSERT_PRE_DEV_NON_NULL(option, "Variant field class option");
+ return named_fc->fc;
+}
+
const struct bt_integer_range_set_unsigned *
bt_field_class_variant_with_selector_unsigned_option_borrow_ranges_const(
const struct bt_field_class_variant_with_selector_unsigned_option *option)