| 78 | } |
| 79 | |
| 80 | void Type::isEqual(libmexclass::proxy::method::Context& context) { |
| 81 | namespace mda = ::matlab::data; |
| 82 | |
| 83 | const mda::TypedArray<uint64_t> type_proxy_ids = context.inputs[0]; |
| 84 | |
| 85 | bool is_equal = true; |
| 86 | const auto check_metadata = false; |
| 87 | for (const auto& type_proxy_id : type_proxy_ids) { |
| 88 | // Retrieve the Type proxy from the ProxyManager |
| 89 | auto proxy = libmexclass::proxy::ProxyManager::getProxy(type_proxy_id); |
| 90 | auto type_proxy = std::static_pointer_cast<proxy::Type>(proxy); |
| 91 | auto type_to_compare = type_proxy->unwrap(); |
| 92 | |
| 93 | if (!data_type->Equals(type_to_compare, check_metadata)) { |
| 94 | is_equal = false; |
| 95 | break; |
| 96 | } |
| 97 | } |
| 98 | mda::ArrayFactory factory; |
| 99 | context.outputs[0] = factory.createScalar(is_equal); |
| 100 | } |
| 101 | } // namespace arrow::matlab::type::proxy |