1 // Copyright (C) 2014-2017 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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef ConstructionPlugin_Validators_H_
22 #define ConstructionPlugin_Validators_H_
24 #include <ModelAPI_AttributeValidator.h>
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
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;
41 /// \class ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel
42 /// \ingroup Validators
43 /// \brief A validator for selection line and plane for point by intersection.
44 class ConstructionPlugin_ValidatorPointLineAndPlaneNotParallel: public ModelAPI_AttributeValidator
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;
56 /// \class ConstructionPlugin_ValidatorPlaneThreePoints
57 /// \ingroup Validators
58 /// \brief A validator for selection three points for plane.
59 class ConstructionPlugin_ValidatorPlaneThreePoints: public ModelAPI_AttributeValidator
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;
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
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;
86 /// \class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes
87 /// \ingroup Validators
88 /// \brief A validator for selection two parallel planes.
89 class ConstructionPlugin_ValidatorPlaneTwoParallelPlanes: public ModelAPI_AttributeValidator
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;
101 /// \class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes
102 /// \ingroup Validators
103 /// \brief A validator for selection two parallel planes.
104 class ConstructionPlugin_ValidatorAxisTwoNotParallelPlanes: public ModelAPI_AttributeValidator
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;