cpp-common/bt2: `User*Component`: pass query method data to user `_query` methods
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 13 Feb 2024 17:13:01 +0000 (12:13 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 19 Feb 2024 18:10:15 +0000 (13:10 -0500)
commite76d65f0175477918bee554e622155366e1f2d24
tree614105210dba1ae20461a20f8569805649c2ccb7
parente66071f3c17583e8964d2f09845858720d9a5478
cpp-common/bt2: `User*Component`: pass query method data to user `_query` methods

Make `User*Component::query()` pass down the query method data down to
user methods.

Child classes of `UserSourceComponent`, `UserFilterComponent` and
`UserSinkComponent` can pass a template parameter to indicate the type
of query method data they wish to receive.

`UserComponent` defines a `QueryData` public member using the type
received as a template parameter.  `CompClsBridge::query` uses this type
to cast the query method data, received from the lib as a `void *`, to
that type.

Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: If9f776dbaa723dd65391e3ea57c3067f53f52dc4
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11788
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2/plugin-dev.hpp
This page took 0.024605 seconds and 4 git commands to generate.