1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef ConstructionPlugin_Validators_H_
21 #define ConstructionPlugin_Validators_H_
23 #include <ModelAPI_AttributeValidator.h>
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
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;
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
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;
55 /// \class ConstructionPlugin_ValidatorPlaneThreePoints
56 /// \ingroup Validators
57 /// \brief A validator for selection three points for plane.
58 class ConstructionPlugin_ValidatorPlaneThreePoints: public ModelAPI_AttributeValidator
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;
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
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;
85 /// \class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes
86 /// \ingroup Validators
87 /// \brief A validator for selection two parallel planes.
88 class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes: public ModelAPI_AttributeValidator
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;
100 /// \class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes
101 /// \ingroup Validators
102 /// \brief A validator for selection two parallel planes.
103 class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes: public ModelAPI_AttributeValidator
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;
115 /// \class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes
116 /// \ingroup Validators
117 /// \brief A validator for selection three non parallel planes.
118 class ConstructionPlugin_ValidatorPointThreeNonParallelPlanes: public ModelAPI_AttributeValidator
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;