X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=formats%2Fctf%2Fir%2Fevent-types.c;h=31cd2524d77570cc182dd030752fe00a3ac7feb6;hb=56db8d7a1b50e9e83684eaf448d483e5f94ff795;hp=74fa30473939440acf5266ce8353dabe7925827a;hpb=83509119a945fc77faff869daaf48627e1c4b3fa;p=babeltrace.git diff --git a/formats/ctf/ir/event-types.c b/formats/ctf/ir/event-types.c index 74fa3047..31cd2524 100644 --- a/formats/ctf/ir/event-types.c +++ b/formats/ctf/ir/event-types.c @@ -1906,6 +1906,46 @@ enum ctf_type_id bt_ctf_field_type_get_type_id( return type->declaration->id; } +int bt_ctf_field_type_is_integer(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_INTEGER; +} + +int bt_ctf_field_type_is_floating_point(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_FLOAT; +} + +int bt_ctf_field_type_is_enumeration(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_ENUM; +} + +int bt_ctf_field_type_is_string(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_STRING; +} + +int bt_ctf_field_type_is_structure(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_STRUCT; +} + +int bt_ctf_field_type_is_array(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_ARRAY; +} + +int bt_ctf_field_type_is_sequence(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_SEQUENCE; +} + +int bt_ctf_field_type_is_variant(struct bt_ctf_field_type *type) +{ + return bt_ctf_field_type_get_type_id(type) == CTF_TYPE_VARIANT; +} + void bt_ctf_field_type_get(struct bt_ctf_field_type *type) { bt_get(type);