+/**
+@brief Returns the alignment of the CTF IR fields described by
+ the CTF IR field type \p field_type.
+
+@param[in] field_type Field type which describes the
+ fields of which to get the alignment.
+@returns Alignment of the fields described by
+ \p field_type, or a negative value on error.
+
+@prenotnull{field_type}
+@postrefcountsame{field_type}
+
+@sa bt_ctf_field_type_set_alignment(): Sets the alignment
+ of the fields described by a given field type.
+*/
+extern int bt_ctf_field_type_get_alignment(
+ struct bt_ctf_field_type *field_type);
+
+/**
+@brief Sets the alignment of the CTF IR fields described by the
+ CTF IR field type \p field_type to \p alignment.
+
+\p alignment \em must be greater than 0 and a power of two.
+
+@param[in] field_type Field type which describes the fields of
+ which to set the alignment.
+@param[in] alignment Alignment of the fields described by
+ \p field_type.
+@returns 0 on success, or a negative value on error.
+
+@prenotnull{field_type}
+@prehot{field_type}
+@pre \p alignment is greater than 0 and a power of two.
+@postrefcountsame{field_type}
+
+@sa bt_ctf_field_type_get_alignment(): Returns the alignment of the
+ fields described by a given field type.
+*/
+extern int bt_ctf_field_type_set_alignment(struct bt_ctf_field_type *field_type,
+ unsigned int alignment);
+
+/**
+@brief Returns the byte order of the CTF IR fields described by
+ the CTF IR field type \p field_type.
+
+You can only call this function if \p field_type is a
+\link ctfirintfieldtype CTF IR integer field type\endlink,
+a \link ctfirfloatfieldtype CTF IR floating point number field type\endlink,
+or a \link ctfirenumfieldtype CTF IR enumeration field type\endlink.
+
+@param[in] field_type Field type which describes the
+ fields of which to get the byte order.
+@returns Byte order of the fields described by
+ \p field_type, or #BT_CTF_BYTE_ORDER_UNKNOWN on
+ error.
+
+@prenotnull{field_type}
+@pre \p field_type is an integer field type, a floating point number
+ field type, or an enumeration field type.
+@postrefcountsame{field_type}
+
+@sa bt_ctf_field_type_set_byte_order(): Sets the byte order
+ of the fields described by a given field type.
+*/
+extern enum bt_ctf_byte_order bt_ctf_field_type_get_byte_order(
+ struct bt_ctf_field_type *field_type);
+
+/**
+@brief Sets the byte order of the CTF IR fields described by the
+ CTF IR field type \p field_type to \p byte_order.
+
+If \p field_type is a compound field type, this function also
+recursively sets the byte order of its children to \p byte_order.
+
+@param[in] field_type Field type which describes the fields of
+ which to set the byte order.
+@param[in] byte_order Alignment of the fields described by
+ \p field_type.
+@returns 0 on success, or a negative value on error.
+
+@prenotnull{field_type}
+@prehot{field_type}
+@pre \p byte_order is #BT_CTF_BYTE_ORDER_NATIVE,
+ #BT_CTF_BYTE_ORDER_LITTLE_ENDIAN, #BT_CTF_BYTE_ORDER_BIG_ENDIAN,
+ or #BT_CTF_BYTE_ORDER_NETWORK.
+@postrefcountsame{field_type}F
+
+@sa bt_ctf_field_type_get_byte_order(): Returns the byte order of the
+ fields described by a given field type.
+*/
+extern int bt_ctf_field_type_set_byte_order(
+ struct bt_ctf_field_type *field_type,
+ enum bt_ctf_byte_order byte_order);
+
+/** @} */
+
+/**
+@name Utility functions
+@{
+*/
+
+/**
+@brief Returns whether or not the CTF IR field type \p field_type_a
+ is equivalent to the field type \p field_type_b.
+
+You \em must use this function to compare two field types: it is not
+safe to compare two pointer values directly, because, for internal
+reasons, some parts of the Babeltrace system can copy user field types
+and discard the original ones.
+
+@param[in] field_type_a Field type to compare to \p field_type_b.
+@param[in] field_type_b Field type to compare to \p field_type_a.
+@returns 0 if \p field_type_a is equivalent to
+ \p field_type_b, 1 if they are not equivalent,
+ or a negative value on error.
+
+@prenotnull{field_type_a}
+@prenotnull{field_type_b}
+@postrefcountsame{field_type_a}
+@postrefcountsame{field_type_b}
+*/
+extern int bt_ctf_field_type_compare(struct bt_ctf_field_type *field_type_a,
+ struct bt_ctf_field_type *field_type_b);
+
+/**
+@brief Creates a \em deep copy of the CTF IR field type \p field_type.
+
+You can copy a frozen field type: the resulting copy is
+<em>not frozen</em>.
+
+This function resets the tag field type of the copied
+\link ctfirvarfieldtype CTF IR variant field types\endlink. The
+automatic field resolving which some functions of the API perform
+can set it again when the returned field type is used (learn more
+in the detailed description of this module).
+
+@param[in] field_type Field type to copy.
+@returns Deep copy of \p field_type on success,
+ or \c NULL on error.
+
+@prenotnull{field_type}
+@postrefcountsame{field_type}
+@postsuccessrefcountret1
+*/
+extern struct bt_ctf_field_type *bt_ctf_field_type_copy(
+ struct bt_ctf_field_type *field_type);
+
+/** @} */
+
+/** @} */
+
+/**
+@defgroup ctfirintfieldtype CTF IR integer field type
+@ingroup ctfirfieldtypes
+@brief CTF IR integer field type.
+
+@code
+#include <babeltrace/ctf-ir/field-types.h>
+@endcode
+
+A CTF IR <strong><em>integer field type</em></strong> is a field type that
+you can use to create concrete
+\link ctfirintfield CTF IR integer fields\endlink.
+
+You can create an integer field type
+with bt_ctf_field_type_integer_create().
+
+An integer field type has the following properties:
+
+<table>
+ <tr>
+ <th>Property
+ <th>Value at creation
+ <th>Getter
+ <th>Setter
+ </tr>
+ <tr>
+ <td>\b Alignment (bits) of the described integer fields
+ <td>1
+ <td>bt_ctf_field_type_get_alignment()
+ <td>bt_ctf_field_type_set_alignment()
+ </tr>
+ <tr>
+ <td><strong>Byte order</strong> of the described integer fields
+ <td>#BT_CTF_BYTE_ORDER_NATIVE
+ <td>bt_ctf_field_type_get_byte_order()
+ <td>bt_ctf_field_type_set_byte_order()
+ </tr>
+ <tr>
+ <td><strong>Storage size</strong> (bits) of the described
+ integer fields
+ <td>Specified at creation
+ <td>bt_ctf_field_type_integer_get_size()
+ <td>None: specified at creation (bt_ctf_field_type_integer_create())
+ </tr>
+ <tr>
+ <td><strong>Signedness</strong> of the described integer fields
+ <td>Unsigned
+ <td>bt_ctf_field_type_integer_get_signed()
+ <td>bt_ctf_field_type_integer_set_signed()
+ </tr>
+ <tr>
+ <td><strong>Preferred display base</strong> of the described
+ integer fields
+ <td>#BT_CTF_INTEGER_BASE_DECIMAL
+ <td>bt_ctf_field_type_integer_get_base()
+ <td>bt_ctf_field_type_integer_set_base()
+ </tr>
+ <tr>
+ <td>\b Encoding of the described integer fields
+ <td>#BT_CTF_STRING_ENCODING_NONE
+ <td>bt_ctf_field_type_integer_get_encoding()
+ <td>bt_ctf_field_type_integer_set_encoding()
+ </tr>
+ <tr>
+ <td><strong>Mapped
+ \link ctfirclockclass CTF IR clock class\endlink</strong>
+ <td>None
+ <td>bt_ctf_field_type_integer_get_mapped_clock()
+ <td>bt_ctf_field_type_integer_set_mapped_clock()
+ </tr>
+</table>
+
+@sa ctfirintfield
+@sa ctfirfieldtypes
+
+@addtogroup ctfirintfieldtype
+@{
+*/
+
+/**
+@brief Preferred display base (radix) of a
+ \link ctfirintfieldtype CTF IR integer field type\endlink.
+*/
+enum bt_ctf_integer_base {
+ /// Unknown, used for errors.
+ BT_CTF_INTEGER_BASE_UNKNOWN = -1,
+
+ /// Binary.
+ BT_CTF_INTEGER_BASE_BINARY = 2,
+
+ /// Octal.
+ BT_CTF_INTEGER_BASE_OCTAL = 8,
+
+ /// Decimal.
+ BT_CTF_INTEGER_BASE_DECIMAL = 10,
+
+ /// Hexadecimal.
+ BT_CTF_INTEGER_BASE_HEXADECIMAL = 16,