//! 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,
std::string& theError) const;
//! 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,
std::string& theError) const;
};
-/**\class SketchPlugin_NotFixed
+/**\class SketchPlugin_NotFixedValidator
* \ingroup Validators
* \brief Validator for the rigid constraint input.
*
//! returns true if attribute is not used in another rigid constraint
//! \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,
std::string& theError) const;
//! 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,
std::string& theError) const;
//! returns true if attribute is valid
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute (not used)
+ //! \param theError error message
virtual bool isValid(const AttributePtr& theAttribute,
const std::list<std::string>& theArguments,
std::string& theError) const;
//! returns true if attribute is valid
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute (not used)
+ //! \param theError error message
virtual bool isValid(const AttributePtr& theAttribute,
const std::list<std::string>& theArguments,
std::string& theError) const;
//! returns true if attribute is valid
//! \param theAttribute the checked attribute
//! \param theArguments arguments of the attribute (not used)
+ //! \param theError error message
virtual bool isValid(const AttributePtr& theAttribute,
const std::list<std::string>& theArguments,
std::string& theError) const;
//! returns true if there are no solver errors
//! \param theFeature the checked feature
//! \param theArguments arguments of the feature (not used)
+ //! \param theError error message
virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
const std::list<std::string>& theArguments,
std::string& theError) const;
virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
};
+/**\class SketchPlugin_FilletVertexValidator
+ * \ingroup Validators
+ * \brief Validator for the point for fillet creation.
+ *
+ * Checks that selected point have exactly two coincident lines.
+ */
+class SketchPlugin_FilletVertexValidator : public ModelAPI_AttributeValidator
+{
+public:
+ //! returns true if attribute is valid
+ //! \param theAttribute the checked attribute
+ //! \param theArguments arguments of the attribute (not used)
+ //! \param theError error message
+ virtual bool isValid(const AttributePtr& theAttribute,
+ const std::list<std::string>& theArguments,
+ std::string& theError) const;
+};
+
+
+/**\class SketchPlugin_MiddlePointAttrValidator
+ * \ingroup Validators
+ * \brief Validator for the middle point constraint input.
+ *
+ * It checks that attributes of the Middle point constraint are correct.
+ */
+class SketchPlugin_MiddlePointAttrValidator : public ModelAPI_AttributeValidator
+{
+ public:
+ //! returns true if attribute is valid
+ //! \param theAttribute the checked attribute
+ //! \param theArguments arguments of the attribute (not used)
+ //! \param theError error message
+ virtual bool isValid(const AttributePtr& theAttribute,
+ const std::list<std::string>& theArguments,
+ std::string& theError) const;
+};
+
+
+/**\class SketchPlugin_ArcTangentPointValidator
+ * \ingroup Validators
+ * \brief Validator for the point where the tangent arc is building.
+ *
+ * Checks that the point is a start or end point just on line or arc.
+ */
+class SketchPlugin_ArcTangentPointValidator : 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,
+ std::string& theError) const;
+};
+
#endif