Handle negative time and offset from Epoch
[babeltrace.git] / include / babeltrace / ctf-ir / event-types.h
index 2006943536491b25e9f1b8731ade15e70328b2fe..059a5b84b821a3a1a3faa5ec34475d2a5da137a1 100644 (file)
@@ -697,7 +697,8 @@ extern int bt_ctf_field_type_string_set_encoding(
  *
  * @param type Field type.
  *
- * Returns the field type's alignment on success, a negative value on error.
+ * Returns the field type's alignment on success, a negative value on error and
+ * 0 if the alignment is undefined (as in the case of a variant).
  */
 extern int bt_ctf_field_type_get_alignment(struct bt_ctf_field_type *type);
 
@@ -750,10 +751,92 @@ 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.
  *
+ * You may also use bt_ctf_get() and bt_ctf_put() with field type objects.
+ *
  * These functions ensure that the field type won't be destroyed while it
  * is in use. The same number of get and put (plus one extra put to
  * release the initial reference done at creation) have to be done to
This page took 0.023893 seconds and 4 git commands to generate.