Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintMirror.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:    SketchPlugin_ConstraintMirror.h
4 // Created: 17 Mar 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchPlugin_ConstraintMirror_H_
8 #define SketchPlugin_ConstraintMirror_H_
9
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_ConstraintBase.h"
13
14 /** \class SketchPlugin_ConstraintMirror
15  *  \ingroup Plugins
16  *  \brief Feature for creation of a new constraint mirroring a list of objects regarding to a given line
17  *
18  *  This constraint has two attributes:
19  *  SketchPlugin_Constraint::ENTITY_A() for mirror line and
20  *  SketchPlugin_Constraint::ENTITY_B() for the list of objects
21  *
22  *  Also the constraint has attribute SketchPlugin_Constraint::ENTITY_C()
23  *  which contains list of mirrored objects
24  */
25 class SketchPlugin_ConstraintMirror : public SketchPlugin_ConstraintBase
26 {
27  public:
28   /// Mirror constraint kind
29   inline static const std::string& ID()
30   {
31     static const std::string MY_CONSTRAINT_MIRROR_ID("SketchConstraintMirror");
32     return MY_CONSTRAINT_MIRROR_ID;
33   }
34   /// \brief Returns the kind of a feature
35   SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
36   {
37     static std::string MY_KIND = SketchPlugin_ConstraintMirror::ID();
38     return MY_KIND;
39   }
40
41   /// \brief Creates a new part document if needed
42   SKETCHPLUGIN_EXPORT virtual void execute();
43
44   /// \brief Request for initialization of data model of the feature: adding all attributes
45   SKETCHPLUGIN_EXPORT virtual void initAttributes();
46
47   /// Returns the AIS preview
48   SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
49
50   /// \brief Use plugin manager for features creation
51   SketchPlugin_ConstraintMirror();
52 };
53
54 #endif