#include <model_server/lib/extensions/model_base.hpp>
Explicitly implemented proxy object.
Definition at line 262 of file model_base.hpp.
◆ call_function()
variant_type turi::model_base::call_function |
( |
const std::string & |
function, |
|
|
variant_map_type |
argument |
|
) |
| |
|
inherited |
Calls a user defined function.
◆ get_docstring()
const std::string& turi::model_base::get_docstring |
( |
const std::string & |
symbol | ) |
|
|
inherited |
Returns the toolkit documentation for a function or property.
◆ get_property()
variant_type turi::model_base::get_property |
( |
const std::string & |
property | ) |
|
|
inherited |
◆ get_version()
virtual size_t turi::model_proxy::get_version |
( |
| ) |
const |
|
inlinevirtual |
Returns the current version of the toolkit class for this instance, for serialization purposes.
Reimplemented from turi::model_base.
Definition at line 284 of file model_base.hpp.
◆ list_functions()
const std::map<std::string, std::vector<std::string> >& turi::model_base::list_functions |
( |
| ) |
|
|
inherited |
Lists all the registered functions. Returns a map of function name to array of argument names for the function.
◆ list_get_properties()
const std::vector<std::string>& turi::model_base::list_get_properties |
( |
| ) |
|
|
inherited |
Lists all the get-table properties of the class.
◆ list_set_properties()
const std::vector<std::string>& turi::model_base::list_set_properties |
( |
| ) |
|
|
inherited |
Lists all the set-table properties of the class.
◆ load_version()
void turi::model_proxy::load_version |
( |
iarchive & |
iarc, |
|
|
size_t |
version |
|
) |
| |
|
inlinevirtual |
Loads a model previously saved at a particular version number. Should raise an exception on failure.
Reimplemented from turi::model_base.
Definition at line 307 of file model_base.hpp.
◆ name()
virtual const char* turi::model_base::name |
( |
| ) |
|
|
pure virtualinherited |
Returns the name of the toolkit class, as exposed to client code. For example, the Python proxy for this instance will have a type with this name.
Note: this function is typically overridden using the BEGIN_CLASS_MEMBER_REGISTRATION macro.
◆ perform_registration()
void turi::model_proxy::perform_registration |
( |
| ) |
|
|
inlinevirtual |
Declare the base registration function. This class has to be handled specially; the macros don't work here due to the override declarations.
Reimplemented from turi::model_base.
Definition at line 291 of file model_base.hpp.
◆ register_defaults()
void turi::model_base::register_defaults |
( |
const std::string & |
fnname, |
|
|
const variant_map_type & |
arguments |
|
) |
| |
|
protectedinherited |
Registers default argument values
◆ register_docstring()
void turi::model_base::register_docstring |
( |
const std::pair< std::string, std::string > & |
fnname_docstring | ) |
|
|
protectedinherited |
Adds a docstring for the specified function or property name.
◆ register_function()
void turi::model_base::register_function |
( |
std::string |
fnname, |
|
|
const std::vector< std::string > & |
arguments, |
|
|
impl_fn |
fn |
|
) |
| |
|
protectedinherited |
Adds a function with the specified name, and argument list.
◆ register_getter()
void turi::model_base::register_getter |
( |
const std::string & |
propname, |
|
|
impl_fn |
getfn |
|
) |
| |
|
protectedinherited |
Adds a property getter with the specified name.
◆ register_setter()
void turi::model_base::register_setter |
( |
const std::string & |
propname, |
|
|
impl_fn |
setfn |
|
) |
| |
|
protectedinherited |
Adds a property setter with the specified name.
◆ save_impl()
virtual void turi::model_proxy::save_impl |
( |
oarchive & |
oarc | ) |
const |
|
inlinevirtual |
◆ save_model_to_data()
void turi::model_base::save_model_to_data |
( |
std::ostream & |
out | ) |
|
|
inherited |
Save a toolkit class to a data stream.
◆ save_to_url()
void turi::model_base::save_to_url |
( |
const std::string & |
url, |
|
|
const variant_map_type & |
side_data = {} |
|
) |
| |
|
inherited |
Save a toolkit class to disk.
- Parameters
-
url | The destination url to store the class. |
sidedata | Any additional side information |
◆ set_property()
variant_type turi::model_base::set_property |
( |
const std::string & |
property, |
|
|
variant_map_type |
argument |
|
) |
| |
|
inherited |
Sets a property. The new value of the property should appear in the argument map under the key "value".
◆ uid()
const std::string& turi::model_proxy::uid |
( |
| ) |
|
|
inlinevirtual |
Returns a unique identifier for the toolkit class. It can be any unique ID. The UID is only used at runtime (to determine the concrete type of an arbitrary model_base instance) and is never stored.
Note: this function is typically overridden using the BEGIN_CLASS_MEMBER_REGISTRATION macro.
Implements turi::model_base.
Definition at line 288 of file model_base.hpp.
The documentation for this class was generated from the following file: