Salome HOME
Task 2.4. Ability to modify the radius of circles and arcs of circle with the mouse
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintCoincidence.h
index 58b0d98dfdad486a6c53818215d2bf95fdce21c0..0a3ea83e8bd38d3d71fca682647aa9d6acf0edf5 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintCoincidence_H_
 #define SketchSolver_ConstraintCoincidence_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintCoincidence
@@ -18,15 +17,31 @@ class SketchSolver_ConstraintCoincidence : public SketchSolver_Constraint
 {
 public:
   /// Constructor based on SketchPlugin constraint
-  SKETCHSOLVER_EXPORT SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
-      SketchSolver_Constraint(theConstraint)
+  SketchSolver_ConstraintCoincidence(ConstraintPtr theConstraint) :
+      SketchSolver_Constraint(theConstraint),
+      myInSolver(false)
   {}
 
+  /// \brief Notify this object about the feature is changed somewhere
+  virtual void notify(const FeaturePtr&      theFeature,
+                      PlaneGCSSolver_Update* theUpdater);
+
+  /// \brief Remove constraint
+  virtual bool remove();
+
 protected:
+  /// \brief Converts SketchPlugin constraint to a list of solver constraints
+  virtual void process();
+
   /// \brief Generate list of attributes of constraint in order useful for constraints
   /// \param[out] theValue      numerical characteristic of constraint (e.g. distance)
   /// \param[out] theAttributes list of attributes to be filled
-  virtual void getAttributes(double& theValue, std::vector<EntityWrapperPtr>& theAttributes);
+  virtual void getAttributes(EntityWrapperPtr&              theValue,
+                             std::vector<EntityWrapperPtr>& theAttributes);
+
+protected:
+  bool myInSolver; ///< shows the constraint is added to the solver
+  EntityWrapperPtr myFeatureExtremities[2]; ///< extremities of a feature, a point is coincident to
 };
 
 #endif