| 170 | } |
| 171 | |
| 172 | void Array::exportToC(libmexclass::proxy::method::Context& context) { |
| 173 | namespace mda = ::matlab::data; |
| 174 | mda::StructArray opts = context.inputs[0]; |
| 175 | const mda::TypedArray<uint64_t> array_address_mda = opts[0]["ArrowArrayAddress"]; |
| 176 | const mda::TypedArray<uint64_t> schema_address_mda = opts[0]["ArrowSchemaAddress"]; |
| 177 | |
| 178 | auto arrow_array = reinterpret_cast<struct ArrowArray*>(uint64_t(array_address_mda[0])); |
| 179 | auto arrow_schema = |
| 180 | reinterpret_cast<struct ArrowSchema*>(uint64_t(schema_address_mda[0])); |
| 181 | |
| 182 | MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT( |
| 183 | arrow::ExportArray(*array, arrow_array, arrow_schema), context, |
| 184 | error::C_EXPORT_FAILED); |
| 185 | } |
| 186 | |
| 187 | void Array::validate(libmexclass::proxy::method::Context& context) { |
| 188 | namespace mda = ::matlab::data; |
nothing calls this directly
no test coverage detected