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

Method FindStaticOverloadsByArity

runtime/function_registry.cc:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138std::vector<cel::FunctionOverloadReference>
139FunctionRegistry::FindStaticOverloadsByArity(absl::string_view name,
140 bool receiver_style,
141 size_t arity) const {
142 std::vector<cel::FunctionOverloadReference> matched_funcs;
143
144 auto overloads = functions_.find(name);
145 if (overloads == functions_.end()) {
146 return matched_funcs;
147 }
148
149 for (const auto& overload : overloads->second.static_overloads) {
150 if (overload.descriptor->receiver_style() == receiver_style &&
151 overload.descriptor->types().size() == arity) {
152 matched_funcs.push_back({*overload.descriptor, *overload.implementation});
153 }
154 }
155
156 return matched_funcs;
157}
158
159std::vector<FunctionRegistry::LazyOverload> FunctionRegistry::FindLazyOverloads(
160 absl::string_view name, bool receiver_style,

Callers 1

FindOverloadsMethod · 0.80

Calls 3

endMethod · 0.45
receiver_styleMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected