X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fevent-types-internal.h;h=a8abef35ef6430c4d5ee42c9447094c7fddfd4f7;hb=09840de5d022697671dafe2bed427fa5c09b40b9;hp=ba979682e9a6f268fb3cefff021f357b40a7f383;hpb=7073124e5d99f6b6cf7d8cc31e99fb41efc987fe;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/event-types-internal.h b/include/babeltrace/ctf-ir/event-types-internal.h index ba979682..a8abef35 100644 --- a/include/babeltrace/ctf-ir/event-types-internal.h +++ b/include/babeltrace/ctf-ir/event-types-internal.h @@ -54,9 +54,12 @@ enum bt_ctf_node { struct bt_ctf_field_path { enum bt_ctf_node root; + /* * Array of integers (int) indicating the index in either - * structures or variants that make-up the path to a field. + * structures, variants, arrays, or sequences that make up + * the path to a field type. -1 means the "current element + * of an array or sequence type". */ GArray *path_indexes; }; @@ -278,4 +281,15 @@ BT_HIDDEN int bt_ctf_field_type_sequence_set_element_type(struct bt_ctf_field_type *array, struct bt_ctf_field_type *element_type); +BT_HIDDEN +int bt_ctf_field_type_get_field_count(struct bt_ctf_field_type *type); + +BT_HIDDEN +struct bt_ctf_field_type *bt_ctf_field_type_get_field_at_index( + struct bt_ctf_field_type *type, int index); + +BT_HIDDEN +int bt_ctf_field_type_get_field_index(struct bt_ctf_field_type *type, + const char *name); + #endif /* BABELTRACE_CTF_IR_EVENT_TYPES_INTERNAL_H */