Added a patch from Vitaly Stoyan

This commit is contained in:
Alexey Milovidov 2020-05-12 00:18:50 +03:00
parent caced89773
commit 4a142a44a0
2 changed files with 11 additions and 0 deletions

View File

@ -56,6 +56,15 @@ FunctionOverloadResolverImplPtr FunctionFactory::getImpl(
return res;
}
std::vector<std::string> FunctionFactory::getAllNames() const {
std::vector<std::string> res;
res.reserve(functions.size());
for (const auto& func : functions) {
res.emplace_back(func.first);
}
return res;
}
FunctionOverloadResolverPtr FunctionFactory::get(
const std::string & name,
const Context & context) const

View File

@ -39,6 +39,8 @@ public:
registerFunction(name, &Function::create, case_sensitiveness);
}
std::vector<std::string> getAllNames() const;
/// Throws an exception if not found.
FunctionOverloadResolverPtr get(const std::string & name, const Context & context) const;