cpp-common/bt2: `CompClsBridge`: pass init method data to user component constructors
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 15 Feb 2024 03:12:39 +0000 (22:12 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 19 Feb 2024 18:10:15 +0000 (13:10 -0500)
commite66071f3c17583e8964d2f09845858720d9a5478
tree38c673d0d7479b75aad5fee42eca3396345633c2
parent06bb401ef3396a35fe5f43cf44217ed078b862c8
cpp-common/bt2: `CompClsBridge`: pass init method data to user component constructors

Make `CompClsBridge::init` pass the initialization method data (received
from the lib as a `void *`) down to the user component's constructor.

For convenience, user component classes can specify the type of the data
they expect to receive as a template parameter, sparing them of doing a
static_cast.  This template parameter can be omitted, in which case it
defaults to `void`.

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