cpp-common/bt2: add component class creation methods
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Feb 2024 20:00:59 +0000 (15:00 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 19 Feb 2024 18:10:15 +0000 (13:10 -0500)
commitee137c4e4bca141db9d2cca32e3ac9b42c1ac52b
treee20f7d00ce59d2ee01f8624b3633645b820e4765
parentcb0369458c84a18946db78af09d403a43d5df26e
cpp-common/bt2: add component class creation methods

Add `create()` methods to `CommonSourceComponentClass`,
`CommonFilterComponentClass` and `CommonSinkComponentClass`, allowing
the user to create component classes at run time from some class that
derives from `UserSourceComponent`, `UserFilterComponent` and
`UserSinkComponent`.

The user component class (`UserComponentT`) must provide a static member
`name` of type `const char *`.  It can also provide static members named
`description` and `help`, also of type `const char *`.

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