cpp-common: Add Blob, StaticBlob, and DynamicBlob FC
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 11 Dec 2023 17:14:13 +0000 (12:14 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commit5b5b29dadb9aa657158fc8a2e2e790b95ae195e2
treec7e1b1a82d0d235afb77c8a62800f90e07228517
parent24f38be42faca902745fb710cc65390417ceddad
cpp-common: Add Blob, StaticBlob, and DynamicBlob FC

This commit copies the implementation of the static and dynamic array
field class wrappers.

The FieldClassType enum size is specified to 64 bits to accommodate for
enumerator value larger than 32 bits. (e.g.
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD)

Here is the clang++ error
In file included from ../../../../src/cpp-common/bt2/trace-ir.hpp:19:
  ../../../../src/cpp-common/bt2/field-class.hpp:170:20: error: enumerator value evaluates to 2684354560, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
      DynamicBlob = BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB,
                    ^
  ../../../../src/cpp-common/bt2/field-class.hpp:171:41: error: enumerator value evaluates to 6979321856, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
      DynamicBlobWithoutLengthField = BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD,
                                      ^
  ../../../../src/cpp-common/bt2/field-class.hpp:172:38: error: enumerator value evaluates to 11274289152, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
      DynamicBlobWithLengthField = BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITH_LENGTH_FIELD,
                                   ^

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I0a8f14e811e80ef71edbe1e20e2cfcfac1df80b3
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7620
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12703
Tested-by: jenkins <jenkins@lttng.org>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
src/cpp-common/bt2/field-class.hpp
src/cpp-common/bt2/trace-ir.hpp
This page took 0.024389 seconds and 4 git commands to generate.