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

Method InsertFunction

runtime/activation.cc:116–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116bool Activation::InsertFunction(const cel::FunctionDescriptor& descriptor,
117 std::unique_ptr<cel::Function> impl) {
118 auto& overloads = functions_[descriptor.name()];
119 for (auto& overload : overloads) {
120 if (overload.descriptor->ShapeMatches(descriptor)) {
121 return false;
122 }
123 }
124 overloads.push_back(
125 {std::make_unique<FunctionDescriptor>(descriptor), std::move(impl)});
126 return true;
127}
128
129Activation::Activation(Activation&& other) {
130 using std::swap;

Callers 3

TESTFunction · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45

Calls 2

nameMethod · 0.45
ShapeMatchesMethod · 0.45

Tested by 3

TESTFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36