Salome HOME
2.3.4 Point creation: by intersection
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Validators.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef ConstructionPlugin_Validators_H_
22 #define ConstructionPlugin_Validators_H_
23
24 #include <ModelAPI_AttributeValidator.h>
25
26 /// \class ConstructionPlugin_ValidatorPointLines
27 /// \ingroup Validators
28 /// \brief A validator for selection lines for point by intersection.
29 class ConstructionPlugin_ValidatorPointLines: public ModelAPI_AttributeValidator
30 {
31 public:
32   //! \return True if the attribute is valid.
33   //! \param[in] theAttribute the checked attribute.
34   //! \param[in] theArguments arguments of the attribute.
35   //! \param[out] theError error message.
36    virtual bool isValid(const AttributePtr& theAttribute,
37                         const std::list<std::string>& theArguments,
38                         Events_InfoMessage& theError) const;
39 };
40
41 /// \class ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel
42 /// \ingroup Validators
43 /// \brief A validator for selection edge and plane for point by intersection.
44 class ConstructionPlugin_ValidatorPointEdgeAndPlaneNotParallel: public ModelAPI_AttributeValidator
45 {
46 public:
47   //! \return True if the attribute is valid.
48   //! \param[in] theAttribute the checked attribute.
49   //! \param[in] theArguments arguments of the attribute.
50   //! \param[out] theError error message.
51    virtual bool isValid(const AttributePtr& theAttribute,
52                         const std::list<std::string>& theArguments,
53                         Events_InfoMessage& theError) const;
54 };
55
56 /// \class ConstructionPlugin_ValidatorPlaneThreePoints
57 /// \ingroup Validators
58 /// \brief A validator for selection three points for plane.
59 class ConstructionPlugin_ValidatorPlaneThreePoints: public ModelAPI_AttributeValidator
60 {
61 public:
62   //! \return True if the attribute is valid.
63   //! \param[in] theAttribute the checked attribute.
64   //! \param[in] theArguments arguments of the attribute.
65   //! \param[out] theError error message.
66    virtual bool isValid(const AttributePtr& theAttribute,
67                         const std::list<std::string>& theArguments,
68                         Events_InfoMessage& theError) const;
69 };
70
71 /// \class ConstructionPlugin_ValidatorPlaneLinePoint
72 /// \ingroup Validators
73 /// \brief A validator for selection line and point for plane.
74 class ConstructionPlugin_ValidatorPlaneLinePoint: public ModelAPI_AttributeValidator
75 {
76 public:
77   //! \return True if the attribute is valid.
78   //! \param[in] theAttribute the checked attribute.
79   //! \param[in] theArguments arguments of the attribute.
80   //! \param[out] theError error message.
81    virtual bool isValid(const AttributePtr& theAttribute,
82                         const std::list<std::string>& theArguments,
83                         Events_InfoMessage& theError) const;
84 };
85
86 /// \class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes
87 /// \ingroup Validators
88 /// \brief A validator for selection two parallel planes.
89 class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes: public ModelAPI_AttributeValidator
90 {
91 public:
92   //! \return True if the attribute is valid.
93   //! \param[in] theAttribute the checked attribute.
94   //! \param[in] theArguments arguments of the attribute.
95   //! \param[out] theError error message.
96    virtual bool isValid(const AttributePtr& theAttribute,
97                         const std::list<std::string>& theArguments,
98                         Events_InfoMessage& theError) const;
99 };
100
101 /// \class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes
102 /// \ingroup Validators
103 /// \brief A validator for selection two parallel planes.
104 class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes: public ModelAPI_AttributeValidator
105 {
106 public:
107   //! \return True if the attribute is valid.
108   //! \param[in] theAttribute the checked attribute.
109   //! \param[in] theArguments arguments of the attribute.
110   //! \param[out] theError error message.
111    virtual bool isValid(const AttributePtr& theAttribute,
112                         const std::list<std::string>& theArguments,
113                         Events_InfoMessage& theError) const;
114 };
115
116 /// \class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes
117 /// \ingroup Validators
118 /// \brief A validator for selection three non parallel planes.
119 class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes: public ModelAPI_AttributeValidator
120 {
121 public:
122   //! \return True if the attribute is valid.
123   //! \param[in] theAttribute the checked attribute.
124   //! \param[in] theArguments arguments of the attribute.
125   //! \param[out] theError error message.
126   virtual bool isValid(const AttributePtr& theAttribute,
127                        const std::list<std::string>& theArguments,
128                        Events_InfoMessage& theError) const;
129 };
130
131 #endif