Salome HOME
Porting Salome to OCCT 7.7.0
[modules/shaper.git] / src / CollectionPlugin / CollectionPlugin_Validators.h
index 1e90232868b891d5d825d3a48c404f0e0f074771..d3249f0b07503146665a0183f4ee864854941b21 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2021  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
@@ -55,4 +55,19 @@ class CollectionPlugin_GroupOperationAttributeValidator : public ModelAPI_Attrib
                        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