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

Method ListFunctions

runtime/function_registry.cc:199–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199absl::node_hash_map<std::string, std::vector<const cel::FunctionDescriptor*>>
200FunctionRegistry::ListFunctions() const {
201 absl::node_hash_map<std::string, std::vector<const cel::FunctionDescriptor*>>
202 descriptor_map;
203
204 for (const auto& entry : functions_) {
205 std::vector<const cel::FunctionDescriptor*> descriptors;
206 const RegistryEntry& function_entry = entry.second;
207 descriptors.reserve(function_entry.static_overloads.size() +
208 function_entry.lazy_overloads.size());
209 for (const auto& entry : function_entry.static_overloads) {
210 descriptors.push_back(entry.descriptor.get());
211 }
212 for (const auto& entry : function_entry.lazy_overloads) {
213 descriptors.push_back(entry.descriptor.get());
214 }
215 descriptor_map[entry.first] = std::move(descriptors);
216 }
217
218 return descriptor_map;
219}
220
221bool FunctionRegistry::DescriptorRegistered(
222 const cel::FunctionDescriptor& descriptor) const {

Callers 6

TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by 6

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36