Salome HOME
Porting Salome to OCCT 7.7.0
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_Validators.h
index 5932e2c4f7d163e8228d2a2407ab00261656bcd5..d3249f0b07503146665a0183f4ee864854941b21 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #define CollectionPlugin_Validators_H
 
 #include "CollectionPlugin.h"
+#include <ModelAPI_AttributeValidator.h>
 #include <ModelAPI_FeatureValidator.h>
 
-/**\class SketchPlugin_SolverErrorValidator
-* \ingroup Validators
-* \brief Validator for the solver error.
-*
-* Simply checks that solver error attribute is empty. Returns the attribute value as an error.
-*/
+/**\class CollectionPlugin_FieldValidator
+ * \ingroup Validators
+ * \brief Validator for the field.
+ */
 class CollectionPlugin_FieldValidator : public ModelAPI_FeatureValidator
 {
 public:
@@ -41,4 +40,34 @@ public:
     Events_InfoMessage& theError) const;
 };
 
+/**\class CollectionPlugin_GroupOperationAttributeValidator
+ * \ingroup Validators
+ * \brief Validator for the parameters of operation on groups.
+ */
+class CollectionPlugin_GroupOperationAttributeValidator : public ModelAPI_AttributeValidator
+{
+  //! Returns true if attribute is ok.
+  //! \param[in] theAttribute the checked attribute.
+  //! \param[in] theArguments arguments of the attribute.
+  //! \param[out] theError error message.
+  virtual bool isValid(const AttributePtr& theAttribute,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
+};
+
+/**\class CollectionPlugin_GroupSelectionValidator
+* \ingroup Validators
+* \brief Validator for prevent adding whole group in other group.
+*/
+class CollectionPlugin_GroupSelectionValidator : public ModelAPI_AttributeValidator
+{
+  //! Returns true if attribute is ok.
+  //! \param[in] theAttribute the checked attribute.
+  //! \param[in] theArguments arguments of the attribute (not used).
+  //! \param[out] theError error message.
+  virtual bool isValid(const AttributePtr& theAttribute,
+    const std::list<std::string>& theArguments,
+    Events_InfoMessage& theError) const;
+};
+
 #endif
\ No newline at end of file