cpp-common/bt2: add `CommonBlobField` and `CommonDynamicBlobField`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Dec 2023 20:38:33 +0000 (20:38 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commita613491dee7fb65d1a7d1a49f1d0363e49a19122
tree3f8a499064aa4fc82ffe110a9b0f60934e91b50a
parent116721c566f349e92884f990bc640bbf67033168
cpp-common/bt2: add `CommonBlobField` and `CommonDynamicBlobField`

Use `CommonBlobField::data()` to access the data pointer and data length
(bytes) of the BLOB field as a `bt2s::span`. A `BlobField::data()`
returns `bt2s::span<std::uint8_t>` while `ConstBlobField::data()`
returns `bt2s::span<const std::uint8_t>`.

Use `CommonDynamicBlobField::length()` to set the length of a dynamic
BLOB field (like `CommonDynamicArrayField::length()`).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I3d9f9417e262a5fbbc9b7bb8f3d690d6628f7988
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12713
src/cpp-common/bt2/field.hpp
This page took 0.024902 seconds and 4 git commands to generate.