Salome HOME
Refactoring: split base class of Boolean operation (separate methods related to versi...
[modules/shaper.git] / src / SketchAPI / SketchAPI_SketchEntity.cpp
index 24758c6803b8f70bd7422ec95e202a613b8d493a..808ac012bec5144211356681803c203a2a2fcd9a 100644 (file)
@@ -1,10 +1,22 @@
-// Name   : SketchAPI_SketchEntity.cpp
-// 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:
-// 07/06/16 - Sergey POKHODENKO - Creation of the file
 
-//--------------------------------------------------------------------------------------
 #include "SketchAPI_SketchEntity.h"
 #include <SketchAPI_Arc.h>
 #include <SketchAPI_Circle.h>
@@ -72,22 +84,23 @@ bool SketchAPI_SketchEntity::isCopy() const
   return isCopy.get() && isCopy->value();
 }
 
-std::list<std::shared_ptr<ModelHighAPI_Interface> >
+std::list<std::shared_ptr<SketchAPI_SketchEntity> >
 SketchAPI_SketchEntity::wrap(const std::list<std::shared_ptr<ModelAPI_Feature> >& theFeatures)
 {
-  std::list<std::shared_ptr<ModelHighAPI_Interface> > aResult;
+  std::list<std::shared_ptr<SketchAPI_SketchEntity> > aResult;
   std::list<std::shared_ptr<ModelAPI_Feature> >::const_iterator anIt = theFeatures.begin();
   for (; anIt != theFeatures.end(); ++anIt) {
     if ((*anIt)->getKind() == SketchPlugin_Line::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_Line(*anIt)));
+      aResult.push_back(std::shared_ptr<SketchAPI_SketchEntity>(new SketchAPI_Line(*anIt)));
     else if ((*anIt)->getKind() == SketchPlugin_Arc::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_Arc(*anIt)));
+      aResult.push_back(std::shared_ptr<SketchAPI_SketchEntity>(new SketchAPI_Arc(*anIt)));
     else if ((*anIt)->getKind() == SketchPlugin_Circle::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_Circle(*anIt)));
+      aResult.push_back(std::shared_ptr<SketchAPI_SketchEntity>(new SketchAPI_Circle(*anIt)));
     else if ((*anIt)->getKind() == SketchPlugin_Point::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_Point(*anIt)));
+      aResult.push_back(std::shared_ptr<SketchAPI_SketchEntity>(new SketchAPI_Point(*anIt)));
     else if ((*anIt)->getKind() == SketchPlugin_IntersectionPoint::ID())
-      aResult.push_back(std::shared_ptr<ModelHighAPI_Interface>(new SketchAPI_IntersectionPoint(*anIt)));
+      aResult.push_back(std::shared_ptr<SketchAPI_SketchEntity>(
+                                                    new SketchAPI_IntersectionPoint(*anIt)));
   }
   return aResult;
 }