- /** \brief Adds sub-feature of the higher level feature (sub-element of the sketch)
- * \param theFeature sub-feature
- */
- SKETCHPLUGIN_EXPORT virtual const void addSub(
- const boost::shared_ptr<ModelAPI_Feature>& theFeature) {}
-
- /** \brief Adds an object of the constraint. The object added by the reference.
- * \param[in] theAttrID identifier of the attribute
- * \param[in] theReference reference to the feature, which will be constrained
- */
- SKETCHPLUGIN_EXPORT virtual void addConstrainedObject(
- const std::string& theAttrID,
- const boost::shared_ptr<ModelAPI_AttributeReference>& theReference);
-
- /** \brief Adds an object of the constraint. The object added by the reference to its attribute.
- * \param[in] theAttrID identifier of the attribute
- * \param[in] theReference reference to the attribute feature, which will be constrained
- */
- SKETCHPLUGIN_EXPORT virtual void addConstrainedObject(
- const std::string& theAttrID,
- const boost::shared_ptr<ModelAPI_AttributeRefAttr>& theReference);
-
- /** \brief Prepares list of attributes of current sketch workplane
- * \param[out] theParams list of attributes
- */
- SKETCHPLUGIN_EXPORT void getSketchParameters(
- std::list< boost::shared_ptr<ModelAPI_Attribute> >& theParams);
+ /// List of constraint attributes
+ inline static const std::string& ATTRIBUTE(const int theNumber)
+ {
+ switch (theNumber) {
+ case 0:
+ return ENTITY_A();
+ case 1:
+ return ENTITY_B();
+ case 2:
+ return ENTITY_C();
+ case 3:
+ return ENTITY_D();
+ default:
+ break;
+ }
+ static const std::string EMPTY_STRING("");
+ return EMPTY_STRING;
+ }