Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchAPI / SketchAPI_Translation.h
index 7b6da8f5eb526c884907f229ddfcf22c99b17459..a16f54724388d1a42da27d2fcdf363282eeb0311 100644 (file)
@@ -1,20 +1,35 @@
-// Name   : SketchAPI_Translation.h
-// Purpose: 
+// Copyright (C) 2014-2023  CEA, EDF
+//
+// 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:
-// 16/06/16 - Sergey POKHODENKO - Creation of the file
 
 #ifndef SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
 #define SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
 
 //--------------------------------------------------------------------------------------
 #include "SketchAPI.h"
+#include "SketchAPI_SketchEntity.h"
 
 #include <list>
 
 #include <SketchPlugin_MultiTranslation.h>
 
-#include "SketchAPI_SketchEntity.h"
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
 //--------------------------------------------------------------------------------------
 class ModelAPI_Object;
 class ModelHighAPI_Integer;
@@ -24,7 +39,7 @@ class ModelHighAPI_RefAttr;
  * \ingroup CPPHighAPI
  * \brief Interface for Translation feature
  */
-class SketchAPI_Translation : public SketchAPI_SketchEntity
+class SketchAPI_Translation : public ModelHighAPI_Interface
 {
 public:
   /// Constructor without values
@@ -43,15 +58,37 @@ public:
   virtual ~SketchAPI_Translation();
 
   INTERFACE_7(SketchPlugin_MultiTranslation::ID(),
-              translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(), ModelAPI_AttributeRefList, /** Translation list */,
-              startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(), ModelAPI_AttributeRefAttr, /** Start point */,
-              endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(), ModelAPI_AttributeRefAttr, /** Start point */,
-              numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger, /** Number of objects */,
-              valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(), ModelAPI_AttributeString, /** Value type */,
-              referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(), ModelAPI_AttributeRefList, /** Reference objects */,
-              translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(), ModelAPI_AttributeRefList, /** Translationed objects */
+              translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(),
+              ModelAPI_AttributeRefList, /** Translation list */,
+              startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(),
+              ModelAPI_AttributeRefAttr, /** Start point */,
+              endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(),
+              ModelAPI_AttributeRefAttr, /** Start point */,
+              numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(),
+              ModelAPI_AttributeInteger, /** Number of objects */,
+              valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(),
+              ModelAPI_AttributeString, /** Value type */,
+              referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(),
+              ModelAPI_AttributeRefList, /** Reference objects */,
+              translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(),
+              ModelAPI_AttributeRefList, /** Translationed objects */
   )
 
+  /// Set list of objects to be translated
+  SKETCHAPI_EXPORT
+  void setTranslationList(const std::list<std::shared_ptr<ModelAPI_Object> >& theObjects);
+
+  /// List of translated objects.
+  /// [DEPRECATED]: use translatedList() instead.
+  SKETCHAPI_EXPORT
+  std::list<std::shared_ptr<SketchAPI_SketchEntity> > translated() const;
+
+  /// List of translated objects.
+  SKETCHAPI_EXPORT
+  std::list<std::shared_ptr<SketchAPI_SketchEntity> > translatedList() const;
+
+  /// Dump wrapped feature
+  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
 };
 
 //! Pointer on Translation object