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 SketchPlugin_Constraint_H_
22 #define SketchPlugin_Constraint_H_
24 #include <SketchPlugin_Feature.h>
28 /// Size of the list of constraint attributes
29 const unsigned int CONSTRAINT_ATTR_SIZE = 4;
31 /** \class SketchPlugin_Constraint
32 * \brief Abstract interface to the SketchPlugin_ConstraintBase
33 * For more info see: SketchPlugin_ConstraintBase.h
35 class SketchPlugin_Constraint : public SketchPlugin_Feature
38 /// The value parameter for the constraint
39 inline static const std::string& VALUE()
41 static const std::string MY_CONSTRAINT_VALUE("ConstraintValue");
42 return MY_CONSTRAINT_VALUE;
44 /// The 2D value parameter for the constraint
45 inline static const std::string& FLYOUT_VALUE_PNT()
47 static const std::string MY_FLYOUT_VALUE_PNT("ConstraintFlyoutValuePnt");
48 return MY_FLYOUT_VALUE_PNT;
50 /// First entity for the constraint
51 inline static const std::string& ENTITY_A()
53 static const std::string MY_ENTITY_A("ConstraintEntityA");
56 /// Second entity for the constraint
57 inline static const std::string& ENTITY_B()
59 static const std::string MY_ENTITY_B("ConstraintEntityB");
62 /// Third entity for the constraint
63 inline static const std::string& ENTITY_C()
65 static const std::string MY_ENTITY_C("ConstraintEntityC");
68 /// Fourth entity for the constraint
69 inline static const std::string& ENTITY_D()
71 static const std::string MY_ENTITY_D("ConstraintEntityD");
75 /// List of constraint attributes
76 inline static const std::string& ATTRIBUTE(const int theNumber)
90 static const std::string EMPTY_STRING("");
95 /// \brief Use plugin manager for features creation
96 SketchPlugin_Constraint();
99 typedef std::shared_ptr<SketchPlugin_Constraint> ConstraintPtr;