Salome HOME
Fix for stability of TestMovePart1 unit-test.
[modules/shaper.git] / src / ModelAPI / ModelAPI_Events.h
index 247f51bc3cb1422429b60b19077425c8d8a4d466..20d90f09cd551802a603c90e0b1e3c44ebd8da4a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -122,9 +122,17 @@ 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";
 
+/// To send preferences information: create part on init or not
+MAYBE_UNUSED static const char * EVENT_CREATE_PART_ON_START = "CreatePartOnStart";
+
+
 /// Message that feature was changed (used for Object Browser update): moved, updated and deleted
 class MODELAPI_EXPORT ModelAPI_ObjectUpdatedMessage : public Events_MessageGroup
 {
@@ -659,6 +667,27 @@ 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
 {