- SketchSolver_Constraint();
- SketchSolver_Constraint(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
-
- /** \brief Compute constraint type according to SolveSpace identifiers
- * and verify that constraint parameters are correct
- * \param[in] theConstraint constraint which type should be determined
- * \return identifier of constraint type or SLVS_C_UNKNOWN if the type is wrong
- */
- const int& getType(boost::shared_ptr<SketchPlugin_Constraint> theConstraint);
- /// \brief Returns the type of myConstraint member
- inline const int& getType() const
+ /// Constructor based on SketchPlugin constraint
+ SketchSolver_Constraint(ConstraintPtr theConstraint);
+
+ virtual ~SketchSolver_Constraint() {}
+
+ /// \brief Initializes parameters and start constraint creation
+ /// \param theStorage [in] storage where to place new constraint
+ /// \param theEventsBlocked [in] all events from this constraint should be blocked
+ void process(StoragePtr theStorage, bool theEvensBlocked);
+
+ /// \brief Notify this object about the feature is changed somewhere
+ virtual void notify(const FeaturePtr& theFeature, PlaneGCSSolver_Update* theUpdater) {}
+
+ /// \brief Update constraint
+ virtual void update();
+
+ /// \brief Tries to remove constraint
+ /// \return \c false, if current constraint contains another SketchPlugin constraints
+ /// (like for multiple coincidence)
+ virtual bool remove();
+
+ /// \brief Block or unblock events from this constraint
+ virtual void blockEvents(bool isBlocked);
+
+ /// \brief Obtain a type of SketchPlugin constraint
+ static SketchSolver_ConstraintType TYPE(ConstraintPtr theConstraint);
+
+ /// \brief Returns the type of constraint
+ virtual SketchSolver_ConstraintType getType() const