Salome HOME
bos #24513 Dealing with conflicting constraints
[modules/shaper.git] / src / ModelAPI / ModelAPI_Events.h
index 247f51bc3cb1422429b60b19077425c8d8a4d466..efab2fae163aff554e4dcf6fd8ea09c8c18bd01b 100644 (file)
@@ -122,6 +122,10 @@ MAYBE_UNUSED static const char * EVENT_VISUAL_ATTRIBUTES = "UpdateVisualAttribut
 /// Event ID that 1D-fillet failed (comes with ModelAPI_ShapesFailedMessage)
 MAYBE_UNUSED static const char * EVENT_OPERATION_SHAPES_FAILED = "OperationShapesFailed";
 
+MAYBE_UNUSED static const char * EVENT_CHECK_CONSTRAINTS = "CheckConstrains";
+
+MAYBE_UNUSED static const char * EVENT_REMOVE_CONSTRAINTS = "RemoveConstrains";
+
 /// Event ID that license of specified features is checked and valid
 MAYBE_UNUSED static const char * EVENT_FEATURE_LICENSE_VALID = "FeaturesLicenseValid";
 
@@ -659,6 +663,26 @@ private:
   std::list< std::shared_ptr<GeomAPI_Shape> > myShapes;
 };
 
+///Message that sends the constraints to check or remove
+class ModelAPI_CheckConstraintsMessage : public Events_Message
+{
+public:
+  /// Creates an empty message
+  MODELAPI_EXPORT ModelAPI_CheckConstraintsMessage(const Events_ID theID, const void* theSender = 0);
+  /// The virtual destructor
+  MODELAPI_EXPORT virtual ~ModelAPI_CheckConstraintsMessage();
+
+  ///Get list of constrains
+  MODELAPI_EXPORT const std::set<ObjectPtr>& constraints() const;
+
+  ///Set list of constrains
+  MODELAPI_EXPORT void setConstraints(const std::set<ObjectPtr>& theConstraints);
+
+private:
+  std::set<ObjectPtr> myConstraints;
+};
+
+
 /// Message that sends the features which license is checked and valid
 class ModelAPI_FeaturesLicenseValidMessage : public Events_Message
 {