Salome HOME
Initial version of redesign of working with results
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.h
1 // File:    SketchPlugin_ConstraintCoincidence.h
2 // Created: 08 May 2014
3 // Author:  Artem ZHIDKOV
4
5 #ifndef SketchPlugin_ConstraintCoincidence_HeaderFile
6 #define SketchPlugin_ConstraintCoincidence_HeaderFile
7
8 #include "SketchPlugin.h"
9 #include "SketchPlugin_Constraint.h"
10 #include <SketchPlugin_Sketch.h>
11 #include <list>
12
13 /// Coincidence constraint kind
14 const std::string SKETCH_CONSTRAINT_COINCIDENCE_KIND("SketchConstraintCoincidence");
15
16 /** \class SketchPlugin_ConstraintCoincidence
17  *  \ingroup DataModel
18  *  \brief Feature for creation of a new constraint which defines equivalence of two points
19  *
20  *  These constraint has two attributes:
21  *  CONSTRAINT_ATTR_ENTITY_A and CONSTRAINT_ATTR_ENTITY_B
22  */
23 class SketchPlugin_ConstraintCoincidence: public SketchPlugin_Constraint
24 {
25 public:
26   /// \brief Returns the kind of a feature
27   SKETCHPLUGIN_EXPORT virtual const std::string& getKind() 
28   {static std::string MY_KIND = SKETCH_CONSTRAINT_COINCIDENCE_KIND; return MY_KIND;}
29
30   /// \brief Creates a new part document if needed
31   SKETCHPLUGIN_EXPORT virtual void execute(boost::shared_ptr<ModelAPI_Result>& theResult);
32
33   /// \brief Request for initialization of data model of the feature: adding all attributes
34   SKETCHPLUGIN_EXPORT virtual void initAttributes();
35
36   /// \brief Use plugin manager for features creation
37   SketchPlugin_ConstraintCoincidence();
38 };
39
40 #endif