X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBuildPlugin%2FBuildPlugin_Validators.h;h=d69f0b8b7b3ae4f3148d759b3a1f6013c163d60d;hb=9d8267a424a809d0f96593b13f8472666553ce2e;hp=70bb2d7c03d70af292af5eaeac7fdf67f799ed26;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/BuildPlugin/BuildPlugin_Validators.h b/src/BuildPlugin/BuildPlugin_Validators.h index 70bb2d7c0..d69f0b8b7 100644 --- a/src/BuildPlugin/BuildPlugin_Validators.h +++ b/src/BuildPlugin/BuildPlugin_Validators.h @@ -14,7 +14,8 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com // #ifndef BuildPlugin_Validators_H_ @@ -54,9 +55,6 @@ public: virtual bool isValid(const std::shared_ptr& theFeature, const std::list& 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 @@ -73,9 +71,22 @@ public: virtual bool isValid(const std::shared_ptr& theFeature, const std::list& 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& theFeature, + const std::list& theArguments, + Events_InfoMessage& theError) const; }; /// \class BuildPlugin_ValidatorSubShapesSelection @@ -93,4 +104,19 @@ public: Events_InfoMessage& theError) const; }; +/// \class BuildPlugin_ValidatorFillingSelection +/// \ingroup Validators +/// \brief A validator for selection of Filling feature. +class BuildPlugin_ValidatorFillingSelection: public ModelAPI_AttributeValidator +{ +public: + //! 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& theArguments, + Events_InfoMessage& theError) const; +}; + #endif