X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBuildPlugin%2FBuildPlugin_Validators.h;h=347ef5f22f4db23d368ae2fa3fca5ef1fa028ced;hb=5c13fa0e68725babdd09541b028c186896e27b4f;hp=1f2091efe0e45347047c9eb7399cc7b3677d5a31;hpb=37bd12bd6f4626fc2bfa7764c8f4927dc5b01b9c;p=modules%2Fshaper.git diff --git a/src/BuildPlugin/BuildPlugin_Validators.h b/src/BuildPlugin/BuildPlugin_Validators.h index 1f2091efe..347ef5f22 100644 --- a/src/BuildPlugin/BuildPlugin_Validators.h +++ b/src/BuildPlugin/BuildPlugin_Validators.h @@ -12,7 +12,8 @@ /// \class BuildPlugin_ValidatorBaseForBuild /// \ingroup Validators -/// \brief A validator for selection base shapes for build features. Allows to select shapes on sketch and +/// \brief A validator for selection base shapes for build features. +/// Allows to select shapes on sketch and /// whole objects with allowed type. class BuildPlugin_ValidatorBaseForBuild: public ModelAPI_AttributeValidator { @@ -23,7 +24,7 @@ public: //! \param[out] theError error message. virtual bool isValid(const AttributePtr& theAttribute, const std::list& theArguments, - std::string& theError) const; + Events_InfoMessage& theError) const; }; /// \class BuildPlugin_ValidatorBaseForWire @@ -39,7 +40,7 @@ public: //! \param theError error message. virtual bool isValid(const std::shared_ptr& theFeature, const std::list& theArguments, - std::string& theError) const; + 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); @@ -58,10 +59,25 @@ public: //! \param theError error message. virtual bool isValid(const std::shared_ptr& theFeature, const std::list& theArguments, - std::string& theError) const; + 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_ValidatorSubShapesSelection +/// \ingroup Validators +/// \brief A validator for selection sub-shapes for SubShape feature. +class BuildPlugin_ValidatorSubShapesSelection: 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