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

Method FindLazyOverloadsByArity

runtime/function_registry.cc:178–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178std::vector<FunctionRegistry::LazyOverload>
179FunctionRegistry::FindLazyOverloadsByArity(absl::string_view name,
180 bool receiver_style,
181 size_t arity) const {
182 std::vector<FunctionRegistry::LazyOverload> matched_funcs;
183
184 auto overloads = functions_.find(name);
185 if (overloads == functions_.end()) {
186 return matched_funcs;
187 }
188
189 for (const auto& entry : overloads->second.lazy_overloads) {
190 if (entry.descriptor->receiver_style() == receiver_style &&
191 entry.descriptor->types().size() == arity) {
192 matched_funcs.push_back({*entry.descriptor, *entry.function_provider});
193 }
194 }
195
196 return matched_funcs;
197}
198
199absl::node_hash_map<std::string, std::vector<const cel::FunctionDescriptor*>>
200FunctionRegistry::ListFunctions() const {

Callers 1

FindLazyOverloadsMethod · 0.80

Calls 3

endMethod · 0.45
receiver_styleMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected