ir: add field type ID helpers
[babeltrace.git] / include / babeltrace / ctf-ir / event-types.h
index d777ce6b40603c23ff438ea28ec38e45fd561c2b..059a5b84b821a3a1a3faa5ec34475d2a5da137a1 100644 (file)
@@ -751,6 +751,86 @@ extern int bt_ctf_field_type_set_byte_order(struct bt_ctf_field_type *type,
 extern enum ctf_type_id bt_ctf_field_type_get_type_id(
                struct bt_ctf_field_type *type);
 
+/*
+ * bt_ctf_field_type_is_integer: returns whether or not a given field
+ *     type is an integer type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is an integer type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_integer(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_floating_point: returns whether or not a given field
+ *     type is a floating point number type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is a floating point number type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_floating_point(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_enumeration: returns whether or not a given field
+ *     type is an enumeration type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is an enumeration type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_enumeration(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_string: returns whether or not a given field
+ *     type is a string type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is a string type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_string(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_structure: returns whether or not a given field
+ *     type is a structure type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is a structure type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_structure(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_array: returns whether or not a given field
+ *     type is an array type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is an array type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_array(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_sequence: returns whether or not a given field
+ *     type is a sequence type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is a sequence type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_sequence(struct bt_ctf_field_type *type);
+
+/*
+ * bt_ctf_field_type_is_variant: returns whether or not a given field
+ *     type is a variant type.
+ *
+ * @param type Field type.
+ *
+ * Returns 1 if the field type is a variant type, 0 otherwise.
+ */
+extern int bt_ctf_field_type_is_variant(struct bt_ctf_field_type *type);
+
 /*
  * bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement
  * the field type's reference count.
This page took 0.023887 seconds and 4 git commands to generate.