Add C++ interface for the libbabeltrace2 `bt_integer_range_set_*` API
This patch adds C++ wrappers for Babeltrace 2 integer range set objects.
The four new available types are:
* `bt2::UnsignedIntegerRange`
* `bt2::ConstUnsignedIntegerRange`
* `bt2::SignedIntegerRange`
* `bt2::ConstSignedIntegerRange`
Implicitly convert from a mutable integer range set to a constant
integer range set with converting constructors and assignment operators.
All classes have the `Shared` type alias which is what the shared()
method returns. You can also implicitly convert from a shared mutable
integer range set to a shared constant integer range set.
The corresponding integer range type of any integer range set type `T`
is `T::Range`.
Borrow an integer range by index from the set with operator[]():
auto myRange = myRangeSet[3];
Get the number of integer ranges in the set with the size() method.
Compare compatible integer range sets with operator==() and
operator!=().
Create a shared integer range set with the static create() methods, for
example:
auto myRangeSet = bt2::SignedIntegerRangeSet::create();
Those methods can throw a `LibMemoryError` instance.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I14f00e9a020ec8f429bf632132e030ff4cc881a6
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4599
This page took 0.047113 seconds and 4 git commands to generate.