Salome HOME
Update copyrights
[modules/shaper.git] / src / SketchAPI / SketchAPI_Constraint.h
index 4885631164d38469126e7c23847595819d56128d..200ecf4f0461ad7a125f9bfdbda54b69c21f4b09 100644 (file)
@@ -1,9 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-// Name   : SketchAPI_Constraint.h
-// Purpose: 
+// 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
 //
-// History:
-// 08/08/16 - Artem ZHIDKOV - Creation of the file
 
 #ifndef SRC_SKETCHAPI_SKETCHAPI_CONSTRAINT_H_
 #define SRC_SKETCHAPI_SKETCHAPI_CONSTRAINT_H_
@@ -16,6 +28,8 @@
 
 #include <SketchPlugin_Constraint.h>
 
+class ModelHighAPI_Double;
+
 /**\class SketchAPI_Constraint
  * \ingroup CPPHighAPI
  * \brief Interface for Constraint feature
@@ -33,17 +47,29 @@ public:
 
   static std::string ID()
   {
-    static const std::string DUMMY;
-    return DUMMY;
+    static const std::string MY_SKETCH_CONSTRAINT_ID = "SketchConstraint";
+    return MY_SKETCH_CONSTRAINT_ID;
   }
   virtual std::string getID() { return ID(); }
 
   SKETCHAPI_EXPORT
   bool initialize();
 
+  SKETCHAPI_EXPORT void setEntityA(const ModelHighAPI_RefAttr& theEntity);
+  SKETCHAPI_EXPORT void setEntityB(const ModelHighAPI_RefAttr& theEntity);
+  SKETCHAPI_EXPORT void setEntityC(const ModelHighAPI_RefAttr& theEntity);
+  SKETCHAPI_EXPORT void setEntityD(const ModelHighAPI_RefAttr& theEntity);
+
+  SKETCHAPI_EXPORT void setValue(const ModelHighAPI_Double& theValue);
+
   /// Dump wrapped feature
   SKETCHAPI_EXPORT
   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
+protected:
+  // Check all attributes of constraint are already dumped.
+  // If not, store the constraint as postponed.
+  bool areAllAttributesDumped(ModelHighAPI_Dumper& theDumper) const;
 };
 
 #endif