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

Function absl_nullable AsMutableListValue

common/values/value_builder.cc:555–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555const MutableListValue* absl_nullable AsMutableListValue(const Value& value) {
556 if (auto custom_list_value = value.AsCustomList(); custom_list_value) {
557 NativeTypeId native_type_id = custom_list_value->GetTypeId();
558 if (native_type_id == NativeTypeId::For<MutableListValue>()) {
559 return cel::internal::down_cast<const MutableListValue*>(
560 custom_list_value->interface());
561 }
562 if (native_type_id == NativeTypeId::For<MutableCompatListValue>()) {
563 return cel::internal::down_cast<const MutableCompatListValue*>(
564 custom_list_value->interface());
565 }
566 }
567 return nullptr;
568}
569
570const MutableListValue* absl_nullable AsMutableListValue(
571 const ListValue& value) {

Callers

nothing calls this directly

Calls 4

AsCustomListMethod · 0.45
GetTypeIdMethod · 0.45
interfaceMethod · 0.45
AsCustomMethod · 0.45

Tested by

no test coverage detected