Salome HOME
Issue #1889 Amélioration des contraintes H et V (Filter horizontal and vertical segme...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Validators.h
index bc74e092b6d3bdb6de37becb7e93b255f2751a96..998d13d7d82d3bc089946631e519abf0dde18f42 100644 (file)
@@ -413,4 +413,24 @@ class SketchPlugin_ArcEndPointIntersectionValidator: public ModelAPI_AttributeVa
                        Events_InfoMessage& theError) const;
 };
 
+/**\class SketchPlugin_HasNoConstraint
+ * \ingroup Validators
+ * \brief Validator for checking whether the feature has constraint.
+ *
+ * Checks that feature of the attribute does not have constraint with some kinds.
+ * The kinds of constraints should be described in parameters of the validator
+ * Validator processes the ModelAPI_AttributeRefAttr attribute kind
+ */
+class SketchPlugin_HasNoConstraint: public ModelAPI_AttributeValidator
+{
+ public:
+  //! returns true if attribute is valid
+  //! \param theAttribute the checked attribute
+  //! \param theArguments arguments of the attribute
+  //! \param theError error message
+  virtual bool isValid(const AttributePtr& theAttribute,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
+};
+
 #endif