1 // File: SketchPlugin_Validators.h
2 // Created: 01 Aug 2014
3 // Author: Vitaly SMETANNIKOV
5 #ifndef SketchPlugin_Validators_H
6 #define SketchPlugin_Validators_H
8 #include "SketchPlugin.h"
9 #include <ModelAPI_RefAttrValidator.h>
11 class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator
14 //! returns true if attribute is valid
15 //! \param theAttribute the checked attribute
16 //! \param theArguments arguments of the attribute
18 const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
19 //! Returns true if object is good for the feature attribute
20 virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
21 const ObjectPtr& theObject) const;
26 * Check that there is no same object was already selected in the feature.
27 * For an example: to avoid perpendicularity on line and the same line.
29 class SketchPlugin_DifferentObjectsValidator : public ModelAPI_RefAttrValidator
32 //! returns true if attribute is valid
33 //! \param theAttribute the checked attribute
34 //! \param theArguments arguments of the attribute
36 const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
37 //! Returns true if object is good for the feature attribute
38 virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
39 const ObjectPtr& theObject) const;