Salome HOME
Merge branch 'occ/shaper2smesh'
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_MacroCircle.h
index 6bf46f36ca2afba24ec6cd7be89ee432a1f3e7a8..1f0f88c772e8e6d787aa21211088088d1582617a 100644 (file)
@@ -1,12 +1,27 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:        SketchPlugin_MacroCircle.h
-// Created:     26 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_MacroCircle_H_
 #define SketchPlugin_MacroCircle_H_
 
+#include <ModelAPI_IReentrant.h>
+
 #include "SketchPlugin.h"
 
 #include "SketchPlugin_SketchEntity.h"
@@ -21,7 +36,8 @@ class GeomAPI_Pnt2d;
  * \brief Feature for creation of the new circle in Sketch.
  */
 class SketchPlugin_MacroCircle: public SketchPlugin_SketchEntity,
-                                public GeomAPI_IPresentable
+                                public GeomAPI_IPresentable,
+                                public ModelAPI_IReentrant
 {
  public:
   /// Circle feature kind
@@ -37,6 +53,12 @@ class SketchPlugin_MacroCircle: public SketchPlugin_SketchEntity,
     return ID;
   }
 
+  inline static const std::string& EDIT_CIRCLE_TYPE()
+  {
+    static const std::string ID("edit_circle_type");
+    return ID;
+  }
+
   /// Creation method by center and passed point.
   inline static const std::string& CIRCLE_TYPE_BY_CENTER_AND_PASSED_POINTS()
   {
@@ -147,18 +169,16 @@ class SketchPlugin_MacroCircle: public SketchPlugin_SketchEntity,
   /// Creates a new part document if needed
   SKETCHPLUGIN_EXPORT virtual void execute();
 
-  /// Moves the feature
-  /// \param theDeltaX the delta for X coordinate is moved
-  /// \param theDeltaY the delta for Y coordinate is moved
-  SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY)
-  {};
-
   /// Reimplemented from ModelAPI_Feature::isMacro().
   /// \returns true
   SKETCHPLUGIN_EXPORT virtual bool isMacro() const {return true;};
 
   SKETCHPLUGIN_EXPORT virtual bool isPreviewNeeded() const {return false;};
 
+  /// Apply information of the message to current object. It fills reference object,
+  /// tangent type and tangent point refence in case of tangent arc
+  virtual std::string processEvent(const std::shared_ptr<Events_Message>& theMessage);
+
   /// Use plugin manager for features creation
   SketchPlugin_MacroCircle();