Salome HOME
Update copyrights
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Validators.h
index 5f3be35daf884d20edcc659bfd054f3c2eca5dcd..4c54b6b7b8ef5b2c7d1ab3d65b91032f8298465f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  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
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef BuildPlugin_Validators_H_
@@ -55,9 +54,6 @@ public:
   virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                        const std::list<std::string>& theArguments,
                        Events_InfoMessage& theError) const;
-
-  /// \return true if the attribute in feature is not obligatory for the feature execution
-  virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
 };
 
 /// \class BuildPlugin_ValidatorBaseForFace
@@ -74,9 +70,22 @@ public:
   virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                        const std::list<std::string>& theArguments,
                        Events_InfoMessage& theError) const;
+};
 
-  /// \return true if the attribute in feature is not obligatory for the feature execution
-  virtual bool isNotObligatory(std::string theFeature, std::string theAttribute);
+/// \class BuildPlugin_ValidatorBaseForSolids
+/// \ingroup Validators
+/// \brief A validator for selection base shapes for solid. Allows to select faces closed enough
+/// to create a solid.
+class BuildPlugin_ValidatorBaseForSolids: public ModelAPI_FeatureValidator
+{
+public:
+  //! Returns true if attributes is ok.
+  //! \param theFeature the checked feature.
+  //! \param theArguments arguments of the feature.
+  //! \param theError error message.
+  virtual bool isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+                       const std::list<std::string>& theArguments,
+                       Events_InfoMessage& theError) const;
 };
 
 /// \class BuildPlugin_ValidatorSubShapesSelection