diff --git a/languages/cpp/templates/imports/calls-metrics.impl b/languages/cpp/templates/imports/calls-metrics.impl index 75fd87c6..693dc63a 100644 --- a/languages/cpp/templates/imports/calls-metrics.impl +++ b/languages/cpp/templates/imports/calls-metrics.impl @@ -1 +1,2 @@ -#include "metrics_impl.h" +#include "firebolt.h" + diff --git a/languages/cpp/templates/methods/calls-metrics.cpp b/languages/cpp/templates/methods/calls-metrics.cpp index 1b6765c6..9c508c55 100644 --- a/languages/cpp/templates/methods/calls-metrics.cpp +++ b/languages/cpp/templates/methods/calls-metrics.cpp @@ -1,6 +1,7 @@ /* ${method.name} - ${method.description} */ - static void ${method.name}Dispatcher(const void* result) { - Metrics::MetricsImpl::${method.name}(${if.result.nonboolean}${if.result.nonvoid}(static_cast<${method.result.json.type}>(const_cast(result)))${end.if.result.nonvoid}${end.if.result.nonboolean}); + static void ${method.name}Dispatcher(const void* result) { + // Accessing Metrics methods using singleton Instance + Firebolt::IFireboltAccessor::Instance().MetricsInterface().${method.name}(${if.result.nonboolean}${if.result.nonvoid}(static_cast<${method.result.json.type}>(const_cast(result)))${end.if.result.nonvoid}${end.if.result.nonboolean}); } /* ${method.name} - ${method.description} */ ${method.signature.result} ${info.Title}Impl::${method.name}( ${method.signature.params}${if.params}, ${end.if.params}Firebolt::Error *err ) ${if.result.nonvoid}${if.params.empty} const${end.if.params.empty}${end.if.result.nonvoid}