src/cpp-common/bt2: add field location support
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 8 Dec 2023 18:50:58 +0000 (18:50 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commitc52879364e32e2c342e6df6231c7b44efe43173f
treedeafa60aabe60e94c642e4971192791bebbc25f6
parent6e082c859ae60cb521664a131aba012d5864219b
src/cpp-common/bt2: add field location support

This patch adds the `bt2::ConstFieldLocation` wrapper class as well as
bt2::TraceClass::createFieldLocation().

I didn't implement a `bt2::CommonFieldLocation` template class because a
field location is immutable anyway, so we only need the const version.
bt2::TraceClass::createFieldLocation() returns a shared const field
location.

bt2::TraceClass::createFieldLocation() accepts a span of strings (either
`const char * const` or `const std::string`) to make the interface a
little nicer than a raw array of `const char *` and a matching size.
Creating a field location is a slow-path operation anyway.

Also adding bt2::wrap() accepting `const bt_field_location *`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I160052c5a787114b52062aa87908c94a2af40f32
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8016
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12699
src/Makefile.am
src/cpp-common/bt2/field-location.hpp [new file with mode: 0644]
src/cpp-common/bt2/trace-ir.hpp
src/cpp-common/bt2/wrap.hpp
This page took 0.02414 seconds and 4 git commands to generate.