X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Validators.h;h=ff2183425529a7e001e9b3978497afee51154bf4;hb=3eb5a9ba3696a7d8eb516943dfdabd8b188a76c5;hp=8a5a82bb04a3f30f5bd76b90361a60548f778c28;hpb=83770c7e51b6fb551ef233ef19f6099a68ca55f6;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Validators.h b/src/SketchPlugin/SketchPlugin_Validators.h index 8a5a82bb0..ff2183425 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.h +++ b/src/SketchPlugin/SketchPlugin_Validators.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + // File: SketchPlugin_Validators.h // Created: 01 Aug 2014 // Author: Vitaly SMETANNIKOV @@ -6,9 +8,15 @@ #define SketchPlugin_Validators_H #include "SketchPlugin.h" -#include +#include -class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator +/**\class SketchPlugin_DistanceAttrValidator + * \ingroup Validators + * \brief Validator for the distance input. + * + * It just checks that distance is greater than zero. + */ +class SketchPlugin_DistanceAttrValidator : public ModelAPI_AttributeValidator { public: //! returns true if attribute is valid @@ -16,24 +24,29 @@ class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator //! \param theArguments arguments of the attribute virtual bool isValid( const AttributePtr& theAttribute, const std::list& theArguments) const; - //! Returns true if object is good for the feature attribute - virtual bool isValid(const FeaturePtr& theFeature, const std::list& theArguments, - const ObjectPtr& theObject) const; - }; -/** - * It must be bigger than 1.e-5 +/**\class SketchPlugin_DifferentObjectsValidator + * \ingroup Validators + * + * Check that there is no same object was already selected in the feature. + * For an example: to avoid perpendicularity on line and the same line. */ -class SketchPlugin_RadiusValidator : public ModelAPI_AttributeValidator -{ - public: - //! returns true if attribute is valid - //! \param theAttribute the checked attribute - //! \param theArguments arguments of the attribute - virtual bool isValid( - const AttributePtr& theAttribute, const std::list& theArguments) const; - -}; +// Use PartSet_DifferentObjectsValidator +//class SketchPlugin_DifferentObjectsValidator : public ModelAPI_RefAttrValidator +//{ +// public: +// //! returns true if attribute is valid +// //! \param theAttribute the checked attribute +// //! \param theArguments arguments of the attribute +// virtual bool isValid( +// const AttributePtr& theAttribute, const std::list& theArguments) const; +// //! Returns true if object is good for the feature attribute +// virtual bool isValid(const FeaturePtr& theFeature, const std::list& theArguments, +// const ObjectPtr& theObject) const; +// //! Returns true if the attribute is good for the feature attribute +// virtual bool isValid(const FeaturePtr& theFeature, const std::list& theArguments, +// const AttributePtr& theAttribute) const; +//}; #endif