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_AttributeValidator.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_AttributeValidator
22 //! returns true if attribute is valid
23 //! \param theAttribute the checked attribute
24 //! \param theArguments arguments of the attribute
25 virtual bool isValid(const AttributePtr& theAttribute,
26 const std::list<std::string>& theArguments) const;
28 // virtual bool isValid(const AttributePtr& theAttribute,
29 // const std::list<std::string>& theArguments) const;
31 // //! Returns true if object is good for the feature attribute
32 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
33 // const ObjectPtr& theObject, const GeomShapePtr& theShape) const;
35 // //! Returns true if the attribute is good for the feature attribute
36 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
37 // const AttributePtr& theAttribute) const;
40 // commented in v1.0.2, master:
41 /**\class SketchPlugin_DifferentObjectsValidator
44 * Check that there is no same object was already selected in the feature.
45 * For an example: to avoid perpendicularity on line and the same line.
47 // Use PartSet_DifferentObjectsValidator instead
48 //class SketchPlugin_DifferentObjectsValidator : public ModelAPI_RefAttrValidator
51 // //! returns true if attribute is valid
52 // //! \param theAttribute the checked attribute
53 // //! \param theArguments arguments of the attribute
54 // virtual bool isValid(
55 // const AttributePtr& theAttribute, const std::list<std::string>& theArguments) const;
56 // //! Returns true if object is good for the feature attribute
57 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
58 // const ObjectPtr& theObject) const;
59 // //! Returns true if the attribute is good for the feature attribute
60 // virtual bool isValid(const FeaturePtr& theFeature, const std::list<std::string>& theArguments,
61 // const AttributePtr& theAttribute) const;
63 // ======= end of todo
66 /**\class SketchPlugin_TangentAttrValidator
68 * \brief Validator for the tangent constraint input.
70 * It just checks that distance is greater than zero.
72 class SketchPlugin_TangentAttrValidator : public ModelAPI_AttributeValidator
75 //! returns true if attribute is valid
76 //! \param theAttribute the checked attribute
77 //! \param theArguments arguments of the attribute
78 virtual bool isValid(const AttributePtr& theAttribute,
79 const std::list<std::string>& theArguments) const;