Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchAPI / SketchAPI_Mirror.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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 //
20
21 #ifndef SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_
22 #define SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_
23
24 //--------------------------------------------------------------------------------------
25 #include "SketchAPI.h"
26 #include "SketchAPI_SketchEntity.h"
27
28 #include <list>
29
30 #include <SketchPlugin_ConstraintMirror.h>
31
32 #include <ModelHighAPI_Interface.h>
33 #include <ModelHighAPI_Macro.h>
34 //--------------------------------------------------------------------------------------
35 class ModelAPI_Object;
36 class ModelHighAPI_RefAttr;
37 //--------------------------------------------------------------------------------------
38 /**\class SketchAPI_Mirror
39  * \ingroup CPPHighAPI
40  * \brief Interface for Mirror feature
41  */
42 class SketchAPI_Mirror : public ModelHighAPI_Interface
43 {
44 public:
45   /// Constructor without values
46   SKETCHAPI_EXPORT
47   explicit SketchAPI_Mirror(const std::shared_ptr<ModelAPI_Feature> & theFeature);
48   /// Constructor with values
49   SKETCHAPI_EXPORT
50   SketchAPI_Mirror(const std::shared_ptr<ModelAPI_Feature> & theFeature,
51                    const ModelHighAPI_RefAttr & theMirrorLine,
52                    const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects);
53   /// Destructor
54   SKETCHAPI_EXPORT
55   virtual ~SketchAPI_Mirror();
56
57   INTERFACE_4(SketchPlugin_ConstraintMirror::ID(),
58               mirrorLine, SketchPlugin_ConstraintMirror::ENTITY_A(),
59               ModelAPI_AttributeRefAttr, /** Mirror line */,
60               mirrorList, SketchPlugin_ConstraintMirror::MIRROR_LIST_ID(),
61               ModelAPI_AttributeRefList, /** Mirror list */,
62               referenceObjects, SketchPlugin_ConstraintMirror::ENTITY_B(),
63               ModelAPI_AttributeRefList, /** Reference objects */,
64               mirroredObjects, SketchPlugin_ConstraintMirror::ENTITY_C(),
65               ModelAPI_AttributeRefList, /** Mirrored objects */
66   )
67
68   /// List of mirrored objects
69   SKETCHAPI_EXPORT
70   std::list<std::shared_ptr<SketchAPI_SketchEntity> > mirrored() const;
71
72   /// Dump wrapped feature
73   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
74 };
75
76 //! Pointer on Mirror object
77 typedef std::shared_ptr<SketchAPI_Mirror> MirrorPtr;
78
79 //--------------------------------------------------------------------------------------
80 //--------------------------------------------------------------------------------------
81 #endif /* SRC_SKETCHAPI_SKETCHAPI_MIRROR_H_ */