AuboStudio SDK  0.6.3
feature_model.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_FEATURE_MODEL_H
2#define AUBO_SCOPE_FEATURE_MODEL_H
3
4#include <vector>
5#include <functional>
7
8namespace arcs {
9namespace aubo_scope {
10
12
13/**
14 * @ingroup ApplicationApi
15 * \chinese
16 * 特征模型
17 * 提供从当前机器人安装中获取特征的方法。
18 * \endchinese
19 * \english
20 * FeatureModel
21 * Provides methods that returns features from the current robot installation.
22 * \endenglish
23 */
25{
26public:
30
31 std::vector<FeaturePtr> getAll();
32
33 /**
34 * @ingroup FeatureModel
35 * \chinese
36 * 获取当前安装中的几何特征
37 * @return 几何特征集合。
38 * \endchinese
39 * \english
40 * Returns the geometric features of the current installation.
41 * @return the geometric features of the current installation.
42 * \endenglish
43 */
44 template <typename T>
45 std::vector<FeaturePtr> getGeomFeture();
46
47 /**
48 * @ingroup FeatureModel
49 * \chinese
50 * 根据名称获取特征
51 * @param name 特征名称。
52 * @return 对应名称的特征。
53 * \endchinese
54 * \english
55 * Returns a feature by name.
56 * @param name the name of the feature.
57 * @return the feature with the given name.
58 * \endenglish
59 */
60 FeaturePtr getByName(const std::string &name);
61
62 /**
63 * @ingroup FeatureModel
64 * \chinese
65 * 获取当前安装的基础特征
66 * @return 基础特征。
67 * \endchinese
68 * \english
69 * Returns the base feature of the current installation.
70 * @return the base feature of the current installation.
71 * \endenglish
72 */
73 FeaturePtr getBaseFeature();
74
75 /**
76 * @ingroup FeatureModel
77 * \chinese
78 * 获取当前安装的工具特征
79 * @return 工具特征。
80 * \endchinese
81 * \english
82 * Returns the tool feature of the current installation.
83 * @return the tool feature of the current installation.
84 * \endenglish
85 */
86 FeaturePtr getToolFeature();
87
88 /**
89 * @ingroup FeatureModel
90 * \chinese
91 * 根据过滤器获取特征列表
92 * @param filter 过滤条件。
93 * @return 满足过滤条件的特征集合。
94 * \endchinese
95 * \english
96 * Returns features matching the given filter.
97 * @param filter the filter to apply.
98 * @return a collection of features that match the filter.
99 * \endenglish
100 */
101 std::vector<FeaturePtr> getFeatures(std::function<bool(FeaturePtr)> filter);
102
103private:
104 friend class DataSwitch;
106 void *d_{ nullptr };
107};
108
109} // namespace aubo_scope
110} // namespace arcs
111
112#endif // AUBO_SCOPE_FEATURE_MODEL_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...
\chinese 特征模型 提供从当前机器人安装中获取特征的方法。 \endchinese \english FeatureModel Provides methods that returns fea...
FeaturePtr getByName(const std::string &name)
\chinese 根据名称获取特征
std::vector< FeaturePtr > getFeatures(std::function< bool(FeaturePtr)> filter)
\chinese 根据过滤器获取特征列表
std::vector< FeaturePtr > getAll()
FeatureModel(FeatureModel &&f)
FeaturePtr getBaseFeature()
\chinese 获取当前安装的基础特征
FeaturePtr getToolFeature()
\chinese 获取当前安装的工具特征
std::vector< FeaturePtr > getGeomFeture()
\chinese 获取当前安装中的几何特征