Fix: cpp-common/bt2: make QueryExecutor take ConstValue params
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 31 May 2024 16:32:14 +0000 (12:32 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
Query executors can take values of any kind, not specifically map
values.  From the doc [1]:

    Unlike the params parameter of the
    bt_graph_add_*_component_*_port_added_listener() functions (see
    Graph), this parameter does not need to be a map value.

Change `ConstMapValue` to `ConstValue`.

[1] https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-qexec.html#gafb5d324988c2870d66d96c1eeda6f87a

Change-Id: I370182c4aa5df8957c025f59018e359463674156
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12829
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2/query-executor.hpp

index b610b3fd9a7045b395fda0df2aea8a840157a819..5e8d51ab0a580c70cb64bcd3efcb2b99a7a5fab8 100644 (file)
@@ -63,7 +63,7 @@ public:
     }
 
     static Shared create(const ConstComponentClass compCls, const bt2c::CStringView objectName,
-                         const OptionalBorrowedObject<ConstMapValue> params = {})
+                         const OptionalBorrowedObject<ConstValue> params = {})
     {
         return CommonQueryExecutor::_create(compCls, objectName, params,
                                             static_cast<void *>(nullptr));
@@ -72,7 +72,7 @@ public:
     template <typename QueryDataT>
     static Shared create(const ConstComponentClass compCls, const bt2c::CStringView objectName,
                          QueryDataT& queryData,
-                         const OptionalBorrowedObject<ConstMapValue> params = {})
+                         const OptionalBorrowedObject<ConstValue> params = {})
     {
         return CommonQueryExecutor::_create(compCls, objectName, params, &queryData);
     }
@@ -101,7 +101,7 @@ public:
 private:
     template <typename QueryDataT>
     static Shared _create(const ConstComponentClass compCls, const bt2c::CStringView objectName,
-                          const OptionalBorrowedObject<ConstMapValue> params,
+                          const OptionalBorrowedObject<ConstValue> params,
                           QueryDataT * const queryData)
     {
         const auto libObjPtr = bt_query_executor_create_with_method_data(
This page took 0.024852 seconds and 4 git commands to generate.