Turi Create
4.0
|
#include <model_server/lib/toolkit_function_registry.hpp>
Public Member Functions | |
bool | register_toolkit_function (toolkit_function_specification spec, std::string prefix="") |
bool | register_toolkit_function (std::vector< toolkit_function_specification > spec, std::string prefix="") |
bool | unregister_toolkit_function (std::string name) |
const toolkit_function_specification * | get_toolkit_function_info (std::string toolkit_fn_name) |
std::function< variant_type(const std::vector< variant_type > &)> | get_native_function (std::string name) |
std::function< variant_type(const std::vector< variant_type > &)> | get_native_function (const function_closure_info &name) |
std::vector< std::string > | available_toolkit_functions () |
Defines a collection of toolkits. Has the ability to add/register new toolkits, and get information about the toolkits.
Definition at line 19 of file toolkit_function_registry.hpp.
std::vector<std::string> turi::toolkit_function_registry::available_toolkit_functions | ( | ) |
Returns a list of names of all registered toolkits.
std::function<variant_type(const std::vector<variant_type>&)> turi::toolkit_function_registry::get_native_function | ( | std::string | name | ) |
Returns the natively callable version of a toolkit function if available. Raises an exception otherwise.
std::function<variant_type(const std::vector<variant_type>&)> turi::toolkit_function_registry::get_native_function | ( | const function_closure_info & | name | ) |
Returns the natively callable version of a toolkit function with closure information associated. Raises an exception otherwise.
const toolkit_function_specification* turi::toolkit_function_registry::get_toolkit_function_info | ( | std::string | toolkit_fn_name | ) |
Gets the complete specification infomation about a toolkit.
bool turi::toolkit_function_registry::register_toolkit_function | ( | toolkit_function_specification | spec, |
std::string | prefix = "" |
||
) |
Registers a toolkit specification. See toolkit_function_specification for details. After registration, information about the toolkit will be queryable via the other toolkit_function_registry function. unregister_toolkit_function will remove the toolkit from the registry.
bool turi::toolkit_function_registry::register_toolkit_function | ( | std::vector< toolkit_function_specification > | spec, |
std::string | prefix = "" |
||
) |
Registers a collection of toolkit specifications. See toolkit_function_specification for details. After registration, information about the toolkits will be queryable via the other toolkit_function_registry function. unregister_toolkit_function will remove the toolkit from the registry.
bool turi::toolkit_function_registry::unregister_toolkit_function | ( | std::string | name | ) |
Unregisters a previously registered toolkit.