X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Validators.h;h=7016177d51799ab22fb5ece8476395911a2af7f1;hb=22b8f7fe2eccd1eeee183f52834b191b1e904dc3;hp=f9f45506feacef5e948913c7df791698db821abf;hpb=4ca3fd41634c37f840d0cbb3f896fa97c2d3c457;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Validators.h b/src/SketchPlugin/SketchPlugin_Validators.h index f9f45506f..7016177d5 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.h +++ b/src/SketchPlugin/SketchPlugin_Validators.h @@ -9,6 +9,7 @@ #include "SketchPlugin.h" #include +#include /**\class SketchPlugin_DistanceAttrValidator * \ingroup Validators @@ -133,4 +134,24 @@ class SketchPlugin_CopyValidator : public ModelAPI_AttributeValidator std::string& theError) const; }; +/**\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 SketchPlugin_SolverErrorValidator : public ModelAPI_FeatureValidator +{ + public: + //! returns true if there are no solver errors + //! \param theFeature the checked feature + //! \param theArguments arguments of the feature (not used) + virtual bool isValid(const std::shared_ptr& theFeature, + const std::list& theArguments, + std::string& theError) const; + + /// Returns true if the attribute in feature is not obligatory for the feature execution + virtual bool isNotObligatory(std::string theFeature, std::string theAttribute); +}; + #endif