Salome HOME
#1721 Selecting arcs in mirror constraint is too long and removes other edges
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_Validators.h
index be8f285b5c1684edfd38cc0bccafa3e344cadbce..50b0e937d1afacd8fea0e1142563a6dce5eab436 100644 (file)
 
 #include <memory>
 
+/**
+ * \class ParametersPlugin_VariableValidator
+ * \ingroup Validators
+ * \brief Validator for the variable name of parameter.
+ */
 class ParametersPlugin_VariableValidator : public ModelAPI_AttributeValidator
 {
  public:
   PARAMETERSPLUGIN_EXPORT ParametersPlugin_VariableValidator();
   PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_VariableValidator();
 
-  //! returns true if attribute is valid
-  //! \param theAttribute the checked attribute
-  //! \param theArguments arguments of the attribute
+  /**
+   * \brief Returns true if attribute has a valid parameter name.
+   * \param theAttribute the checked attribute
+   * \param theArguments arguments of the attribute
+   * \param theError the error string message if validation fails
+   */
   PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
-                                               const std::list<std::string>& theArguments) const;
+                                               const std::list<std::string>& theArguments,
+                                               Events_InfoMessage& theError) const;
 
  protected:
-  PARAMETERSPLUGIN_EXPORT bool isVariable(const std::string& theString) const;
-
+  /// Returns true if theString is unique parameter name in the document of theAttribute.
+  PARAMETERSPLUGIN_EXPORT bool isUnique(const AttributePtr& theAttribute,
+                                        const std::string& theString) const;
 };
 
+/**
+ * \class ParametersPlugin_ExpressionValidator
+ * \ingroup Validators
+ * \brief Validator for the expression of parameter.
+ */
 class ParametersPlugin_ExpressionValidator: public ModelAPI_AttributeValidator
 {
  public:
   PARAMETERSPLUGIN_EXPORT ParametersPlugin_ExpressionValidator();
   PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_ExpressionValidator();
 
-  //! returns true if attribute is valid
-  //! \param theAttribute the checked attribute
-  //! \param theArguments arguments of the attribute
+  /**
+   * \brief Returns true if attribute has a valid parameter expression.
+   * \param theAttribute the checked attribute
+   * \param theArguments arguments of the attribute
+   * \param theError the error string message if validation fails
+   */
   PARAMETERSPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute,
-                                               const std::list<std::string>& theArguments) const;
+                                               const std::list<std::string>& theArguments,
+                                               Events_InfoMessage& theError) const;
 };