Turi Create
4.0
toolkit_function_invocation.hpp
1
/* Copyright © 2017 Apple Inc. All rights reserved.
2
*
3
* Use of this source code is governed by a BSD-3-clause license that can
4
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5
*/
6
#ifndef TURI_UNITY_TOOLKIT_INVOCATION_HPP
7
#define TURI_UNITY_TOOLKIT_INVOCATION_HPP
8
#include <string>
9
#include <functional>
10
#include <model_server/lib/variant.hpp>
11
#include <model_server/lib/toolkit_class_registry.hpp>
12
namespace
turi
{
13
14
/**
15
* \ingroup unity
16
* The arguments used to invoke the toolkit execution.
17
* See \ref toolkit_function_specification for details.
18
*/
19
struct
toolkit_function_invocation
{
20
toolkit_function_invocation
() {
21
progress
= [=](std::string s) {
22
logstream
(
LOG_INFO
) <<
"PROGRESS: "
<< s << std::endl;
23
};
24
}
25
/**
26
* The parameters passed to the toolkit from the user.
27
* The options set will be cleaned: every option in
28
* \ref toolkit_function_specification::default_options will show appear here,
29
* and there will not be extraneous options.
30
*/
31
variant_map_type
params
;
32
33
/**
34
* A pointer to a function which prints execution progress.
35
*/
36
std::function<void(std::string)>
progress
;
37
38
/**
39
* A pointer to the class registry.
40
*/
41
toolkit_class_registry
*
classes
;
42
};
43
44
}
45
46
#endif
logstream
#define logstream(lvl)
Definition:
logger.hpp:276
turi::toolkit_function_invocation::params
variant_map_type params
Definition:
toolkit_function_invocation.hpp:31
turi::toolkit_function_invocation::classes
toolkit_class_registry * classes
Definition:
toolkit_function_invocation.hpp:41
LOG_INFO
#define LOG_INFO
Definition:
logger.hpp:101
turi::toolkit_class_registry
Definition:
toolkit_class_registry.hpp:17
turi::toolkit_function_invocation
Definition:
toolkit_function_invocation.hpp:19
turi
SKD.
Definition:
capi_initialization.hpp:11
turi::toolkit_function_invocation::progress
std::function< void(std::string)> progress
Definition:
toolkit_function_invocation.hpp:36
model_server
lib
toolkit_function_invocation.hpp
Generated by
1.8.13