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

Method FindByName

base/operators.cc:179–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177#undef CEL_TERNARY_OPERATOR
178
179absl::optional<Operator> Operator::FindByName(absl::string_view input) {
180 absl::call_once(operators_once_flag, InitializeOperators);
181 if (input.empty()) {
182 return absl::nullopt;
183 }
184 auto it =
185 std::lower_bound(operators_by_name.cbegin(), operators_by_name.cend(),
186 input, OperatorDataNameComparer{});
187 if (it == operators_by_name.cend() || (*it)->name != input) {
188 return absl::nullopt;
189 }
190 return Operator(*it);
191}
192
193absl::optional<Operator> Operator::FindByDisplayName(absl::string_view input) {
194 absl::call_once(operators_once_flag, InitializeOperators);

Callers

nothing calls this directly

Calls 7

OperatorClass · 0.85
UnaryOperatorClass · 0.85
BinaryOperatorClass · 0.85
TernaryOperatorClass · 0.85
emptyMethod · 0.45
cbeginMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected