X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Constraint.h;h=69513749c3fb3d5ad24b3e357e45da18438407e8;hb=4f565b2204d3fba046aa8c851abada2a5a17bf6c;hp=6f8a6fd7942f1f6a34753f1f0bbf05ac6c650dae;hpb=29d446f4dd2969d80087745fe44adb5638d13de7;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Constraint.h b/src/SketchSolver/SketchSolver_Constraint.h index 6f8a6fd79..69513749c 100644 --- a/src/SketchSolver/SketchSolver_Constraint.h +++ b/src/SketchSolver/SketchSolver_Constraint.h @@ -47,7 +47,8 @@ public: SKETCHSOLVER_EXPORT virtual void update(); /// \brief Tries to remove constraint - /// \return \c false, if current constraint contains another SketchPlugin constraints (like for multiple coincidence) + /// \return \c false, if current constraint contains another SketchPlugin constraints + /// (like for multiple coincidence) SKETCHSOLVER_EXPORT virtual bool remove(); /// \brief Obtain a type of SketchPlugin constraint @@ -57,13 +58,18 @@ public: virtual SketchSolver_ConstraintType getType() const { return myType; } - /// \brief The constraint is made temporary - void makeTemporary() const; + /// \brief Returns list of attributes of constraint + const std::list& attributes() const + { return myAttributes; } /// \brief Verify the feature or any its attribute is used by constraint - bool isUsed(FeaturePtr theFeature) const; + virtual bool isUsed(FeaturePtr theFeature) const; /// \brief Verify the attribute is used by constraint - bool isUsed(AttributePtr theAttribute) const; + virtual bool isUsed(AttributePtr theAttribute) const; + + /// \brief Notify constraint, that coincidence appears or removed + virtual void notifyCoincidenceChanged(EntityWrapperPtr theCoincAttr1, + EntityWrapperPtr theCoincAttr2) { /* implement in derived class */ } /// \brief Shows error message const std::string& error() const @@ -91,8 +97,11 @@ protected: GroupID myGroupID; ///< identifier of the group, the constraint belongs to EntityID mySketchID; ///< identifier of the sketch, the constraint belongs to ConstraintPtr myBaseConstraint; ///< base SketchPlugin constraint - StoragePtr myStorage; ///< storage, which contains all information about entities and constraints + + /// storage, which contains all information about entities and constraints + StoragePtr myStorage; SketchSolver_ConstraintType myType; ///< type of constraint + std::list myAttributes; ///< attributes of constraint std::string myErrorMsg; ///< error message };