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 * This base interface represents all types of features available in AuboScope
14 */
16{
17public:
20 virtual ~Feature();
21
22 /**
23 * Note: The feature can be renamed at any time
24 *
25 * @return The name of the feature
26 */
27 std::string getDisplayName();
28
29 /**
30 * Returns whether the position of the feature has been fully
31 * defined/specified.
32 *
33 * @return <code>true</code> if the feature is defined, <code>false</code>
34 * otherwise.
35 */
36 bool isDefined();
37
38 /**
39 * Returns whether the feature can be used as a variable in the program.
40 *
41 * @return <code>true</code> if the feature is variable, <code>false</code>
42 * otherwise.
43 */
44 bool isVariable();
45 bool isJoggable();
46
47 /**
48 * A feature cannot be guaranteed to be present in AuboScope. The end user
49 * can load a different installation (not containing the feature) or the
50 * feature can be removed by the end user or the AuboCap that added the
51 * feature. This method can be used to determine, if the feature is present.
52 *
53 * @return <code>true</code> if this feature is present in AuboScope,
54 * otherwise <code>false</code>.
55 */
57
58 /**
59 * Returns the Cartesian location of the feature
60 *
61 * @return A pose representing the Cartesian location of the feature
62 */
63 std::vector<double> getPose();
64
65 size_t hashCode();
66
67protected:
69
70private:
71 friend class DataSwitch;
72 void *d_{ nullptr };
73};
74
76{
77 bool operator()(FeaturePtr feature)
78 {
79 return feature && feature->isDefined();
80 }
81};
82
84{
85 bool operator()(FeaturePtr feature)
86 {
87 return feature && feature->isJoggable() && feature->isDefined();
88 }
89};
90
91} // namespace aubo_scope
92} // namespace arcs
93#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...
This base interface represents all types of features available in AuboScope
bool isResolvable()
A feature cannot be guaranteed to be present in AuboScope.
std::string getDisplayName()
Note: The feature can be renamed at any time
bool isDefined()
Returns whether the position of the feature has been fully defined/specified.
std::vector< double > getPose()
Returns the Cartesian location of the feature
bool isVariable()
Returns whether the feature can be used as a variable in the program.
bool operator()(FeaturePtr feature)
bool operator()(FeaturePtr feature)