Salome HOME
Define guards are corrected according to the code style
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintParallel.h
1 // File:    SketchPlugin_ConstraintParallel.h
2 // Created: 26 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintParallel_H_
6 #define SketchPlugin_ConstraintParallel_H_
7
8 #include "SketchPlugin.h"
9 #include <SketchPlugin_Sketch.h>
10 #include "SketchPlugin_Constraint.h"
11
12 /** \class SketchPlugin_ConstraintParallel
13  *  \ingroup DataModel
14  *  \brief Feature for creation of a new constraint parallelism of two lines
15  *
16  *  These constraint has two attributes:
17  *  SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
18  */
19 class SketchPlugin_ConstraintParallel: public SketchPlugin_Constraint
20 {
21 public:
22   /// Parallel constraint kind
23   inline static const std::string& ID()
24   {
25     static const std::string MY_CONSTRAINT_PARALLEL_ID("SketchConstraintParallel");
26     return MY_CONSTRAINT_PARALLEL_ID;
27   }
28   /// \brief Returns the kind of a feature
29   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
30   {static std::string MY_KIND = SketchPlugin_ConstraintParallel::ID(); return MY_KIND;}
31
32   /// \brief Creates a new part document if needed
33   SKETCHPLUGIN_EXPORT virtual void execute();
34
35   /// \brief Request for initialization of data model of the feature: adding all attributes
36   SKETCHPLUGIN_EXPORT virtual void initAttributes();
37
38   /// Returns the AIS preview
39   SKETCHPLUGIN_EXPORT virtual boost::shared_ptr<GeomAPI_AISObject> getAISObject(
40                                 boost::shared_ptr<GeomAPI_AISObject> thePrevious);
41
42   /// Moves the feature
43   /// \param theDeltaX the delta for X coordinate is moved
44   /// \param theDeltaY the delta for Y coordinate is moved
45   SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
46
47   /// \brief Use plugin manager for features creation
48   SketchPlugin_ConstraintParallel();
49 };
50
51 #endif