Skip to content

Commit

Permalink
fix: Added firebolt header to the call-metrics (#201)
Browse files Browse the repository at this point in the history
* fix: Added firebolt header to the call-metrics

fix Added firebolt interface to the call-metrics to support Metrics methods

* fix: Update call-metrics.impl

Update call-metrics.impl

* fix: Update call-metrics

update call-metrics
  • Loading branch information
kdivya153 authored Jul 29, 2024
1 parent b34fff1 commit 1b3f261
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion languages/cpp/templates/imports/calls-metrics.impl
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include "metrics_impl.h"
#include "firebolt.h"

5 changes: 3 additions & 2 deletions languages/cpp/templates/methods/calls-metrics.cpp
Original file line number Diff line number Diff line change
@@ -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<void*>(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<void*>(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}
Expand Down

0 comments on commit 1b3f261

Please sign in to comment.