Babeltrace 2 C API  2.1.1
Open-source trace manipulation framework
field-class.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5  */
6 
7 #ifndef BABELTRACE2_TRACE_IR_FIELD_CLASS_H
8 #define BABELTRACE2_TRACE_IR_FIELD_CLASS_H
9 
10 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11 
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
14 #endif
15 
16 #include <stdint.h>
17 #include <stddef.h>
18 
19 #include <babeltrace2/types.h>
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
1633 typedef enum bt_field_class_type {
1639 
1645 
1654 
1662 
1670 
1681 
1690 
1699 
1708 
1716 
1724 
1730 
1741 
1751 
1764 
1775 
1786 
1792 
1801 
1809 
1820 
1829 
1838 
1847 
1853 
1864 
1873 
1885 
1894 
1903 
1912 
1918 
1930 
1942 
1951 
1960 
1961  /*
1962  * Make sure the enumeration type is a 64-bit integer in case
1963  * the project needs field class types in the future.
1964  *
1965  * This isn't part of the API.
1966  */
1967  __BT_FIELD_CLASS_TYPE_BIG_VALUE = 1ULL << 62,
1969 
1987  const bt_field_class *field_class) __BT_NOEXCEPT;
1988 
2014 static inline
2016  const bt_field_class_type other_type) __BT_NOEXCEPT
2017 {
2018  return (type & other_type) == other_type;
2019 }
2020 
2057  bt_field_class *field_class,
2058  const bt_value *user_attributes) __BT_NOEXCEPT;
2059 
2085  bt_field_class *field_class) __BT_NOEXCEPT;
2086 
2095  const bt_field_class *field_class) __BT_NOEXCEPT;
2096 
2124 extern uint64_t bt_field_class_get_graph_mip_version(
2125  const bt_field_class *field_class) __BT_NOEXCEPT;
2126 
2159  bt_trace_class *trace_class) __BT_NOEXCEPT;
2160 
2210  bt_trace_class *trace_class, uint64_t length) __BT_NOEXCEPT;
2211 
2227 extern uint64_t bt_field_class_bit_array_get_length(
2228  const bt_field_class *field_class) __BT_NOEXCEPT;
2229 
2242 
2248 
2250 
2292  bt_field_class *field_class, const char *label,
2293  const bt_integer_range_set_unsigned *index_ranges) __BT_NOEXCEPT;
2294 
2316  const bt_field_class *field_class) __BT_NOEXCEPT;
2317 
2354 extern const bt_field_class_bit_array_flag *
2356  const bt_field_class *field_class, uint64_t index) __BT_NOEXCEPT;
2357 
2391 extern const bt_field_class_bit_array_flag *
2393  const bt_field_class *field_class, const char *label) __BT_NOEXCEPT;
2394 
2403 typedef char const * const *bt_field_class_bit_array_flag_label_array;
2404 
2418 
2425 
2484  const bt_field_class *field_class, uint64_t value_as_integer,
2485  bt_field_class_bit_array_flag_label_array *labels,
2486  uint64_t *count) __BT_NOEXCEPT;
2487 
2508 extern const char *bt_field_class_bit_array_flag_get_label(
2509  const bt_field_class_bit_array_flag *flag) __BT_NOEXCEPT;
2510 
2528 extern const bt_integer_range_set_unsigned *
2530  const bt_field_class_bit_array_flag *flag) __BT_NOEXCEPT;
2531 
2574  bt_field_class *field_class, uint64_t n) __BT_NOEXCEPT;
2575 
2605  const bt_field_class *field_class) __BT_NOEXCEPT;
2606 
2620 
2652  uint64_t hints) __BT_NOEXCEPT;
2653 
2681  const bt_field_class *field_class) __BT_NOEXCEPT;
2682 
2714 static inline
2716  const bt_field_class * const field_class,
2718  __BT_NOEXCEPT
2719 {
2720  return (bt_field_class_integer_get_field_value_hints(field_class) & (uint64_t) hint) ?
2721  BT_TRUE : BT_FALSE;
2722 }
2723 
2734 
2740 
2746 
2753 
2775  bt_field_class *field_class,
2776  bt_field_class_integer_preferred_display_base preferred_display_base)
2777  __BT_NOEXCEPT;
2778 
2806  const bt_field_class *field_class) __BT_NOEXCEPT;
2807 
2852  bt_trace_class *trace_class) __BT_NOEXCEPT;
2853 
2898  bt_trace_class *trace_class) __BT_NOEXCEPT;
2899 
2935  bt_trace_class *trace_class) __BT_NOEXCEPT;
2936 
2972  bt_trace_class *trace_class) __BT_NOEXCEPT;
2973 
2989 
3003 
3010 
3022 
3029 
3062  const bt_field_class *field_class) __BT_NOEXCEPT;
3063 
3083  const bt_field_class_enumeration_mapping *mapping)
3084  __BT_NOEXCEPT;
3085 
3135  bt_trace_class *trace_class) __BT_NOEXCEPT;
3136 
3170  bt_field_class *field_class, const char *label,
3171  const bt_integer_range_set_unsigned *ranges) __BT_NOEXCEPT;
3172 
3208  const bt_field_class *field_class, uint64_t index)
3209  __BT_NOEXCEPT;
3210 
3243  const bt_field_class *field_class, const char *label)
3244  __BT_NOEXCEPT;
3245 
3295  const bt_field_class *field_class, uint64_t value,
3296  bt_field_class_enumeration_mapping_label_array *labels,
3297  uint64_t *count) __BT_NOEXCEPT;
3298 
3329 extern const bt_integer_range_set_unsigned *
3332  __BT_NOEXCEPT;
3333 
3352 static inline
3356  __BT_NOEXCEPT
3357 {
3358  return __BT_UPCAST_CONST(bt_field_class_enumeration_mapping, mapping);
3359 }
3360 
3410  bt_trace_class *trace_class) __BT_NOEXCEPT;
3411 
3445  bt_field_class *field_class, const char *label,
3446  const bt_integer_range_set_signed *ranges) __BT_NOEXCEPT;
3447 
3483  const bt_field_class *field_class, uint64_t index)
3484  __BT_NOEXCEPT;
3485 
3518  const bt_field_class *field_class, const char *label)
3519  __BT_NOEXCEPT;
3520 
3570  const bt_field_class *field_class, int64_t value,
3571  bt_field_class_enumeration_mapping_label_array *labels,
3572  uint64_t *count) __BT_NOEXCEPT;
3573 
3604 extern const bt_integer_range_set_signed *
3607  __BT_NOEXCEPT;
3608 
3627 static inline
3631  __BT_NOEXCEPT
3632 {
3633  return __BT_UPCAST_CONST(bt_field_class_enumeration_mapping, mapping);
3634 }
3635 
3668  bt_trace_class *trace_class) __BT_NOEXCEPT;
3669 
3720  bt_trace_class *trace_class, uint64_t length) __BT_NOEXCEPT;
3721 
3761 extern bt_field_class *
3763  bt_trace_class *trace_class) __BT_NOEXCEPT;
3764 
3812 extern bt_field_class *
3814  bt_trace_class *trace_class,
3815  const bt_field_location *length_field_location) __BT_NOEXCEPT;
3816 
3837  const bt_field_class *field_class) __BT_NOEXCEPT;
3838 
3860 extern const bt_field_location *
3862  const bt_field_class *field_class) __BT_NOEXCEPT;
3863 
3876 
3883 
3914  const char *media_type) __BT_NOEXCEPT;
3915 
3945 extern const char *bt_field_class_blob_get_media_type(
3946  const bt_field_class *field_class) __BT_NOEXCEPT;
3947 
3976  bt_field_class *field_class) __BT_NOEXCEPT;
3977 
3985 extern const bt_field_class *
3987  const bt_field_class *field_class) __BT_NOEXCEPT;
3988 
4038  bt_trace_class *trace_class,
4039  bt_field_class *element_field_class, uint64_t length)
4040  __BT_NOEXCEPT;
4041 
4058  const bt_field_class *field_class) __BT_NOEXCEPT;
4059 
4146  bt_trace_class *trace_class,
4147  bt_field_class *element_field_class,
4148  bt_field_class *length_field_class) __BT_NOEXCEPT;
4149 
4198  bt_trace_class *trace_class,
4199  bt_field_class *element_field_class);
4200 
4264  bt_trace_class *trace_class,
4265  bt_field_class *element_field_class,
4266  const bt_field_location *length_field_location);
4267 
4302 extern const bt_field_path *
4304  const bt_field_class *field_class) __BT_NOEXCEPT;
4305 
4330 extern const bt_field_location *
4332  const bt_field_class *field_class);
4333 
4369  bt_trace_class *trace_class) __BT_NOEXCEPT;
4370 
4381 
4388 
4422  bt_field_class *field_class,
4423  const char *name, bt_field_class *member_field_class)
4424  __BT_NOEXCEPT;
4425 
4444  const bt_field_class *field_class) __BT_NOEXCEPT;
4445 
4482  bt_field_class *field_class, uint64_t index) __BT_NOEXCEPT;
4483 
4491 extern const bt_field_class_structure_member *
4493  const bt_field_class *field_class, uint64_t index)
4494  __BT_NOEXCEPT;
4495 
4531  bt_field_class *field_class, const char *name) __BT_NOEXCEPT;
4532 
4540 extern const bt_field_class_structure_member *
4542  const bt_field_class *field_class, const char *name)
4543  __BT_NOEXCEPT;
4544 
4577 extern const char *bt_field_class_structure_member_get_name(
4578  const bt_field_class_structure_member *member) __BT_NOEXCEPT;
4579 
4598 extern bt_field_class *
4600  bt_field_class_structure_member *member) __BT_NOEXCEPT;
4601 
4609 extern const bt_field_class *
4611  const bt_field_class_structure_member *member) __BT_NOEXCEPT;
4612 
4644  const bt_value *user_attributes) __BT_NOEXCEPT;
4645 
4672 extern bt_value *
4674  bt_field_class_structure_member *member) __BT_NOEXCEPT;
4675 
4683 extern const bt_value *
4685  const bt_field_class_structure_member *member) __BT_NOEXCEPT;
4686 
4714  bt_field_class *field_class) __BT_NOEXCEPT;
4715 
4723 extern const bt_field_class *
4725  const bt_field_class *field_class) __BT_NOEXCEPT;
4726 
4788  bt_trace_class *trace_class,
4789  bt_field_class *optional_field_class) __BT_NOEXCEPT;
4790 
4840  bt_trace_class *trace_class,
4841  bt_field_class *optional_field_class) __BT_NOEXCEPT;
4842 
4884 extern const bt_field_path *
4886  const bt_field_class *field_class) __BT_NOEXCEPT;
4887 
4911 extern const bt_field_location *
4913  const bt_field_class *field_class) __BT_NOEXCEPT;
4914 
4991  bt_trace_class *trace_class,
4992  bt_field_class *optional_field_class,
4993  bt_field_class *selector_field_class) __BT_NOEXCEPT;
4994 
5059  bt_trace_class *trace_class,
5060  bt_field_class *optional_field_class,
5061  const bt_field_location *selector_field_location) __BT_NOEXCEPT;
5062 
5085 extern void
5087  bt_field_class *field_class, bt_bool selector_is_reversed)
5088  __BT_NOEXCEPT;
5089 
5112 extern bt_bool
5114  const bt_field_class *field_class) __BT_NOEXCEPT;
5115 
5197 extern bt_field_class *
5199  bt_trace_class *trace_class,
5200  bt_field_class *optional_field_class,
5201  bt_field_class *selector_field_class,
5202  const bt_integer_range_set_unsigned *ranges)
5203  __BT_NOEXCEPT;
5204 
5274 extern bt_field_class *
5276  bt_trace_class *trace_class,
5277  bt_field_class *optional_field_class,
5278  const bt_field_location *selector_field_location,
5279  const bt_integer_range_set_unsigned *ranges) __BT_NOEXCEPT;
5280 
5299 extern const bt_integer_range_set_unsigned *
5301  const bt_field_class *field_class) __BT_NOEXCEPT;
5302 
5384 extern bt_field_class *
5386  bt_trace_class *trace_class,
5387  bt_field_class *optional_field_class,
5388  bt_field_class *selector_field_class,
5389  const bt_integer_range_set_signed *ranges) __BT_NOEXCEPT;
5390 
5460 extern bt_field_class *
5462  bt_trace_class *trace_class,
5463  bt_field_class *optional_field_class,
5464  const bt_field_location *selector_field_location,
5465  const bt_integer_range_set_signed *ranges) __BT_NOEXCEPT;
5466 
5485 extern const bt_integer_range_set_signed *
5487  const bt_field_class *field_class) __BT_NOEXCEPT;
5488 
5573  bt_trace_class *trace_class,
5574  bt_field_class *selector_field_class) __BT_NOEXCEPT;
5575 
5594  const bt_field_class *field_class) __BT_NOEXCEPT;
5595 
5632  bt_field_class *field_class, uint64_t index) __BT_NOEXCEPT;
5633 
5641 extern const bt_field_class_variant_option *
5643  const bt_field_class *field_class, uint64_t index)
5644  __BT_NOEXCEPT;
5645 
5681  bt_field_class *field_class, const char *name) __BT_NOEXCEPT;
5682 
5690 extern const bt_field_class_variant_option *
5692  const bt_field_class *field_class, const char *name)
5693  __BT_NOEXCEPT;
5694 
5737 extern const char *bt_field_class_variant_option_get_name(
5738  const bt_field_class_variant_option *option) __BT_NOEXCEPT;
5739 
5759  bt_field_class_variant_option *option) __BT_NOEXCEPT;
5760 
5768 extern const bt_field_class *
5770  const bt_field_class_variant_option *option) __BT_NOEXCEPT;
5771 
5806  const bt_value *user_attributes) __BT_NOEXCEPT;
5807 
5837  bt_field_class_variant_option *option) __BT_NOEXCEPT;
5838 
5847  const bt_field_class_variant_option *option) __BT_NOEXCEPT;
5848 
5899  bt_trace_class *trace_class) __BT_NOEXCEPT;
5900 
5912 
5919 
5964  bt_field_class *field_class, const char *name,
5965  bt_field_class *option_field_class) __BT_NOEXCEPT;
5966 
5987 
5994 
6028 extern const bt_field_path *
6030  const bt_field_class *field_class) __BT_NOEXCEPT;
6031 
6057 extern const bt_field_location *
6059  const bt_field_class *field_class);
6060 
6118  bt_trace_class *trace_class,
6119  const bt_field_location *selector_field_location) __BT_NOEXCEPT;
6120 
6177  bt_field_class *field_class, const char *name,
6178  bt_field_class *option_field_class,
6179  const bt_integer_range_set_unsigned *ranges) __BT_NOEXCEPT;
6180 
6216  const bt_field_class *field_class, uint64_t index)
6217  __BT_NOEXCEPT;
6218 
6255  const bt_field_class *field_class, const char *name)
6256  __BT_NOEXCEPT;
6257 
6289 extern const bt_integer_range_set_unsigned *
6292  __BT_NOEXCEPT;
6293 
6312 static inline
6316  __BT_NOEXCEPT
6317 {
6318  return __BT_UPCAST_CONST(bt_field_class_variant_option, option);
6319 }
6320 
6378  bt_trace_class *trace_class,
6379  const bt_field_location *selector_field_location) __BT_NOEXCEPT;
6380 
6437  bt_field_class *field_class, const char *name,
6438  bt_field_class *option_field_class,
6439  const bt_integer_range_set_signed *ranges)
6440  __BT_NOEXCEPT;
6441 
6477  const bt_field_class *field_class, uint64_t index)
6478  __BT_NOEXCEPT;
6479 
6516  const bt_field_class *field_class, const char *name)
6517  __BT_NOEXCEPT;
6518 
6550 extern const bt_integer_range_set_signed *
6553  __BT_NOEXCEPT;
6554 
6573 static inline
6577  __BT_NOEXCEPT
6578 {
6579  return __BT_UPCAST_CONST(bt_field_class_variant_option, option);
6580 }
6581 
6604 extern void bt_field_class_get_ref(
6605  const bt_field_class *field_class) __BT_NOEXCEPT;
6606 
6622 extern void bt_field_class_put_ref(
6623  const bt_field_class *field_class) __BT_NOEXCEPT;
6624 
6639 #define BT_FIELD_CLASS_PUT_REF_AND_RESET(_field_class) \
6640  do { \
6641  bt_field_class_put_ref(_field_class); \
6642  (_field_class) = NULL; \
6643  } while (0)
6644 
6670 #define BT_FIELD_CLASS_MOVE_REF(_dst, _src) \
6671  do { \
6672  bt_field_class_put_ref(_dst); \
6673  (_dst) = (_src); \
6674  (_src) = NULL; \
6675  } while (0)
6676 
6681 #ifdef __cplusplus
6682 }
6683 #endif
6684 
6685 #endif /* BABELTRACE2_TRACE_IR_FIELD_CLASS_H */
void bt_field_class_get_ref(const bt_field_class *field_class)
Increments the reference count of the field class field_class.
bt_field_class * bt_field_class_option_without_selector_create(bt_trace_class *trace_class, bt_field_class *optional_field_class)
Creates an option field class (instances without a linked selector field) having the optional field c...
const bt_field_path * bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const(const bt_field_class *field_class)
Borrows the length field path from the dynamic array field class (instances with a linked length fiel...
bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_unsigned_add_mapping(bt_field_class *field_class, const char *label, const bt_integer_range_set_unsigned *ranges)
Adds a mapping to the unsigned enumeration field class field_class having the label label and the uns...
Out of memory.
Definition: field-class.h:2247
const bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the option at index index from the variant field class field_class (const version)...
bt_field_class * bt_field_class_option_without_selector_field_location_create(bt_trace_class *trace_class, bt_field_class *optional_field_class)
Creates an option field class (instances without a linked selector field) having the optional field c...
bt_value * bt_field_class_structure_member_borrow_user_attributes(bt_field_class_structure_member *member)
Borrows the user attributes of the structure field class member member.
uint64_t bt_field_class_blob_static_get_length(const bt_field_class *field_class)
Returns the length of the static BLOB field class field_class.
void bt_field_class_structure_member_set_user_attributes(bt_field_class_structure_member *member, const bt_value *user_attributes)
Sets the user attributes of the structure field class member member to user_attributes.
struct bt_integer_range_set_unsigned bt_integer_range_set_unsigned
Set of unsigned 64-bit integer ranges.
Definition: types.h:54
bt_field_class * bt_field_class_integer_signed_create(bt_trace_class *trace_class)
Creates an signed integer field class from the trace class trace_class.
Variant field class.
Definition: field-class.h:1911
Binary (2).
Definition: field-class.h:2733
bt_field_class_integer_preferred_display_base
Integer field class preferred display bases.
Definition: field-class.h:2728
const bt_field_class_variant_with_selector_field_integer_signed_option * bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the option at index index from the variant field class (instances with a linked signed intege...
const bt_value * bt_field_class_borrow_user_attributes_const(const bt_field_class *field_class)
Borrows the user attributes of the field class field_class (const version).
Success.
Definition: field-class.h:3875
Boolean field class.
Definition: field-class.h:1638
bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_unsigned_get_mapping_labels_for_value(const bt_field_class *field_class, uint64_t value, bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count)
Returns an array of all the labels of the mappings of the unsigned enumeration field class field_clas...
bt_field_class_integer_field_value_hint
Integer field class field value hint.
Definition: field-class.h:2613
static const bt_field_class_variant_option * bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const(const bt_field_class_variant_with_selector_field_integer_unsigned_option *option)
Upcasts the variant field class option (instances with a linked unsigned integer selector field) opti...
Definition: field-class.h:6314
Signed enumeration field class.
Definition: field-class.h:1698
uint64_t bt_field_class_integer_get_field_value_hints(const bt_field_class *field_class)
Returns the field value hints of the integer field class field_class.
bt_field_class * bt_field_class_array_dynamic_without_length_field_location_create(bt_trace_class *trace_class, bt_field_class *element_field_class)
Creates a dynamic array field class (instances without a linked length field) having the element fiel...
struct bt_field_class_variant_with_selector_field_integer_signed_option bt_field_class_variant_with_selector_field_integer_signed_option
Variant field class option (instances with a linked signed integer selector field).
Definition: types.h:46
const bt_field_class * bt_field_class_option_borrow_field_class_const(const bt_field_class *field_class)
Borrows the optional field class from the option field class field_class (const version).
const char * bt_field_class_structure_member_get_name(const bt_field_class_structure_member *member)
Returns the name of the structure field class member member.
const bt_integer_range_set_unsigned * bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const(const bt_field_class *field_class)
Borrows the unsigned integer ranges from the option field class (with an unsigned integer selector fi...
const char * bt_field_class_enumeration_mapping_get_label(const bt_field_class_enumeration_mapping *mapping)
Returns the label of the enumeration field class mapping mapping.
bt_field_class_bit_array_add_flag_status bt_field_class_bit_array_add_flag(bt_field_class *field_class, const char *label, const bt_integer_range_set_unsigned *index_ranges)
Adds a flag to the bit array field class field_class having the label label and the bit index ranges ...
bt_field_class_variant_without_selector_append_option_status
Status codes for bt_field_class_variant_without_selector_append_option().
Definition: field-class.h:5906
Signed integer field class.
Definition: field-class.h:1669
const bt_field_class_enumeration_unsigned_mapping * bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the mapping at index index from the unsigned enumeration field class field_class.
void bt_field_class_integer_set_field_value_hints(bt_field_class *field_class, uint64_t hints)
Sets the field value hints of the integer field class field_class to a bitwise disjunction (OR) of bt...
struct bt_field_path bt_field_path
Field path.
Definition: types.h:49
Real field class.
Definition: field-class.h:1707
bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_signed_add_mapping(bt_field_class *field_class, const char *label, const bt_integer_range_set_signed *ranges)
Adds a mapping to the signed enumeration field class field_class having the label label and the signe...
const bt_integer_range_set_unsigned * bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const(const bt_field_class_variant_with_selector_field_integer_unsigned_option *option)
Borrows the unsigned integer ranges from the variant field class option (instances with a linked unsi...
bt_field_class * bt_field_class_blob_static_create(bt_trace_class *trace_class, uint64_t length)
Creates a static BLOB field class having the length length from the trace class trace_class.
bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer(const bt_field_class *field_class, uint64_t value_as_integer, bt_field_class_bit_array_flag_label_array *labels, uint64_t *count)
Returns the labels of all the active flags of the bit array field class field_class for the set bits ...
uint64_t bt_field_class_bit_array_get_length(const bt_field_class *field_class)
Returns the length of the bit array field class field_class.
bt_field_class_type bt_field_class_get_type(const bt_field_class *field_class)
Returns the type enumerator of the field class field_class.
bt_field_class * bt_field_class_option_with_selector_field_location_bool_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location)
Creates an option field class (instances with a linked boolean selector field) having the optional fi...
uint64_t bt_field_class_variant_get_option_count(const bt_field_class *field_class)
Returns the number of options contained in the variant field class field_class.
uint64_t bt_field_class_bit_array_get_flag_count(const bt_field_class *field_class)
Returns the number of flags contained in the bit array field class field_class.
Double-precision real field class.
Definition: field-class.h:1723
bt_field_class * bt_field_class_option_with_selector_field_location_integer_signed_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_signed *ranges)
Creates an option field class (instances with a linked signed integer selector field) having the opti...
const bt_field_class * bt_field_class_variant_option_borrow_field_class_const(const bt_field_class_variant_option *option)
Borrows the field class from the variant field class option option (const version).
bt_field_class * bt_field_class_variant_with_selector_field_location_integer_unsigned_create(bt_trace_class *trace_class, const bt_field_location *selector_field_location)
Creates an empty variant field class (instances with a linked unsigned integer selector field) having...
void bt_field_class_integer_set_field_value_range(bt_field_class *field_class, uint64_t n)
Sets the field value range of the integer field class field_class to n.
bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_name(bt_field_class *field_class, const char *name)
Borrows the option having the name name from the variant field class field_class. ...
const char * bt_field_class_variant_option_get_name(const bt_field_class_variant_option *option)
Returns the name of the variant field class option option.
Array field class.
Definition: field-class.h:1800
Success.
Definition: field-class.h:2241
const bt_integer_range_set_signed * bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const(const bt_field_class_variant_with_selector_field_integer_signed_option *option)
Borrows the signed integer ranges from the variant field class option (instances with a linked signed...
Success.
Definition: field-class.h:4380
struct bt_field_class bt_field_class
Field class.
Definition: types.h:39
bt_field_class * bt_field_class_array_static_create(bt_trace_class *trace_class, bt_field_class *element_field_class, uint64_t length)
Creates a static array field class having the element field class element_field_class and the length ...
Structure field class.
Definition: field-class.h:1791
Variant field class (instances with a linked integer selector field).
Definition: field-class.h:1941
bt_field_class * bt_field_class_option_with_selector_field_location_integer_unsigned_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_unsigned *ranges)
Creates an option field class (instances with a linked unsigned integer selector field) having the op...
uint64_t bt_field_class_enumeration_get_mapping_count(const bt_field_class *field_class)
Returns the number of mappings contained in the enumeration field class field_class.
Static array field class.
Definition: field-class.h:1808
char const *const * bt_field_class_bit_array_flag_label_array
Array of const bit array field class flag labels.
Definition: field-class.h:2403
Unsigned enumeration field class.
Definition: field-class.h:1689
bt_field_class_integer_preferred_display_base bt_field_class_integer_get_preferred_display_base(const bt_field_class *field_class)
Returns the preferred display base of the integer field class field_class.
Integer field class.
Definition: field-class.h:1653
uint64_t bt_field_class_get_graph_mip_version(const bt_field_class *field_class)
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph contai...
const bt_integer_range_set_signed * bt_field_class_enumeration_signed_mapping_borrow_ranges_const(const bt_field_class_enumeration_signed_mapping *mapping)
Borrows the signed integer ranges from the signed enumeration field class mapping mapping...
const bt_integer_range_set_unsigned * bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const(const bt_field_class_enumeration_unsigned_mapping *mapping)
Borrows the unsigned integer ranges from the unsigned enumeration field class mapping mapping...
bt_field_class * bt_field_class_option_with_selector_field_integer_unsigned_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class, const bt_integer_range_set_unsigned *ranges)
Creates an option field class (instances with a linked unsigned integer selector field) having the op...
const bt_field_class * bt_field_class_array_borrow_element_field_class_const(const bt_field_class *field_class)
Borrows the element field class from the array field class field_class (const version).
bt_field_class * bt_field_class_option_borrow_field_class(bt_field_class *field_class)
Borrows the optional field class from the option field class field_class.
const bt_field_class_enumeration_signed_mapping * bt_field_class_enumeration_signed_borrow_mapping_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the mapping at index index from the signed enumeration field class field_class.
Dynamic array field class (instances without a linked length field).
Definition: field-class.h:1828
void bt_field_class_option_with_selector_field_bool_set_selector_is_reversed(bt_field_class *field_class, bt_bool selector_is_reversed)
Sets whether or not the selector of the option field class (with a boolean selector field) field_clas...
Dynamic BLOB field class (instances without a linked length field).
Definition: field-class.h:1774
Option field class (instances with a linked unsigned integer selector field).
Definition: field-class.h:1893
bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_index(bt_field_class *field_class, uint64_t index)
Borrows the member at index index from the structure field class field_class.
const char * bt_field_class_blob_get_media_type(const bt_field_class *field_class)
Returns the IANA media type of the BLOB field class field_class.
bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_unsigned_append_option(bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_unsigned *ranges)
Appends an option to the variant field class (instances with a linked unsigned integer selector field...
Option field class (instances with a linked boolean selector field).
Definition: field-class.h:1872
Dynamic BLOB field class (instances with a linked length field).
Definition: field-class.h:1785
const bt_field_class_enumeration_signed_mapping * bt_field_class_enumeration_signed_borrow_mapping_by_label_const(const bt_field_class *field_class, const char *label)
Borrows the mapping having the label label from the signed enumeration field class field_class...
void bt_field_class_set_user_attributes(bt_field_class *field_class, const bt_value *user_attributes)
Sets the user attributes of the field class field_class to user_attributes.
bt_field_class_type
Field class type enumerators.
Definition: field-class.h:1633
struct bt_field_class_structure_member bt_field_class_structure_member
Structure field class member.
Definition: types.h:44
const bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_name_const(const bt_field_class *field_class, const char *name)
Borrows the member having the name name from the structure field class field_class (const version)...
Unsigned integer field class.
Definition: field-class.h:1661
bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_signed_append_option(bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_signed *ranges)
Appends an option to the variant field class (instances with a linked signed integer selector field) ...
bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_index(bt_field_class *field_class, uint64_t index)
Borrows the option at index index from the variant field class field_class.
static bt_bool bt_field_class_integer_has_field_value_hint(const bt_field_class *const field_class, const bt_field_class_integer_field_value_hint hint)
Returns whether or not the integer field class field_class has the field value hint hint...
Definition: field-class.h:2715
static bt_bool bt_field_class_type_is(const bt_field_class_type type, const bt_field_class_type other_type)
Returns whether or not the field class type type conceptually is the field class type other_type...
Definition: field-class.h:2015
bt_value * bt_field_class_borrow_user_attributes(bt_field_class *field_class)
Borrows the user attributes of the field class field_class.
Option field class.
Definition: field-class.h:1846
Static BLOB field class.
Definition: field-class.h:1750
bt_field_class_blob_set_media_type_status bt_field_class_blob_set_media_type(bt_field_class *field_class, const char *media_type)
Sets the IANA media type of the BLOB field class field_class to a copy of media_type.
bt_field_class * bt_field_class_blob_dynamic_with_length_field_location_create(bt_trace_class *trace_class, const bt_field_location *length_field_location)
Creates a dynamic BLOB field class (instances with a linked length field) having the length field loc...
Option field class (instances without a linked selector field).
Definition: field-class.h:1852
bt_value * bt_field_class_variant_option_borrow_user_attributes(bt_field_class_variant_option *option)
Borrows the user attributes of the variant field class option option.
Option field class (instances with a linked selector field).
Definition: field-class.h:1863
Decimal (10).
Definition: field-class.h:2745
uint64_t bt_field_class_integer_get_field_value_range(const bt_field_class *field_class)
Returns the field value range of the integer field class field_class.
Option field class (instances with a linked integer selector field).
Definition: field-class.h:1884
bt_field_class_variant_with_selector_field_integer_append_option_status
Status codes for bt_field_class_variant_with_selector_field_integer_unsigned_append_option() and bt_f...
Definition: field-class.h:5981
Out of memory.
Definition: field-class.h:3881
struct bt_field_class_variant_option bt_field_class_variant_option
Variant field class option.
Definition: types.h:45
const bt_field_class_variant_with_selector_field_integer_unsigned_option * bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const(const bt_field_class *field_class, const char *name)
Borrows the option having the name name from the variant field class (instances with a linked unsigne...
const char * bt_field_class_bit_array_flag_get_label(const bt_field_class_bit_array_flag *flag)
Returns the label of the bit array field class flag flag.
const bt_integer_range_set_signed * bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const(const bt_field_class *field_class)
Borrows the signed integer ranges from the option field class (with a signed integer selector field) ...
const bt_field_location * bt_field_class_option_with_selector_field_borrow_selector_field_location_const(const bt_field_class *field_class)
Borrows the selector field location from the option field class (instances with a linked selector fie...
static const bt_field_class_enumeration_mapping * bt_field_class_enumeration_signed_mapping_as_mapping_const(const bt_field_class_enumeration_signed_mapping *mapping)
Upcasts the signed enumeration field class mapping mapping to the common bt_field_class_enumeration_m...
Definition: field-class.h:3629
Hexadecimal (16).
Definition: field-class.h:2751
bt_bool bt_field_class_option_with_selector_field_bool_selector_is_reversed(const bt_field_class *field_class)
Returns whether or not the selector of the option field class (with a boolean selector field) is reve...
bt_field_class * bt_field_class_real_single_precision_create(bt_trace_class *trace_class)
Creates a single-precision real field class from the trace class trace_class.
struct bt_value bt_value
Value.
Definition: types.h:93
bt_field_class_enumeration_get_mapping_labels_for_value_status
Status codes for bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_clas...
Definition: field-class.h:2997
bt_field_class * bt_field_class_variant_without_selector_field_location_create(bt_trace_class *trace_class)
Creates an empty variant field class (instances without a linked selector field) from the trace class...
Out of memory.
Definition: field-class.h:4386
bt_field_class_structure_append_member_status
Status codes for bt_field_class_structure_append_member().
Definition: field-class.h:4375
bt_field_class * bt_field_class_string_create(bt_trace_class *trace_class)
Creates a string field class from the trace class trace_class.
Option field class (instances with a linked unsigned integer selector field).
Definition: field-class.h:1950
Option field class (instances with a linked signed integer selector field).
Definition: field-class.h:1902
const bt_field_class_enumeration_unsigned_mapping * bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const(const bt_field_class *field_class, const char *label)
Borrows the mapping having the label label from the unsigned enumeration field class field_class...
Variant field class (instances with a linked selector field).
Definition: field-class.h:1929
const bt_field_path * bt_field_class_variant_with_selector_field_borrow_selector_field_path_const(const bt_field_class *field_class)
Borrows the selector field path from the variant field class (instances with a linked selector field)...
bt_field_class * bt_field_class_structure_member_borrow_field_class(bt_field_class_structure_member *member)
Borrows the field class from the structure field class member member.
int bt_bool
Babeltrace 2 boolean type.
Definition: types.h:126
const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_label_const(const bt_field_class *field_class, const char *label)
Borrows the flag having the label label from the bit array field class field_class.
Variant field class (instances without a linked selector field).
Definition: field-class.h:1917
const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the flag at index index from the bit array field class field_class.
struct bt_integer_range_set_signed bt_integer_range_set_signed
Set of signed 64-bit integer ranges.
Definition: types.h:53
Octal (8).
Definition: field-class.h:2739
bt_field_class_bit_array_add_flag_status
Status codes for bt_field_class_bit_array_add_flag().
Definition: field-class.h:2236
const bt_value * bt_field_class_structure_member_borrow_user_attributes_const(const bt_field_class_structure_member *member)
Borrows the user attributes of the structure field class member member (const version).
const bt_field_location * bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const(const bt_field_class *field_class)
Borrows the length field location from the dynamic BLOB field class (instances with a linked length f...
Expect small integer field values.
Definition: field-class.h:2618
bt_field_class * bt_field_class_enumeration_signed_create(bt_trace_class *trace_class)
Creates a signed enumeration field class from the trace class trace_class.
const bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_name_const(const bt_field_class *field_class, const char *name)
Borrows the option having the name name from the variant field class field_class (const version)...
bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status
Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
Definition: field-class.h:2412
struct bt_field_class_enumeration_signed_mapping bt_field_class_enumeration_signed_mapping
Signed enumeration field class mapping.
Definition: types.h:42
Single-precision real field class.
Definition: field-class.h:1715
const bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the member at index index from the structure field class field_class (const version)...
#define BT_FALSE
False value for bt_bool.
Definition: types.h:114
const bt_field_location * bt_field_class_variant_with_selector_field_borrow_selector_field_location_const(const bt_field_class *field_class)
Borrows the selector field location from the variant field class (instances with a linked selector fi...
struct bt_trace_class bt_trace_class
Trace class.
Definition: types.h:92
bt_field_class_enumeration_add_mapping_status
Status codes for bt_field_class_enumeration_unsigned_add_mapping() and bt_field_class_enumeration_sig...
Definition: field-class.h:3016
bt_field_class * bt_field_class_variant_with_selector_field_location_integer_signed_create(bt_trace_class *trace_class, const bt_field_location *selector_field_location)
Creates an empty variant field class (instances with a linked signed integer selector field) having t...
bt_field_class * bt_field_class_array_dynamic_create(bt_trace_class *trace_class, bt_field_class *element_field_class, bt_field_class *length_field_class)
Creates a dynamic array field class having the element field class element_field_class from the trace...
void bt_field_class_put_ref(const bt_field_class *field_class)
Decrements the reference count of the field class field_class.
struct bt_field_class_enumeration_mapping bt_field_class_enumeration_mapping
Enumeration field class mapping.
Definition: types.h:41
bt_field_class * bt_field_class_blob_dynamic_without_length_field_location_create(bt_trace_class *trace_class)
Creates a dynamic BLOB field class (instances without a linked length field) from the trace class tra...
char const *const * bt_field_class_enumeration_mapping_label_array
Array of const enumeration field class mapping labels.
Definition: field-class.h:2988
struct bt_field_class_variant_with_selector_field_integer_unsigned_option bt_field_class_variant_with_selector_field_integer_unsigned_option
Variant field class option (instances with a linked unsigned integer selector field).
Definition: types.h:47
bt_field_class_blob_set_media_type_status
Status codes for bt_field_class_blob_set_media_type().
Definition: field-class.h:3870
Success.
Definition: field-class.h:3021
bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_name(bt_field_class *field_class, const char *name)
Borrows the member having the name name from the structure field class field_class.
uint64_t bt_field_class_structure_get_member_count(const bt_field_class *field_class)
Returns the number of members contained in the structure field class field_class. ...
Bit array field class.
Definition: field-class.h:1644
bt_field_class * bt_field_class_array_dynamic_with_length_field_location_create(bt_trace_class *trace_class, bt_field_class *element_field_class, const bt_field_location *length_field_location)
Creates a dynamic array field class (instances with a linked length field) having the element field c...
const bt_field_location * bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const(const bt_field_class *field_class)
Borrows the length field location from the dynamic array field class (instances with a linked length ...
static const bt_field_class_variant_option * bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const(const bt_field_class_variant_with_selector_field_integer_signed_option *option)
Upcasts the variant field class option (instances with a linked signed integer selector field) option...
Definition: field-class.h:6575
bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_signed_get_mapping_labels_for_value(const bt_field_class *field_class, int64_t value, bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count)
Returns an array of all the labels of the mappings of the signed enumeration field class field_class ...
bt_field_class * bt_field_class_array_borrow_element_field_class(bt_field_class *field_class)
Borrows the element field class from the array field class field_class.
uint64_t bt_field_class_array_static_get_length(const bt_field_class *field_class)
Returns the length of the static array field class field_class.
Dynamic array field class (instances with a linked length field).
Definition: field-class.h:1837
Out of memory.
Definition: field-class.h:3027
#define BT_TRUE
True value for bt_bool.
Definition: types.h:108
const bt_field_class_variant_with_selector_field_integer_unsigned_option * bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const(const bt_field_class *field_class, uint64_t index)
Borrows the option at index index from the variant field class (instances with a linked unsigned inte...
bt_field_class * bt_field_class_variant_create(bt_trace_class *trace_class, bt_field_class *selector_field_class)
Creates an empty variant field class from the trace class trace_class.
void bt_field_class_variant_option_set_user_attributes(bt_field_class_variant_option *option, const bt_value *user_attributes)
Sets the user attributes of the variant field class option option to user_attributes.
const bt_field_class * bt_field_class_structure_member_borrow_field_class_const(const bt_field_class_structure_member *member)
Borrows the field class from the structure field class member member (const version).
Dynamic BLOB field class.
Definition: field-class.h:1763
Option field class (instances with a linked signed integer selector field).
Definition: field-class.h:1959
String field class..
Definition: field-class.h:1729
const bt_field_path * bt_field_class_option_with_selector_field_borrow_selector_field_path_const(const bt_field_class *field_class)
Borrows the selector field path from the option field class (instances with a linked selector field) ...
bt_field_class * bt_field_class_bit_array_create(bt_trace_class *trace_class, uint64_t length)
Creates a bit array field class with the length length from the trace class trace_class.
bt_field_class * bt_field_class_enumeration_unsigned_create(bt_trace_class *trace_class)
Creates an unsigned enumeration field class from the trace class trace_class.
bt_field_class * bt_field_class_bool_create(bt_trace_class *trace_class)
Creates a boolean field class from the trace class trace_class.
Enumeration field class.
Definition: field-class.h:1680
bt_field_class * bt_field_class_real_double_precision_create(bt_trace_class *trace_class)
Creates a double-precision real field class from the trace class trace_class.
struct bt_field_class_enumeration_unsigned_mapping bt_field_class_enumeration_unsigned_mapping
Unsigned enumeration field class mapping.
Definition: types.h:43
const bt_field_class_variant_with_selector_field_integer_signed_option * bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const(const bt_field_class *field_class, const char *name)
Borrows the option having the name name from the variant field class (instances with a linked signed ...
bt_field_class * bt_field_class_integer_unsigned_create(bt_trace_class *trace_class)
Creates an unsigned integer field class from the trace class trace_class.
bt_field_class * bt_field_class_option_with_selector_field_bool_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class)
Creates an option field class (instances with a linked boolean selector field) having the optional fi...
static const bt_field_class_enumeration_mapping * bt_field_class_enumeration_unsigned_mapping_as_mapping_const(const bt_field_class_enumeration_unsigned_mapping *mapping)
Upcasts the unsigned enumeration field class mapping mapping to the common bt_field_class_enumeration...
Definition: field-class.h:3354
bt_field_class * bt_field_class_variant_option_borrow_field_class(bt_field_class_variant_option *option)
Borrows the field class from the variant field class option option.
Dynamic array field class.
Definition: field-class.h:1819
bt_field_class * bt_field_class_option_with_selector_field_integer_signed_create(bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class, const bt_integer_range_set_signed *ranges)
Creates an option field class (instances with a linked signed integer selector field) having the opti...
const bt_value * bt_field_class_variant_option_borrow_user_attributes_const(const bt_field_class_variant_option *option)
Borrows the user attributes of the variant field class option option (const version).
bt_field_class * bt_field_class_structure_create(bt_trace_class *trace_class)
Creates a structure field class from the trace class trace_class.
void bt_field_class_integer_set_preferred_display_base(bt_field_class *field_class, bt_field_class_integer_preferred_display_base preferred_display_base)
Sets the preferred display base of the integer field class field_class to preferred_display_base.
bt_field_class_structure_append_member_status bt_field_class_structure_append_member(bt_field_class *field_class, const char *name, bt_field_class *member_field_class)
Appends a member to the structure field class field_class having the name name and the field class me...
const bt_integer_range_set_unsigned * bt_field_class_bit_array_flag_borrow_index_ranges_const(const bt_field_class_bit_array_flag *flag)
Borrows the bit index ranges from the bit array field class flag flag.
bt_field_class_variant_without_selector_append_option_status bt_field_class_variant_without_selector_append_option(bt_field_class *field_class, const char *name, bt_field_class *option_field_class)
Appends an option to the variant field class (instances without a linked selector field) field_class ...
BLOB field class.
Definition: field-class.h:1740