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

Method FindStaticOverloads

runtime/function_registry.cc:118–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118std::vector<cel::FunctionOverloadReference>
119FunctionRegistry::FindStaticOverloads(absl::string_view name,
120 bool receiver_style,
121 absl::Span<const cel::Kind> types) const {
122 std::vector<cel::FunctionOverloadReference> matched_funcs;
123
124 auto overloads = functions_.find(name);
125 if (overloads == functions_.end()) {
126 return matched_funcs;
127 }
128
129 for (const auto& overload : overloads->second.static_overloads) {
130 if (overload.descriptor->ShapeMatches(receiver_style, types)) {
131 matched_funcs.push_back({*overload.descriptor, *overload.implementation});
132 }
133 }
134
135 return matched_funcs;
136}
137
138std::vector<cel::FunctionOverloadReference>
139FunctionRegistry::FindStaticOverloadsByArity(absl::string_view name,

Callers 8

TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TestDispatchToFunctionFunction · 0.45
TESTFunction · 0.45

Calls 2

endMethod · 0.45
ShapeMatchesMethod · 0.45

Tested by 7

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TestDispatchToFunctionFunction · 0.36
TESTFunction · 0.36