AuboStudio SDK  0.6.3
feature.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_FEATURE_H
2#define AUBO_SCOPE_FEATURE_H
3
4#include <vector>
6
7namespace arcs {
8namespace aubo_scope {
9
11
12/**
13 * \chinese
14 * 特征接口
15 * 此基础接口表示 AuboScope 中所有可用的特征类型。
16 * \endchinese
17 * \english
18 * Feature
19 * This base interface represents all types of features available in AuboScope.
20 * \endenglish
21 */
23{
24public:
27 virtual ~Feature();
28
29 /**
30 * \chinese
31 * 获取特征的显示名称。注意:特征可随时被重命名。
32 * @return 特征名称。
33 * \endchinese
34 * \english
35 * Note: The feature can be renamed at any time.
36 * @return The name of the feature.
37 * \endenglish
38 */
39 std::string getDisplayName();
40
41 /**
42 * \chinese
43 * 返回特征的位置是否已完全定义/指定。
44 * @return 如果特征已定义返回<code>true</code>,否则返回<code>false</code>。
45 * \endchinese
46 * \english
47 * Returns whether the position of the feature has been fully
48 * defined/specified.
49 *
50 * @return <code>true</code> if the feature is defined, <code>false</code>
51 * otherwise.
52 * \endenglish
53 */
54 bool isDefined();
55
56 /**
57 * \chinese
58 * 返回特征是否可作为变量在程序中使用。
59 * @return 如果特征可作为变量使用返回<code>true</code>,否则返回<code>false</code>。
60 * \endchinese
61 * \english
62 * Returns whether the feature can be used as a variable in the program.
63 *
64 * @return <code>true</code> if the feature is variable, <code>false</code>
65 * otherwise.
66 * \endenglish
67 */
68 bool isVariable();
69 bool isJoggable();
70
71 /**
72 * \chinese
73 * 特征无法保证始终存在于AuboScope中。终端用户可以加载不包含该特征的不同安装,
74 * 或者终端用户或添加该特征的AuboCap可以将其移除。此方法用于判断特征是否存在。
75 * @return 如果此特征存在于AuboScope中返回<code>true</code>,否则返回
76 * <code>false</code>。
77 * \endchinese
78 * \english
79 * A feature cannot be guaranteed to be present in AuboScope. The end user
80 * can load a different installation (not containing the feature) or the
81 * feature can be removed by the end user or the AuboCap that added the
82 * feature. This method can be used to determine, if the feature is present.
83 *
84 * @return <code>true</code> if this feature is present in AuboScope,
85 * otherwise <code>false</code>.
86 * \endenglish
87 */
89
90 /**
91 * \chinese
92 * 返回特征的笛卡尔位置。
93 * @return 表示特征笛卡尔位置的位姿。
94 * \endchinese
95 * \english
96 * Returns the Cartesian location of the feature.
97 * @return A pose representing the Cartesian location of the feature.
98 * \endenglish
99 */
100 std::vector<double> getPose();
101
102 size_t hashCode();
103
104protected:
106
107private:
108 friend class DataSwitch;
109 void *d_{ nullptr };
110};
111
113{
114 bool operator()(FeaturePtr feature)
115 {
116 return feature && feature->isDefined();
117 }
118};
119
121{
122 bool operator()(FeaturePtr feature)
123 {
124 return feature && feature->isJoggable() && feature->isDefined();
125 }
126};
127
128} // namespace aubo_scope
129} // namespace arcs
130#endif
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
\chinese 特征接口 此基础接口表示 AuboScope 中所有可用的特征类型。 \endchinese \english Feature This base interface represen...
bool isResolvable()
\chinese 特征无法保证始终存在于AuboScope中。终端用户可以加载不包含该特征的不同安装, 或者终端用户或添加该特征的AuboCap可以将其移除。此方法用于判断特征是否存在。
std::string getDisplayName()
\chinese 获取特征的显示名称。注意:特征可随时被重命名。
bool isDefined()
\chinese 返回特征的位置是否已完全定义/指定。
std::vector< double > getPose()
\chinese 返回特征的笛卡尔位置。
bool isVariable()
\chinese 返回特征是否可作为变量在程序中使用。
bool operator()(FeaturePtr feature)