Salome HOME
Fix for the issue #1794: can't create a plane by a vertex and an axis if the vertex...
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Validators.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        ConstructionPlugin_Validators.h
4 // Created:     04 July 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef ConstructionPlugin_Validators_H_
8 #define ConstructionPlugin_Validators_H_
9
10 #include <ModelAPI_AttributeValidator.h>
11
12 /// \class ConstructionPlugin_ValidatorPointLines
13 /// \ingroup Validators
14 /// \brief A validator for selection lines for point by intersection.
15 class ConstructionPlugin_ValidatorPointLines: public ModelAPI_AttributeValidator
16 {
17 public:
18   //! \return True if the attribute is valid.
19   //! \param[in] theAttribute the checked attribute.
20   //! \param[in] theArguments arguments of the attribute.
21   //! \param[out] theError error message.
22    virtual bool isValid(const AttributePtr& theAttribute,
23                         const std::list<std::string>& theArguments,
24                         Events_InfoMessage& theError) const;
25 };
26
27 /// \class ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel
28 /// \ingroup Validators
29 /// \brief A validator for selection line and plane for point by intersection.
30 class ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel: public ModelAPI_AttributeValidator
31 {
32 public:
33   //! \return True if the attribute is valid.
34   //! \param[in] theAttribute the checked attribute.
35   //! \param[in] theArguments arguments of the attribute.
36   //! \param[out] theError error message.
37    virtual bool isValid(const AttributePtr& theAttribute,
38                         const std::list<std::string>& theArguments,
39                         Events_InfoMessage& theError) const;
40 };
41
42 /// \class ConstructionPlugin_ValidatorPlaneThreePoints
43 /// \ingroup Validators
44 /// \brief A validator for selection three points for plane.
45 class ConstructionPlugin_ValidatorPlaneThreePoints: public ModelAPI_AttributeValidator
46 {
47 public:
48   //! \return True if the attribute is valid.
49   //! \param[in] theAttribute the checked attribute.
50   //! \param[in] theArguments arguments of the attribute.
51   //! \param[out] theError error message.
52    virtual bool isValid(const AttributePtr& theAttribute,
53                         const std::list<std::string>& theArguments,
54                         Events_InfoMessage& theError) const;
55 };
56
57 /// \class ConstructionPlugin_ValidatorPlaneLinePoint
58 /// \ingroup Validators
59 /// \brief A validator for selection line and point for plane.
60 class ConstructionPlugin_ValidatorPlaneLinePoint: public ModelAPI_AttributeValidator
61 {
62 public:
63   //! \return True if the attribute is valid.
64   //! \param[in] theAttribute the checked attribute.
65   //! \param[in] theArguments arguments of the attribute.
66   //! \param[out] theError error message.
67    virtual bool isValid(const AttributePtr& theAttribute,
68                         const std::list<std::string>& theArguments,
69                         Events_InfoMessage& theError) const;
70 };
71
72 /// \class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes
73 /// \ingroup Validators
74 /// \brief A validator for selection two parallel planes.
75 class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes: public ModelAPI_AttributeValidator
76 {
77 public:
78   //! \return True if the attribute is valid.
79   //! \param[in] theAttribute the checked attribute.
80   //! \param[in] theArguments arguments of the attribute.
81   //! \param[out] theError error message.
82    virtual bool isValid(const AttributePtr& theAttribute,
83                         const std::list<std::string>& theArguments,
84                         Events_InfoMessage& theError) const;
85 };
86
87 /// \class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes
88 /// \ingroup Validators
89 /// \brief A validator for selection two parallel planes.
90 class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes: public ModelAPI_AttributeValidator
91 {
92 public:
93   //! \return True if the attribute is valid.
94   //! \param[in] theAttribute the checked attribute.
95   //! \param[in] theArguments arguments of the attribute.
96   //! \param[out] theError error message.
97    virtual bool isValid(const AttributePtr& theAttribute,
98                         const std::list<std::string>& theArguments,
99                         Events_InfoMessage& theError) const;
100 };
101
102 #endif