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

Method make

matlab/src/cpp/arrow/matlab/type/proxy/struct_type.cc:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25 : Type(std::move(struct_type)) {}
26
27libmexclass::proxy::MakeResult StructType::make(
28 const libmexclass::proxy::FunctionArguments& constructor_arguments) {
29 namespace mda = ::matlab::data;
30 using StructTypeProxy = arrow::matlab::type::proxy::StructType;
31
32 mda::StructArray args = constructor_arguments[0];
33 const mda::TypedArray<uint64_t> field_proxy_ids_mda = args[0]["FieldProxyIDs"];
34
35 std::vector<std::shared_ptr<arrow::Field>> fields;
36 fields.reserve(field_proxy_ids_mda.getNumberOfElements());
37 for (const auto proxy_id : field_proxy_ids_mda) {
38 using namespace libmexclass::proxy;
39 auto proxy = std::static_pointer_cast<proxy::Field>(ProxyManager::getProxy(proxy_id));
40 auto field = proxy->unwrap();
41 fields.push_back(field);
42 }
43
44 auto struct_type = std::static_pointer_cast<arrow::StructType>(arrow::struct_(fields));
45 return std::make_shared<StructTypeProxy>(std::move(struct_type));
46}
47} // namespace arrow::matlab::type::proxy

Callers

nothing calls this directly

Calls 4

struct_Function · 0.85
push_backMethod · 0.80
reserveMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected