1212
1313namespace libmexclass ::opentelemetry {
1414
15- BaggageProxy::BaggageProxy (const libmexclass::proxy::FunctionArguments& constructor_arguments)
16- {
15+ libmexclass::proxy::MakeResult BaggageProxy::make (const libmexclass::proxy::FunctionArguments& constructor_arguments) {
1716 size_t nin = constructor_arguments.getNumberOfElements ();
17+ nostd::shared_ptr<baggage_api::Baggage> baggage;
1818 if (nin == 1 ) {
1919 matlab::data::TypedArray<uint64_t > contextid_mda = constructor_arguments[0 ];
2020 libmexclass::proxy::ID contextid = contextid_mda[0 ];
2121
2222 context_api::Context ctxt = std::static_pointer_cast<ContextProxy>(
2323 libmexclass::proxy::ProxyManager::getProxy (contextid))->getInstance ();
24- CppBaggage = baggage_api::GetBaggage (ctxt);
24+ baggage = baggage_api::GetBaggage (ctxt);
2525 } else { // 2 inputs
2626 matlab::data::StringArray keys_mda = constructor_arguments[0 ];
2727 matlab::data::StringArray values_mda = constructor_arguments[1 ];
@@ -34,13 +34,9 @@ BaggageProxy::BaggageProxy(const libmexclass::proxy::FunctionArguments& construc
3434 static_cast <std::string>(values_mda[i])));
3535 }
3636
37- CppBaggage = nostd::shared_ptr<baggage_api::Baggage>(new baggage_api::Baggage (attrs));
37+ baggage = nostd::shared_ptr<baggage_api::Baggage>(new baggage_api::Baggage (attrs));
3838 }
39-
40- REGISTER_METHOD (BaggageProxy, getAllEntries);
41- REGISTER_METHOD (BaggageProxy, setEntries);
42- REGISTER_METHOD (BaggageProxy, deleteEntries);
43- REGISTER_METHOD (BaggageProxy, insertBaggage);
39+ return std::make_shared<BaggageProxy>(baggage);
4440}
4541
4642void BaggageProxy::getAllEntries (libmexclass::proxy::method::Context& context) {
0 commit comments