lib: decouple variant FC option names from selector FC mapping names
[babeltrace.git] / include / babeltrace2 / trace-ir / field-class.h
index 31c81229bc3dac798638bc04718e3257ec05e712..a8c3feafe4f4a4e4cda2ce5937ca4f9c6c279472 100644 (file)
@@ -62,20 +62,20 @@ extern bt_field_class *bt_field_class_unsigned_enumeration_create(
 extern bt_field_class *bt_field_class_signed_enumeration_create(
                bt_trace_class *trace_class);
 
-typedef enum bt_field_class_enumeration_map_range_status {
-       BT_FIELD_CLASS_ENUMERATION_MAP_RANGE_STATUS_MEMORY_ERROR        = __BT_FUNC_STATUS_MEMORY_ERROR,
-       BT_FIELD_CLASS_ENUMERATION_MAP_RANGE_STATUS_OK                  = __BT_FUNC_STATUS_OK,
-} bt_field_class_enumeration_map_range_status;
+typedef enum bt_field_class_enumeration_add_mapping_status {
+       BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROR      = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OK                = __BT_FUNC_STATUS_OK,
+} bt_field_class_enumeration_add_mapping_status;
 
-extern bt_field_class_enumeration_map_range_status
-bt_field_class_unsigned_enumeration_map_range(
+extern bt_field_class_enumeration_add_mapping_status
+bt_field_class_unsigned_enumeration_add_mapping(
                bt_field_class *field_class, const char *label,
-               uint64_t range_lower, uint64_t range_upper);
+               const bt_integer_range_set_unsigned *range_set);
 
-extern bt_field_class_enumeration_map_range_status
-bt_field_class_signed_enumeration_map_range(
+extern bt_field_class_enumeration_add_mapping_status
+bt_field_class_signed_enumeration_add_mapping(
                bt_field_class *field_class, const char *label,
-               int64_t range_lower, int64_t range_upper);
+               const bt_integer_range_set_signed *range_set);
 
 extern bt_field_class *bt_field_class_string_create(
                bt_trace_class *trace_class);
@@ -114,7 +114,7 @@ extern bt_field_class *bt_field_class_array_borrow_element_field_class(
 
 typedef enum bt_field_class_dynamic_array_set_length_field_class_status {
        BT_FIELD_CLASS_DYNAMIC_ARRAY_SET_LENGTH_FIELD_CLASS_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
-       BT_FIELD_CLASS_DYNAMIC_ARRAY_SET_LENGTH_FIELD_CLASS_STATUS_OK                   = __BT_FUNC_STATUS_OK,
+       BT_FIELD_CLASS_DYNAMIC_ARRAY_SET_LENGTH_FIELD_CLASS_STATUS_OK           = __BT_FUNC_STATUS_OK,
 } bt_field_class_dynamic_array_set_length_field_class_status;
 
 extern bt_field_class_dynamic_array_set_length_field_class_status
@@ -123,37 +123,35 @@ bt_field_class_dynamic_array_set_length_field_class(
                bt_field_class *length_field_class);
 
 extern bt_field_class *bt_field_class_variant_create(
-               bt_trace_class *trace_class);
-
-typedef enum bt_field_class_variant_set_selector_field_class_status {
-       BT_FIELD_CLASS_VARIANT_SET_SELECTOR_FIELD_CLASS_STATUS_MEMORY_ERROR     = __BT_FUNC_STATUS_MEMORY_ERROR,
-       BT_FIELD_CLASS_VARIANT_SET_SELECTOR_FIELD_CLASS_STATUS_OK                       = __BT_FUNC_STATUS_OK,
-} bt_field_class_variant_set_selector_field_class_status;
-
-extern bt_field_class_variant_set_selector_field_class_status
-bt_field_class_variant_set_selector_field_class(bt_field_class *field_class,
+               bt_trace_class *trace_class,
                bt_field_class *selector_field_class);
 
-typedef enum bt_field_class_variant_append_option_status {
-       BT_FIELD_CLASS_VARIANT_APPEND_OPTION_STATUS_MEMORY_ERROR        = __BT_FUNC_STATUS_MEMORY_ERROR,
-       BT_FIELD_CLASS_VARIANT_APPEND_OPTION_STATUS_OK                  = __BT_FUNC_STATUS_OK,
-} bt_field_class_variant_append_option_status;
+typedef enum bt_field_class_variant_without_selector_append_option_status {
+       BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_APPEND_OPTION_STATUS_MEMORY_ERROR       = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_APPEND_OPTION_STATUS_OK                 = __BT_FUNC_STATUS_OK,
+} bt_field_class_variant_without_selector_append_option_status;
 
-extern bt_field_class_variant_append_option_status
-bt_field_class_variant_append_option(
-               bt_field_class *var_field_class,
-               const char *name, bt_field_class *field_class);
+extern bt_field_class_variant_without_selector_append_option_status
+bt_field_class_variant_without_selector_append_option(
+               bt_field_class *var_field_class, const char *name,
+               bt_field_class *field_class);
 
-extern bt_field_class_variant_option *
-bt_field_class_variant_borrow_option_by_index(
-               bt_field_class *field_class, uint64_t index);
+typedef enum bt_field_class_variant_with_selector_append_option_status {
+       BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_MEMORY_ERROR  = __BT_FUNC_STATUS_MEMORY_ERROR,
+       BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_APPEND_OPTION_STATUS_OK            = __BT_FUNC_STATUS_OK,
+} bt_field_class_variant_with_selector_append_option_status;
 
-extern bt_field_class_variant_option *
-bt_field_class_variant_borrow_option_by_name(
-               bt_field_class *field_class, const char *name);
+extern bt_field_class_variant_with_selector_append_option_status
+bt_field_class_variant_with_unsigned_selector_append_option(
+               bt_field_class *var_field_class, const char *name,
+               bt_field_class *field_class,
+               const bt_integer_range_set_unsigned *range_set);
 
-extern bt_field_class *bt_field_class_variant_option_borrow_field_class(
-               bt_field_class_variant_option *option);
+extern bt_field_class_variant_with_selector_append_option_status
+bt_field_class_variant_with_signed_selector_append_option(
+               bt_field_class *var_field_class, const char *name,
+               bt_field_class *field_class,
+               const bt_integer_range_set_signed *range_set);
 
 #ifdef __cplusplus
 }
This page took 0.025402 seconds and 4 git commands to generate.