]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_Translation.h
Salome HOME
Revert change for MacroArc attribute names
[modules/shaper.git] / src / SketchAPI / SketchAPI_Translation.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : SketchAPI_Translation.h
3 // Purpose:
4 //
5 // History:
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
13 #include "SketchAPI_SketchEntity.h"
14
15 #include <list>
16
17 #include <SketchPlugin_MultiTranslation.h>
18
19 #include <ModelHighAPI_Interface.h>
20 #include <ModelHighAPI_Macro.h>
21 //--------------------------------------------------------------------------------------
22 class ModelAPI_Object;
23 class ModelHighAPI_Integer;
24 class ModelHighAPI_RefAttr;
25 //--------------------------------------------------------------------------------------
26 /**\class SketchAPI_Translation
27  * \ingroup CPPHighAPI
28  * \brief Interface for Translation feature
29  */
30 class SketchAPI_Translation : public ModelHighAPI_Interface
31 {
32 public:
33   /// Constructor without values
34   SKETCHAPI_EXPORT
35   explicit SketchAPI_Translation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
36   /// Constructor with values
37   SKETCHAPI_EXPORT
38   SketchAPI_Translation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
39                         const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
40                         const ModelHighAPI_RefAttr & thePoint1,
41                         const ModelHighAPI_RefAttr & thePoint2,
42                         const ModelHighAPI_Integer & theNumberOfObjects,
43                         bool theFullValue = false);
44   /// Destructor
45   SKETCHAPI_EXPORT
46   virtual ~SketchAPI_Translation();
47
48   INTERFACE_7(SketchPlugin_MultiTranslation::ID(),
49               translationList, SketchPlugin_MultiTranslation::TRANSLATION_LIST_ID(),
50               ModelAPI_AttributeRefList, /** Translation list */,
51               startPoint, SketchPlugin_MultiTranslation::START_POINT_ID(),
52               ModelAPI_AttributeRefAttr, /** Start point */,
53               endPoint, SketchPlugin_MultiTranslation::END_POINT_ID(),
54               ModelAPI_AttributeRefAttr, /** Start point */,
55               numberOfObjects, SketchPlugin_MultiTranslation::NUMBER_OF_OBJECTS_ID(),
56               ModelAPI_AttributeInteger, /** Number of objects */,
57               valueType, SketchPlugin_MultiTranslation::VALUE_TYPE(),
58               ModelAPI_AttributeString, /** Value type */,
59               referenceObjects, SketchPlugin_MultiTranslation::ENTITY_A(),
60               ModelAPI_AttributeRefList, /** Reference objects */,
61               translatedObjects, SketchPlugin_MultiTranslation::ENTITY_B(),
62               ModelAPI_AttributeRefList, /** Translationed objects */
63   )
64
65   /// List of translated objects
66   SKETCHAPI_EXPORT
67   std::list<std::shared_ptr<SketchAPI_SketchEntity> > translated() const;
68
69   /// Dump wrapped feature
70   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
71 };
72
73 //! Pointer on Translation object
74 typedef std::shared_ptr<SketchAPI_Translation> TranslationPtr;
75
76 //--------------------------------------------------------------------------------------
77 //--------------------------------------------------------------------------------------
78 #endif /* SRC_SKETCHAPI_SKETCHAPI_TRANSLATION_H_ */