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

Function RegisterListFlattenFunction

extensions/lists_functions.cc:494–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494absl::Status RegisterListFlattenFunction(FunctionRegistry& registry) {
495 CEL_RETURN_IF_ERROR(
496 (BinaryFunctionAdapter<absl::StatusOr<Value>, const ListValue&,
497 int64_t>::RegisterMemberOverload("flatten",
498 &ListFlatten,
499 registry)));
500 CEL_RETURN_IF_ERROR(
501 (UnaryFunctionAdapter<absl::StatusOr<Value>, const ListValue&>::
502 RegisterMemberOverload(
503 "flatten",
504 [](const ListValue& list,
505 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
506 google::protobuf::MessageFactory* absl_nonnull message_factory,
507 google::protobuf::Arena* absl_nonnull arena) {
508 return ListFlatten(list, 1, descriptor_pool, message_factory,
509 arena);
510 },
511 registry)));
512 return absl::OkStatus();
513}
514
515absl::Status RegisterListRangeFunction(FunctionRegistry& registry) {
516 return UnaryFunctionAdapter<absl::StatusOr<Value>,

Callers 1

RegisterListsFunctionsFunction · 0.85

Calls 1

ListFlattenFunction · 0.85

Tested by

no test coverage detected