@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_integer(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_integer(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) ==
+ BT_FIELD_TYPE_ID_INTEGER;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @floatft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_floating_point(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_floating_point(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) == BT_FIELD_TYPE_ID_FLOAT;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @enumft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_enumeration(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_enumeration(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) == BT_FIELD_TYPE_ID_ENUM;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @stringft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_string(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_string(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) == BT_FIELD_TYPE_ID_STRING;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @structft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_structure(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_structure(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) == BT_FIELD_TYPE_ID_STRUCT;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @arrayft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_array(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_array(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) == BT_FIELD_TYPE_ID_ARRAY;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @seqft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_sequence(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_sequence(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) ==
+ BT_FIELD_TYPE_ID_SEQUENCE;
+}
/**
@brief Returns whether or not the @ft \p field_type is a @varft.
@sa bt_field_type_get_type_id(): Returns the type ID of a given
field type.
*/
-extern bt_bool bt_field_type_is_variant(
- struct bt_field_type *field_type);
+static inline
+bt_bool bt_field_type_is_variant(struct bt_field_type *field_type)
+{
+ return bt_field_type_get_type_id(field_type) ==
+ BT_FIELD_TYPE_ID_VARIANT;
+}
/** @} */