Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Constraint.h
index 01fbe230fbcdec6951020ed800177b9399367443..f908a19b4ffbdc133c7ff271c18c4617ba07ae47 100644 (file)
@@ -1,6 +1,21 @@
-// File:    SketchPlugin_Constraint.h
-// Created: 08 May 2014
-// Author:  Artem ZHIDKOV
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #ifndef SketchPlugin_Constraint_H_
 #define SketchPlugin_Constraint_H_
@@ -16,9 +31,9 @@ const unsigned int CONSTRAINT_ATTR_SIZE = 4;
  *  \brief Abstract interface to the SketchPlugin_ConstraintBase
  *         For more info see: SketchPlugin_ConstraintBase.h
  */
-class SketchPlugin_Constraint: public SketchPlugin_Feature
+class SketchPlugin_Constraint : public SketchPlugin_Feature
 {
-public:
+ public:
   /// The value parameter for the constraint
   inline static const std::string& VALUE()
   {
@@ -57,21 +72,29 @@ public:
   }
 
   /// List of constraint attributes
-  inline static const std::string& ATTRIBUTE(const int theNumber) {
+  inline static const std::string& ATTRIBUTE(const int theNumber)
+  {
     switch (theNumber) {
-      case 0: return ENTITY_A();
-      case 1: return ENTITY_B();
-      case 2: return ENTITY_C();
-      case 3: return ENTITY_D();
-      default: break;
+      case 0:
+        return ENTITY_A();
+      case 1:
+        return ENTITY_B();
+      case 2:
+        return ENTITY_C();
+      case 3:
+        return ENTITY_D();
+      default:
+        break;
     }
     static const std::string EMPTY_STRING("");
     return EMPTY_STRING;
   }
 
-protected:
+ protected:
   /// \brief Use plugin manager for features creation
-  SketchPlugin_Constraint() {}
+  SketchPlugin_Constraint();
 };
 
+typedef std::shared_ptr<SketchPlugin_Constraint> ConstraintPtr;
+
 #endif