Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchAPI / SketchAPI_Rotation.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
18 //
19
20 #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
21 #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_
22
23 //--------------------------------------------------------------------------------------
24 #include "SketchAPI.h"
25 #include "SketchAPI_SketchEntity.h"
26
27 #include <list>
28
29 #include <SketchPlugin_MultiRotation.h>
30
31 #include <ModelHighAPI_Interface.h>
32 #include <ModelHighAPI_Macro.h>
33 //--------------------------------------------------------------------------------------
34 class ModelAPI_Object;
35 class ModelHighAPI_Double;
36 class ModelHighAPI_Integer;
37 class ModelHighAPI_RefAttr;
38 //--------------------------------------------------------------------------------------
39 /**\class SketchAPI_Rotation
40  * \ingroup CPPHighAPI
41  * \brief Interface for Rotation feature
42  */
43 class SketchAPI_Rotation : public ModelHighAPI_Interface
44 {
45 public:
46   /// Constructor without values
47   SKETCHAPI_EXPORT
48   explicit SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature);
49   /// Constructor with values
50   SKETCHAPI_EXPORT
51   SketchAPI_Rotation(const std::shared_ptr<ModelAPI_Feature> & theFeature,
52                      const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
53                      const ModelHighAPI_RefAttr & theCenter,
54                      const ModelHighAPI_Double & theAngle,
55                      const ModelHighAPI_Integer & theNumberOfObjects,
56                      bool theFullValue = false);
57   /// Destructor
58   SKETCHAPI_EXPORT
59   virtual ~SketchAPI_Rotation();
60
61   INTERFACE_7(SketchPlugin_MultiRotation::ID(),
62               rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(),
63               ModelAPI_AttributeRefList, /** Rotation list */,
64               center, SketchPlugin_MultiRotation::CENTER_ID(),
65               ModelAPI_AttributeRefAttr, /** Center */,
66               angle, SketchPlugin_MultiRotation::ANGLE_ID(),
67               ModelAPI_AttributeDouble, /** Angle */,
68               numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(),
69               ModelAPI_AttributeInteger, /** Number of objects */,
70               valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(),
71               ModelAPI_AttributeString, /** Value type */,
72               referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(),
73               ModelAPI_AttributeRefList, /** Reference objects */,
74               rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(),
75               ModelAPI_AttributeRefList, /** Rotated objects */
76   )
77
78   /// List of rotated objects
79   SKETCHAPI_EXPORT
80   std::list<std::shared_ptr<SketchAPI_SketchEntity> > rotated() const;
81
82   /// Dump wrapped feature
83   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
84 };
85
86 //! Pointer on Rotation object
87 typedef std::shared_ptr<SketchAPI_Rotation> RotationPtr;
88
89 //--------------------------------------------------------------------------------------
90 //--------------------------------------------------------------------------------------
91 #endif /* SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ */