X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ShapeValidator.h;h=d07581ebda92b2c912c285c910040a87b0f6c042;hb=c44da4cdb21b305f2350bb4b2c9044eaba08f171;hp=6e35f4da1e0848c8d41f1ae10d5b3eddfd911b8f;hpb=cbe5929156574797612896a8d4e8021d2ecf6129;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ShapeValidator.h b/src/SketchPlugin/SketchPlugin_ShapeValidator.h index 6e35f4da1..d07581ebd 100644 --- a/src/SketchPlugin/SketchPlugin_ShapeValidator.h +++ b/src/SketchPlugin/SketchPlugin_ShapeValidator.h @@ -8,8 +8,7 @@ #define SketchPlugin_ShapeValidator_H #include -#include -#include +#include /**\class SketchPlugin_ResultPointValidator * \ingroup Validators @@ -17,20 +16,20 @@ * * Allows to select points only. */ -class SketchPlugin_ShapeValidator : public ModelAPI_ShapeValidator +class SketchPlugin_ShapeValidator : public ModelAPI_AttributeValidator { public: - // returns true if there is an empty or non-external shape on the feature. - // in the given shape or in the list of attribute shapes - /// \param theFeature a feature to check + /// returns true if the feature of attribute do not contain external features in the given attribute and + /// among attributes listed in the arguments + /// \param theAttribute an attribute to check /// \param theArguments a filter parameters - /// \param theObject an object + SKETCHPLUGIN_EXPORT virtual bool isValid(const AttributePtr& theAttribute, + const std::list& theArguments) const; + +protected: + /// returns true if the feature of the attribute is external /// \param theAttribute an attribute to check - /// \param theShape a shape - SKETCHPLUGIN_EXPORT virtual bool isValid(const FeaturePtr& theFeature, - const std::list& theArguments, - const ObjectPtr& theObject, const AttributePtr& theAttribute, - const GeomShapePtr& theShape) const; + bool isExternalAttribute(const AttributePtr& theAttribute) const; }; #endif