MCPcopy Create free account
hub / github.com/apache/arrow / make

Method make

matlab/src/cpp/arrow/matlab/type/proxy/field.cc:57–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57libmexclass::proxy::MakeResult Field::make(
58 const libmexclass::proxy::FunctionArguments& constructor_arguments) {
59 namespace mda = ::matlab::data;
60 using FieldProxy = arrow::matlab::type::proxy::Field;
61
62 mda::StructArray opts = constructor_arguments[0];
63 const mda::StringArray name_mda = opts[0]["Name"];
64 const mda::TypedArray<uint64_t> type_proxy_id_mda = opts[0]["TypeProxyID"];
65
66 const std::u16string& name_utf16 = name_mda[0];
67 MATLAB_ASSIGN_OR_ERROR(const auto name, arrow::util::UTF16StringToUTF8(name_utf16),
68 error::UNICODE_CONVERSION_ERROR_ID);
69
70 auto proxy = std::static_pointer_cast<type::proxy::Type>(
71 libmexclass::proxy::ProxyManager::getProxy(type_proxy_id_mda[0]));
72 auto type = proxy->unwrap();
73 auto field = arrow::field(name, type);
74 return std::make_shared<FieldProxy>(std::move(field));
75}
76
77} // namespace arrow::matlab::type::proxy

Callers

nothing calls this directly

Calls 2

fieldFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected