AuboStudio SDK  0.6.3
variable_factory.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_VARIABLE_FACTORY_H
2#define AUBO_SCOPE_VARIABLE_FACTORY_H
3
7
8namespace arcs {
9namespace aubo_scope {
11
12/**
13 * @ingroup ApplicationApi
14 * <p>
15 * This interface supplies methods to create variable objects.
16 * </p>
17 *
18 * <b>NOTE:</b> Only use this functionality in a AuboCap program node (not
19 * relevant for an installation node).
20 */
22{
23public:
27
28 /**
29 * @ingroup VariableFactory
30 * \chinese
31 * <p>
32 * 创建全局变量。在AuboScope中注册后将对所有程序节点可见。
33 * </p>
34 * @param suggested_name 建议的变量名称。
35 * @return GlobalVariable。
36 * @throws VariableException 名称非法时抛出。
37 * \endchinese
38 * \english
39 * <p>
40 * Creates a global variable. Registering the variable in AuboScope (by
41 * storing it in a {@link DataModel} instance or using it for the
42 * configuration of a built-in AuboScope program node) will make it
43 * accessible to all program nodes.
44 * </p>
45 *
46 * @param suggested_name Suggested name of the variable.
47 * @return GlobalVariable.
48 * @throws VariableException In case of an illegal name.
49 * \endenglish
50 */
51 GlobalVariablePtr createGlobalVariable(const std::string &suggested_name);
52
53 /**
54 * @ingroup VariableFactory
55 * \chinese
56 * <p>创建带初始值的全局变量。</p>
57 * @param suggested_name 建议的变量名称。
58 * @param initialValue 初始化表达式。
59 * @return GlobalVariable。
60 * \endchinese
61 * \english
62 * <p>
63 * Creates a global variable with an initial value.
64 * </p>
65 * @param suggested_name Suggested name of the variable.
66 * @param initialValue The expression that will be evaluated in order to
67 * initialize the value of the variable.
68 * @return GlobalVariable.
69 * @throws VariableException In case of an illegal name.
70 * \endenglish
71 */
72 GlobalVariablePtr createGlobalVariable(const std::string &suggested_name,
73 ExpressionPtr initialValue);
74
75 /**
76 * @ingroup VariableFactory
77 * \chinese
78 * <p>创建特征变量。</p>
79 * @param suggested_name 建议的变量名称。
80 * @param pose 特征的位姿。
81 * @return FeatureVariable。
82 * @throws VariableException 名称非法时抛出。
83 * \endchinese
84 * \english
85 * <p>
86 * Creates a feature variable.
87 * </p>
88 * @param suggested_name Suggested name of the variable.
89 * @param pose the pose of the feature.
90 * @return FeatureVariable.
91 * @throws VariableException In case of an illegal name.
92 * \endenglish
93 */
94 FeatureVariablePtr createFeatureVariable(const std::string &suggested_name,
95 const std::vector<double> &pose);
96
97private:
98 friend class DataSwitch;
100 void *d_{ nullptr };
101};
102
103} // namespace aubo_scope
104} // namespace arcs
105#endif // AUBO_SCOPE_VARIABLE_FACTORY_H
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
GlobalVariablePtr createGlobalVariable(const std::string &suggested_name)
\chinese
FeatureVariablePtr createFeatureVariable(const std::string &suggested_name, const std::vector< double > &pose)
\chinese
VariableFactory(VariableFactory &f)
GlobalVariablePtr createGlobalVariable(const std::string &suggested_name, ExpressionPtr initialValue)
\chinese
VariableFactory(VariableFactory &&f)