AuboStudio SDK 0.6.3

feature.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_FEATURE_H
2 #define AUBO_SCOPE_FEATURE_H
3
4 #include <vector>
5 #include <aubo_caps/class_forward.h>
6
7 namespace arcs {
8 namespace aubo_scope {
9
10 ARCS_CLASS_FORWARD(Feature);
11
12 /**
13 * This base interface represents all types of features available in AuboScope
14 */
15 class ARCS_ABI_EXPORT Feature
16 {
17 public:
18 Feature(Feature &f);
19 Feature(Feature &&f);
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 */
56 bool isResolvable();
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
67 protected:
68 Feature();
69
70 private:
71 friend class DataSwitch;
72 void *d_{ nullptr };
73 };
74
75 struct FeatureDefinedFilter
76 {
77 bool operator()(FeaturePtr feature)
78 {
79 return feature && feature->isDefined();
80 }
81 };
82
83 struct FeatureJoggableFilter
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
class_forward.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::Feature
This base interface represents all types of features available in AuboScope
Definition: feature.h:16
arcs::aubo_scope::Feature::isResolvable
bool isResolvable()
A feature cannot be guaranteed to be present in AuboScope.
arcs::aubo_scope::Feature::Feature
Feature()
arcs::aubo_scope::Feature::hashCode
size_t hashCode()
arcs::aubo_scope::Feature::getPose
std::vector< double > getPose()
Returns the Cartesian location of the feature
arcs::aubo_scope::Feature::getDisplayName
std::string getDisplayName()
Note: The feature can be renamed at any time
arcs::aubo_scope::Feature::isDefined
bool isDefined()
Returns whether the position of the feature has been fully defined/specified.
arcs::aubo_scope::Feature::Feature
Feature(Feature &f)
arcs::aubo_scope::Feature::isVariable
bool isVariable()
Returns whether the feature can be used as a variable in the program.
arcs::aubo_scope::Feature::~Feature
virtual ~Feature()
arcs::aubo_scope::Feature::isJoggable
bool isJoggable()
arcs::aubo_scope::Feature::Feature
Feature(Feature &&f)
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
arcs::aubo_scope::FeatureDefinedFilter
Definition: feature.h:76
arcs::aubo_scope::FeatureDefinedFilter::operator()
bool operator()(FeaturePtr feature)
Definition: feature.h:77
arcs::aubo_scope::FeatureJoggableFilter
Definition: feature.h:84
arcs::aubo_scope::FeatureJoggableFilter::operator()
bool operator()(FeaturePtr feature)
Definition: feature.h:85