Salome HOME
updated copyright message
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Validators.h
1 // Copyright (C) 2014-2023  CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef ConstructionPlugin_Validators_H_
21 #define ConstructionPlugin_Validators_H_
22
23 #include <ModelAPI_AttributeValidator.h>
24
25 /// \class ConstructionPlugin_ValidatorPointLines
26 /// \ingroup Validators
27 /// \brief A validator for selection lines for point by intersection.
28 class ConstructionPlugin_ValidatorPointLines: public ModelAPI_AttributeValidator
29 {
30 public:
31   //! \return True if the attribute is valid.
32   //! \param[in] theAttribute the checked attribute.
33   //! \param[in] theArguments arguments of the attribute.
34   //! \param[out] theError error message.
35    virtual bool isValid(const AttributePtr& theAttribute,
36                         const std::list<std::string>& theArguments,
37                         Events_InfoMessage& theError) const;
38 };
39
40 /// \class ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel
41 /// \ingroup Validators
42 /// \brief A validator for selection edge and plane for point by intersection.
43 class ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel: public ModelAPI_AttributeValidator
44 {
45 public:
46   //! \return True if the attribute is valid.
47   //! \param[in] theAttribute the checked attribute.
48   //! \param[in] theArguments arguments of the attribute.
49   //! \param[out] theError error message.
50    virtual bool isValid(const AttributePtr& theAttribute,
51                         const std::list<std::string>& theArguments,
52                         Events_InfoMessage& theError) const;
53 };
54
55 /// \class ConstructionPlugin_ValidatorPlaneThreePoints
56 /// \ingroup Validators
57 /// \brief A validator for selection three points for plane.
58 class ConstructionPlugin_ValidatorPlaneThreePoints: public ModelAPI_AttributeValidator
59 {
60 public:
61   //! \return True if the attribute is valid.
62   //! \param[in] theAttribute the checked attribute.
63   //! \param[in] theArguments arguments of the attribute.
64   //! \param[out] theError error message.
65    virtual bool isValid(const AttributePtr& theAttribute,
66                         const std::list<std::string>& theArguments,
67                         Events_InfoMessage& theError) const;
68 };
69
70 /// \class ConstructionPlugin_ValidatorPlaneLinePoint
71 /// \ingroup Validators
72 /// \brief A validator for selection line and point for plane.
73 class ConstructionPlugin_ValidatorPlaneLinePoint: public ModelAPI_AttributeValidator
74 {
75 public:
76   //! \return True if the attribute is valid.
77   //! \param[in] theAttribute the checked attribute.
78   //! \param[in] theArguments arguments of the attribute.
79   //! \param[out] theError error message.
80    virtual bool isValid(const AttributePtr& theAttribute,
81                         const std::list<std::string>& theArguments,
82                         Events_InfoMessage& theError) const;
83 };
84
85 /// \class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes
86 /// \ingroup Validators
87 /// \brief A validator for selection two parallel planes.
88 class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes: public ModelAPI_AttributeValidator
89 {
90 public:
91   //! \return True if the attribute is valid.
92   //! \param[in] theAttribute the checked attribute.
93   //! \param[in] theArguments arguments of the attribute.
94   //! \param[out] theError error message.
95    virtual bool isValid(const AttributePtr& theAttribute,
96                         const std::list<std::string>& theArguments,
97                         Events_InfoMessage& theError) const;
98 };
99
100 /// \class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes
101 /// \ingroup Validators
102 /// \brief A validator for selection two parallel planes.
103 class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes: public ModelAPI_AttributeValidator
104 {
105 public:
106   //! \return True if the attribute is valid.
107   //! \param[in] theAttribute the checked attribute.
108   //! \param[in] theArguments arguments of the attribute.
109   //! \param[out] theError error message.
110    virtual bool isValid(const AttributePtr& theAttribute,
111                         const std::list<std::string>& theArguments,
112                         Events_InfoMessage& theError) const;
113 };
114
115 /// \class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes
116 /// \ingroup Validators
117 /// \brief A validator for selection three non parallel planes.
118 class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes: public ModelAPI_AttributeValidator
119 {
120 public:
121   //! \return True if the attribute is valid.
122   //! \param[in] theAttribute the checked attribute.
123   //! \param[in] theArguments arguments of the attribute.
124   //! \param[out] theError error message.
125   virtual bool isValid(const AttributePtr& theAttribute,
126                        const std::list<std::string>& theArguments,
127                        Events_InfoMessage& theError) const;
128 };
129
130 /// \class ConstructionPlugin_ValidatorNotFeature
131 /// \ingroup Validators
132 /// \brief A validator for selection of a result but not a feature.
133 class ConstructionPlugin_ValidatorNotFeature : public ModelAPI_AttributeValidator
134 {
135 public:
136   //! \return True if the attribute is valid.
137   //! \param[in] theAttribute the checked attribute.
138   //! \param[in] theArguments arguments of the attribute.
139   //! \param[out] theError error message.
140   virtual bool isValid(const AttributePtr& theAttribute,
141                        const std::list<std::string>& theArguments,
142                        Events_InfoMessage& theError) const;
143 };
144
145 #endif