1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Validators.h
4 // Created: 01 Aug 2014
5 // Author: Vitaly SMETANNIKOV
7 #ifndef SketchPlugin_Validators_H
8 #define SketchPlugin_Validators_H
10 #include "SketchPlugin.h"
11 #include <ModelAPI_RefAttrValidator.h>
13 /**\class SketchPlugin_DistanceAttrValidator
15 * \brief Validator for the distance input.
17 * It just checks that distance is greater than zero.
19 class SketchPlugin_DistanceAttrValidator : public ModelAPI_RefAttrValidator
22 //! returns true if attribute is valid
23 //! \param theAttribute the checked attribute
24 //! \param theArguments arguments of the attribute
26 const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
27 //! Returns true if object is good for the feature attribute
28 virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
29 const ObjectPtr& theObject) const;
31 //! Returns true if the attribute is good for the feature attribute
32 virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
33 const AttributePtr& theAttribute) const;
36 /**\class SketchPlugin_DifferentObjectsValidator
39 * Check that there is no same object was already selected in the feature.
40 * For an example: to avoid perpendicularity on line and the same line.
42 // Use PartSet_DifferentObjectsValidator
43 //class SketchPlugin_DifferentObjectsValidator : public ModelAPI_RefAttrValidator
46 // //! returns true if attribute is valid
47 // //! \param theAttribute the checked attribute
48 // //! \param theArguments arguments of the attribute
49 // virtual bool isValid(
50 // const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
51 // //! Returns true if object is good for the feature attribute
52 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
53 // const ObjectPtr& theObject) const;
54 // //! Returns true if the attribute is good for the feature attribute
55 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
56 // const AttributePtr& theAttribute) const;