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;
30 /**\class SketchPlugin_TangentAttrValidator
32 * \brief Validator for the tangent constraint input.
34 * It just checks that distance is greater than zero.
36 class SketchPlugin_TangentAttrValidator : public ModelAPI_AttributeValidator
39 //! returns true if attribute is valid
40 //! \param theAttribute the checked attribute
41 //! \param theArguments arguments of the attribute
42 virtual bool isValid(const AttributePtr& theAttribute,
43 const std::list<std::string>& theArguments) const;
47 /**\class SketchPlugin_NotFixed
49 * \brief Validator for the rigid constraint input.
51 * It just checks there is no rigid constraint for the current feature.
53 class SketchPlugin_NotFixedValidator : public ModelAPI_AttributeValidator
56 //! returns true if attribute is not used in another rigid constraint
57 //! \param theAttribute the checked attribute
58 //! \param theArguments arguments of the attribute
59 virtual bool isValid(const AttributePtr& theAttribute,
60 const std::list<std::string>& theArguments) const;
63 /**\class SketchPlugin_EqualAttrValidator
65 * \brief Validator for the equal constraint input.
67 * It checks that attributes of the Equal constraint are correct.
69 class SketchPlugin_EqualAttrValidator : public ModelAPI_AttributeValidator
72 //! returns true if attribute is valid
73 //! \param theAttribute the checked attribute
74 //! \param theArguments arguments of the attribute
75 virtual bool isValid(const AttributePtr& theAttribute,
76 const std::list<std::string>& theArguments) const;
79 /**\class SketchPlugin_MirrorAttrValidator
81 * \brief Validator for the mirror constraint input.
83 * It checks that attributes of the Mirror constraint are correct.
85 class SketchPlugin_MirrorAttrValidator : public ModelAPI_AttributeValidator
88 //! returns true if attribute is valid
89 //! \param theAttribute the checked attribute
90 //! \param theArguments arguments of the attribute (not used)
91 virtual bool isValid(const AttributePtr& theAttribute,
92 const std::list<std::string>& theArguments) const;