Salome HOME
Sketcher: Remove obsolete interfaces. Code cleanup.
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintCoincidence.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:    SketchSolver_ConstraintCoincidence.h
4 // Created: 29 Mar 2015
5 // Author:  Artem ZHIDKOV
6
7 #ifndef SketchSolver_ConstraintCoincidence_H_
8 #define SketchSolver_ConstraintCoincidence_H_
9
10 #include <SketchSolver_Constraint.h>
11
12 /** \class   SketchSolver_ConstraintCoincidence
13  *  \ingroup Plugins
14  *  \brief   Convert coincidence constraint to SolveSpace structure
15  */
16 class SketchSolver_ConstraintCoincidence : public SketchSolver_Constraint
17 {
18 public:
19   /// Constructor based on SketchPlugin constraint
20   SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
21       SketchSolver_Constraint(theConstraint),
22       myInSolver(false)
23   {}
24
25   /// \brief Notify this object about the feature is changed somewhere
26   virtual void notify(const FeaturePtr&      theFeature,
27                       PlaneGCSSolver_Update* theUpdater);
28
29   /// \brief Remove constraint
30   virtual bool remove();
31
32 protected:
33   /// \brief Converts SketchPlugin constraint to a list of solver constraints
34   virtual void process();
35
36   /// \brief Generate list of attributes of constraint in order useful for constraints
37   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
38   /// \param[out] theAttributes list of attributes to be filled
39   virtual void getAttributes(EntityWrapperPtr&              theValue,
40                              std::vector<EntityWrapperPtr>& theAttributes);
41
42 protected:
43   bool myInSolver; ///< shows the constraint is added to the solver
44 };
45
46 #endif