MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / absl_nullable AsMutableMapValue

Function absl_nullable AsMutableMapValue

common/values/value_builder.cc:1365–1378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1363}
1364
1365const MutableMapValue* absl_nullable AsMutableMapValue(const Value& value) {
1366 if (auto custom_map_value = value.AsCustomMap(); custom_map_value) {
1367 NativeTypeId native_type_id = custom_map_value->GetTypeId();
1368 if (native_type_id == NativeTypeId::For<MutableMapValue>()) {
1369 return cel::internal::down_cast<const MutableMapValue*>(
1370 custom_map_value->interface());
1371 }
1372 if (native_type_id == NativeTypeId::For<MutableCompatMapValue>()) {
1373 return cel::internal::down_cast<const MutableCompatMapValue*>(
1374 custom_map_value->interface());
1375 }
1376 }
1377 return nullptr;
1378}
1379
1380const MutableMapValue* absl_nullable AsMutableMapValue(const MapValue& value) {
1381 if (auto custom_map_value = value.AsCustom(); custom_map_value) {

Callers

nothing calls this directly

Calls 4

AsCustomMapMethod · 0.45
GetTypeIdMethod · 0.45
interfaceMethod · 0.45
AsCustomMethod · 0.45

Tested by

no test coverage detected