cpp-common/bt2: make `getSupportedMipVersions` methods take a `ConstMapValue`
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 13 Mar 2024 04:14:36 +0000 (00:14 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
The "get_supported_mip_versions" component class methods always receive
a map value.  The equivalent methods in the C++ bindings should
therefore take a `ConstMapValue.

Change-Id: Ia3ba17048337d3abb72cefa2ae88c7b3187833f2
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12048
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2/component-class-dev.hpp
src/cpp-common/bt2/internal/comp-cls-bridge.hpp

index d7a46edd8dd9f46ba9f466e15ae5cc68a8a437b4..b89ac6b24305fa95b6eda6339138acff04d317c4 100644 (file)
@@ -131,7 +131,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -152,7 +152,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
@@ -235,7 +235,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -262,7 +262,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
@@ -362,7 +362,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -393,7 +393,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
index 6b16e733a38aa3bce63b6c30ee0e8d7adbdd0805..a9474b95220efaafe7f79bdd417b20936d83e691 100644 (file)
@@ -92,9 +92,9 @@ public:
                             bt_integer_range_set_unsigned * const libSupportedVersionsPtr) noexcept
     {
         try {
-            UserCompClsT::getSupportedMipVersions(wrap(libSelfCompClsPtr), wrap(libParamsPtr),
-                                                  static_cast<LoggingLevel>(logLevel),
-                                                  wrap(libSupportedVersionsPtr));
+            UserCompClsT::getSupportedMipVersions(
+                wrap(libSelfCompClsPtr), wrap(libParamsPtr).asMap(),
+                static_cast<LoggingLevel>(logLevel), wrap(libSupportedVersionsPtr));
             return BT_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_STATUS_OK;
         } catch (const std::bad_alloc&) {
             return BT_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_STATUS_MEMORY_ERROR;
This page took 0.027848 seconds and 4 git commands to generate.