7#ifndef BABELTRACE2_INTEGER_RANGE_SET_H
8#define BABELTRACE2_INTEGER_RANGE_SET_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
19#include <babeltrace2/types.h>
366 uint64_t lower, uint64_t upper) __BT_NOEXCEPT;
398 uint64_t index) __BT_NOEXCEPT;
506#define BT_INTEGER_RANGE_SET_UNSIGNED_PUT_REF_AND_RESET(_int_range_set) \
508 bt_integer_range_set_unsigned_put_ref(_int_range_set); \
509 (_int_range_set) = NULL; \
538#define BT_INTEGER_RANGE_SET_UNSIGNED_MOVE_REF(_dst, _src) \
540 bt_integer_range_set_unsigned_put_ref(_dst); \
595 int64_t lower, int64_t upper) __BT_NOEXCEPT;
627 uint64_t index) __BT_NOEXCEPT;
733#define BT_INTEGER_RANGE_SET_SIGNED_PUT_REF_AND_RESET(_int_range_set) \
735 bt_integer_range_set_signed_put_ref(_int_range_set); \
736 (_int_range_set) = NULL; \
765#define BT_INTEGER_RANGE_SET_SIGNED_MOVE_REF(_dst, _src) \
767 bt_integer_range_set_signed_put_ref(_dst); \
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:126
uint64_t bt_integer_range_unsigned_get_lower(const bt_integer_range_unsigned *int_range)
Returns the lower value of the unsigned integer range int_range.
bt_bool bt_integer_range_set_signed_is_equal(const bt_integer_range_set_signed *int_range_set_a, const bt_integer_range_set_signed *int_range_set_b)
Returns whether or not the signed integer range set int_range_set_a is equal to int_range_set_b.
void bt_integer_range_set_signed_get_ref(const bt_integer_range_set_signed *int_range_set)
Increments the reference count of the signed integer range set int_range_set.
bt_integer_range_set_unsigned * bt_integer_range_set_unsigned_create(void)
Creates and returns an empty set of unsigned 64-bit integer ranges.
struct bt_integer_range_set_unsigned bt_integer_range_set_unsigned
Set of unsigned 64-bit integer ranges.
Definition types.h:54
uint64_t bt_integer_range_set_get_range_count(const bt_integer_range_set *int_range_set)
Returns the number of integer ranges contained in the integer range set int_range_set.
bt_integer_range_set_add_range_status
Status codes for bt_integer_range_set_unsigned_add_range() and bt_integer_range_set_signed_add_range(...
Definition integer-range-set.h:278
bt_bool bt_integer_range_unsigned_is_equal(const bt_integer_range_unsigned *a_int_range, const bt_integer_range_unsigned *b_int_range)
Returns whether or not the unsigned integer range a_int_range is equal to b_int_range.
bt_integer_range_set_add_range_status bt_integer_range_set_unsigned_add_range(bt_integer_range_set_unsigned *int_range_set, uint64_t lower, uint64_t upper)
Adds an unsigned 64-bit integer range having the lower value lower and the upper value upper to the u...
const bt_integer_range_unsigned * bt_integer_range_set_unsigned_borrow_range_by_index_const(const bt_integer_range_set_unsigned *int_range_set, uint64_t index)
Borrows the unsigned integer range at index index from the unsigned integer range set int_range_set.
struct bt_integer_range_set bt_integer_range_set
Set of 64-bit integer ranges.
Definition types.h:52
struct bt_integer_range_unsigned bt_integer_range_unsigned
Unsigned 64-bit integer range.
Definition types.h:56
void bt_integer_range_set_unsigned_put_ref(const bt_integer_range_set_unsigned *int_range_set)
Decrements the reference count of the unsigned integer range set int_range_set.
struct bt_integer_range_set_signed bt_integer_range_set_signed
Set of signed 64-bit integer ranges.
Definition types.h:53
int64_t bt_integer_range_signed_get_upper(const bt_integer_range_signed *int_range)
Returns the upper value of the signed integer range int_range.
bt_bool bt_integer_range_set_unsigned_is_equal(const bt_integer_range_set_unsigned *int_range_set_a, const bt_integer_range_set_unsigned *int_range_set_b)
Returns whether or not the unsigned integer range set int_range_set_a is equal to int_range_set_b.
const bt_integer_range_signed * bt_integer_range_set_signed_borrow_range_by_index_const(const bt_integer_range_set_signed *int_range_set, uint64_t index)
Borrows the signed integer range at index index from the signed integer range set int_range_set.
static const bt_integer_range_set * bt_integer_range_set_signed_as_range_set_const(const bt_integer_range_set_signed *int_range_set)
Upcasts the signed integer range set int_range_set to the abstract bt_integer_range_set type.
Definition integer-range-set.h:672
uint64_t bt_integer_range_unsigned_get_upper(const bt_integer_range_unsigned *int_range)
Returns the upper value of the unsigned integer range int_range.
bt_integer_range_set_add_range_status bt_integer_range_set_signed_add_range(bt_integer_range_set_signed *int_range_set, int64_t lower, int64_t upper)
Adds a signed 64-bit integer range having the lower value lower and the upper value upper to the sign...
struct bt_integer_range_signed bt_integer_range_signed
Signed 64-bit integer range.
Definition types.h:55
int64_t bt_integer_range_signed_get_lower(const bt_integer_range_signed *int_range)
Returns the lower value of the signed integer range int_range.
void bt_integer_range_set_signed_put_ref(const bt_integer_range_set_signed *int_range_set)
Decrements the reference count of the signed integer range set int_range_set.
bt_bool bt_integer_range_signed_is_equal(const bt_integer_range_signed *a_int_range, const bt_integer_range_signed *b_int_range)
Returns whether or not the signed integer range a_int_range is equal to b_int_range.
static const bt_integer_range_set * bt_integer_range_set_unsigned_as_range_set_const(const bt_integer_range_set_unsigned *int_range_set)
Upcasts the unsigned integer range set int_range_set to the abstract bt_integer_range_set type.
Definition integer-range-set.h:443
void bt_integer_range_set_unsigned_get_ref(const bt_integer_range_set_unsigned *int_range_set)
Increments the reference count of the unsigned integer range set int_range_set.
bt_integer_range_set_signed * bt_integer_range_set_signed_create(void)
Creates and returns an empty set of signed 64-bit integer ranges.
@ BT_INTEGER_RANGE_SET_ADD_RANGE_STATUS_MEMORY_ERROR
Out of memory.
Definition integer-range-set.h:289
@ BT_INTEGER_RANGE_SET_ADD_RANGE_STATUS_OK
Success.
Definition integer-range-set.h:283