1 // Copyright (C) 2014-2023 CEA, EDF
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 SketchPlugin_Constraint_H_
21 #define SketchPlugin_Constraint_H_
23 #include <SketchPlugin_Feature.h>
27 /// Size of the list of constraint attributes
28 const int CONSTRAINT_ATTR_SIZE = 4;
30 /** \class SketchPlugin_Constraint
31 * \brief Abstract interface to the SketchPlugin_ConstraintBase
32 * For more info see: SketchPlugin_ConstraintBase.h
34 class SketchPlugin_Constraint : public SketchPlugin_Feature
37 /// The value parameter for the constraint
38 inline static const std::string& VALUE()
40 static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
41 return MY_CONSTRAINT_VALUE;
43 /// The 2D value parameter for the constraint
44 inline static const std::string& FLYOUT_VALUE_PNT()
46 static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
47 return MY_FLYOUT_VALUE_PNT;
49 /// First entity for the constraint
50 inline static const std::string& ENTITY_A()
52 static const std::string MY_ENTITY_A("ConstraintEntityA");
55 /// Second entity for the constraint
56 inline static const std::string& ENTITY_B()
58 static const std::string MY_ENTITY_B("ConstraintEntityB");
61 /// Third entity for the constraint
62 inline static const std::string& ENTITY_C()
64 static const std::string MY_ENTITY_C("ConstraintEntityC");
67 /// Fourth entity for the constraint
68 inline static const std::string& ENTITY_D()
70 static const std::string MY_ENTITY_D("ConstraintEntityD");
74 /// List of constraint attributes
75 inline static const std::string& ATTRIBUTE(const int theNumber)
89 static const std::string EMPTY_STRING("");
94 /// \brief Use plugin manager for features creation
95 SketchPlugin_Constraint();
98 typedef std::shared_ptr<SketchPlugin_Constraint> ConstraintPtr;